/* ============================================================
   Carolina Development Partners — style.css
   Brand: deep teal #1D5460 / bright teal #48B4C0
   ============================================================ */

:root {
  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  --content-narrow: 680px;
  --content-default: 1000px;
  --content-wide: 1240px;

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
}

/* ---------- Light theme ---------- */
:root,
[data-theme='light'] {
  --color-bg: #fbfbfa;
  --color-surface: #ffffff;
  --color-surface-2: #f4f6f6;
  --color-surface-offset: #eef2f2;
  --color-divider: #e2e7e7;
  --color-border: #d6dcdc;

  --color-text: #16282d;
  --color-text-muted: #5d6d71;
  --color-text-faint: #93a1a4;
  --color-text-inverse: #ffffff;

  --color-primary: #1d5460;
  --color-primary-hover: #164049;
  --color-primary-soft: #e6f0f1;
  --color-accent: #2f96a5;
  --color-accent-soft: #dff0f2;

  --color-deep: #16323a;

  --shadow-sm: 0 1px 2px rgba(22, 40, 45, 0.06);
  --shadow-md: 0 6px 18px rgba(22, 40, 45, 0.08);
  --shadow-lg: 0 18px 44px rgba(22, 40, 45, 0.13);

  --logo-filter: none;
}

/* ---------- Dark theme ---------- */
[data-theme='dark'] {
  --color-bg: #101819;
  --color-surface: #16211f;
  --color-surface-2: #1a2726;
  --color-surface-offset: #1e2c2c;
  --color-divider: #24312f;
  --color-border: #2f403f;

  --color-text: #dbe3e2;
  --color-text-muted: #93a3a3;
  --color-text-faint: #6a7a7a;
  --color-text-inverse: #0e1516;

  --color-primary: #5fbecb;
  --color-primary-hover: #85d2dc;
  --color-primary-soft: #17303400;
  --color-accent: #6ccbd8;
  --color-accent-soft: #1a3438;

  --color-deep: #0d1618;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.55);

  --logo-filter: brightness(0) invert(1);
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  min-height: 100dvh;
  line-height: 1.65;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

img,
picture,
video,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

ul[role='list'] {
  list-style: none;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

h1,
h2,
h3,
h4 {
  text-wrap: balance;
  line-height: 1.15;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.015em;
}

p {
  text-wrap: pretty;
}

a {
  color: inherit;
}

::selection {
  background: var(--color-accent-soft);
  color: var(--color-text);
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

a,
button,
input,
textarea,
select,
.card {
  transition:
    color var(--transition-interactive),
    background var(--transition-interactive),
    border-color var(--transition-interactive),
    box-shadow var(--transition-interactive),
    transform var(--transition-interactive);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.wrap--narrow {
  max-width: var(--content-default);
}

section {
  padding-block: clamp(var(--space-16), 8vw, var(--space-32));
}

.section-tight {
  padding-block: clamp(var(--space-12), 6vw, var(--space-20));
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

.section-head {
  max-width: 60ch;
  margin-bottom: clamp(var(--space-10), 4vw, var(--space-16));
}

.section-head h2 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-4);
}

.section-head p {
  color: var(--color-text-muted);
  max-width: 58ch;
}

.lead {
  font-size: var(--text-lg);
  line-height: 1.5;
  color: var(--color-text-muted);
  font-family: var(--font-body);
  max-width: 54ch;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.btn--primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--ghost {
  border-color: var(--color-border);
  color: var(--color-text);
  background: transparent;
}

.btn--ghost:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn--light {
  background: #fff;
  color: #16282d;
}

.btn--light:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn--outline-light {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.btn--outline-light:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.textlink {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
}

.textlink svg {
  transition: transform var(--transition-interactive);
}

.textlink:hover svg {
  transform: translateX(3px);
}

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 220ms ease, box-shadow 220ms ease;
}

.header--scrolled {
  border-bottom-color: var(--color-divider);
  box-shadow: var(--shadow-sm);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  min-height: 74px;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.brand img {
  height: 38px;
  width: auto;
  filter: var(--logo-filter);
}

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  color: var(--color-text-muted);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
}

.nav a:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
}

.nav a[aria-current='page'] {
  color: var(--color-primary);
  font-weight: 600;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.icon-btn:hover {
  color: var(--color-text);
  border-color: var(--color-primary);
}

.header__phone {
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  color: var(--color-text);
  white-space: nowrap;
}

.header__phone:hover {
  color: var(--color-primary);
}

.menu-btn {
  display: none;
}

@media (max-width: 1020px) {
  .nav,
  .header__phone,
  .header__actions > .btn {
    display: none;
  }
  .menu-btn {
    display: grid;
  }
}

@media (max-width: 480px) {
  .brand img {
    width: 168px;
  }
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--color-divider);
  background: var(--color-bg);
  padding: var(--space-4) var(--space-6) var(--space-8);
}

.mobile-nav.open {
  display: block;
}

.mobile-nav a {
  display: block;
  padding: var(--space-3) 0;
  font-size: var(--text-base);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--color-divider);
}

.mobile-nav .btn {
  margin-top: var(--space-5);
  width: 100%;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  min-height: min(78vh, 660px);
  display: flex;
  align-items: flex-end;
  padding-block: clamp(var(--space-20), 12vw, var(--space-32));
  color: #fff;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    to top,
    rgba(10, 24, 28, 0.92) 0%,
    rgba(10, 24, 28, 0.68) 45%,
    rgba(10, 24, 28, 0.46) 100%
  );
}

.hero h1 {
  font-size: var(--text-2xl);
  max-width: 17ch;
  margin-bottom: var(--space-5);
  color: #fff;
}

.hero p {
  font-size: var(--text-lg);
  line-height: 1.5;
  max-width: 48ch;
  color: rgba(255, 255, 255, 0.86);
  margin-bottom: var(--space-8);
}

.hero .eyebrow {
  color: #8fdbe6;
}

/* Page hero (interior) */
.page-hero {
  position: relative;
  isolation: isolate;
  color: #fff;
  padding-block: clamp(var(--space-16), 9vw, var(--space-24));
}

.page-hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

.page-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to right, rgba(10, 24, 28, 0.9), rgba(10, 24, 28, 0.6));
}

.page-hero h1 {
  font-size: var(--text-xl);
  color: #fff;
  max-width: 20ch;
  margin-bottom: var(--space-4);
}

.page-hero p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 56ch;
}

.page-hero .eyebrow {
  color: #8fdbe6;
}

/* ---------- Stat bar ---------- */
.statbar {
  background: var(--color-deep);
  color: #fff;
}

.statbar__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
  padding-block: var(--space-12);
}

.stat__num {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: #7fd3de;
  line-height: 1.1;
}

.stat__label {
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.66);
  margin-top: var(--space-2);
}

@media (max-width: 760px) {
  .statbar__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }
}

/* ---------- Cards / grids ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-6);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  align-items: center;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Service card */
.svc {
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.svc__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: var(--color-accent-soft);
  color: var(--color-primary);
}

[data-theme='dark'] .svc__icon {
  color: var(--color-accent);
}

.svc h3 {
  font-size: var(--text-lg);
}

.svc p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  flex-grow: 1;
}

.svc:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* ---------- Listing card ---------- */
.listing {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.listing__media {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--color-surface-2);
}

.listing__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

.listing:hover .listing__media img {
  transform: scale(1.045);
}

.listing:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.badge {
  position: absolute;
  top: var(--space-4);
  left: var(--space-4);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.94);
  color: #16282d;
  backdrop-filter: blur(6px);
}

.badge--sold {
  background: #16282d;
  color: #fff;
}

.badge--pending {
  background: #b4761c;
  color: #fff;
}

.listing__body {
  padding: var(--space-5) var(--space-5) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex-grow: 1;
}

.listing__price {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
}

.listing__title {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.35;
}

.listing__loc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.listing__meta {
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-divider);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.listing__meta span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.listing__meta strong {
  color: var(--color-text);
  font-weight: 600;
}

/* ---------- Filters ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-5);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-10);
}

.filters label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  display: block;
  margin-bottom: var(--space-2);
}

.field {
  flex: 1 1 180px;
}

select,
input[type='text'],
input[type='email'],
input[type='tel'],
textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: var(--text-sm);
}

select:focus,
input:focus,
textarea:focus {
  border-color: var(--color-accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.filters__count {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

.empty {
  text-align: center;
  padding: var(--space-20) var(--space-6);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text-muted);
}

/* ---------- Split feature ---------- */
.split__media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.split__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.split h2 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-4);
}

.split p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.checklist {
  list-style: none;
  display: grid;
  gap: var(--space-3);
  margin: var(--space-6) 0;
}

.checklist li {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  font-size: var(--text-sm);
}

.checklist svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--color-accent);
}

/* ---------- Process steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-8);
  counter-reset: step;
}

.step {
  position: relative;
  padding-top: var(--space-6);
  border-top: 2px solid var(--color-divider);
}

.step__num {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-accent);
  font-weight: 600;
  display: block;
  margin-bottom: var(--space-2);
}

.step h3 {
  font-size: var(--text-base);
  font-family: var(--font-body);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.step p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ---------- CTA band ---------- */
.cta {
  background: var(--color-deep);
  color: #fff;
  text-align: center;
}

.cta h2 {
  font-size: var(--text-xl);
  color: #fff;
  margin-bottom: var(--space-4);
  margin-inline: auto;
  max-width: 22ch;
}

.cta p {
  color: rgba(255, 255, 255, 0.75);
  max-width: 52ch;
  margin: 0 auto var(--space-8);
}

.cta .btn-row {
  justify-content: center;
}

/* ---------- Detail page ---------- */
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
  gap: clamp(var(--space-8), 4vw, var(--space-16));
  align-items: start;
}

@media (max-width: 900px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

.gallery__main {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-3);
}

.gallery__main img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}

.gallery__thumbs button {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  line-height: 0;
}

.gallery__thumbs button[aria-current='true'] {
  border-color: var(--color-accent);
}

.gallery__thumbs img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.spec-table th,
.spec-table td {
  text-align: left;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-divider);
  vertical-align: top;
}

.spec-table th {
  font-weight: 500;
  color: var(--color-text-muted);
  width: 45%;
}

.spec-table td {
  font-weight: 600;
}

.detail-grid > aside {
  position: sticky;
  top: 96px;
}

@media (max-width: 900px) {
  .detail-grid > aside {
    position: static;
  }
}

.sidebar-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.sidebar-card .price {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.1;
}

.sidebar-card .price-sub {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

.sidebar-card .btn {
  width: 100%;
  margin-bottom: var(--space-3);
}

.contact-line {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-divider);
  margin-top: var(--space-4);
}

.contact-line a {
  text-decoration: none;
  font-weight: 600;
  color: var(--color-primary);
}

.breadcrumb {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

.breadcrumb a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--color-primary);
}

.prose p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  max-width: 68ch;
}

.prose h3 {
  font-size: var(--text-lg);
  margin: var(--space-8) 0 var(--space-3);
}

/* ---------- Forms ---------- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
}

.form-grid .full {
  grid-column: 1 / -1;
}

@media (max-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.req {
  color: #c0523f;
}

.hint {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-2);
}

.form-error {
  font-size: var(--text-xs);
  color: #c0523f;
  margin-top: var(--space-2);
  display: none;
}

.form-error.show {
  display: block;
}

.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form-fail {
  display: none;
  margin-bottom: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid #e7b7b0;
  background: #fdf1ef;
  color: #8c2f21;
  font-size: var(--text-sm);
  line-height: 1.6;
}

.form-fail.show {
  display: block;
}

.form-fail a {
  color: inherit;
  font-weight: 600;
  white-space: nowrap;
}

[data-theme='dark'] .form-fail {
  border-color: #6d3a32;
  background: #2c1a17;
  color: #f0b7ac;
}

.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.form-success {
  display: none;
  padding: var(--space-8);
  border-radius: var(--radius-lg);
  background: var(--color-accent-soft);
  border: 1px solid var(--color-accent);
  text-align: center;
}

.form-success.show {
  display: block;
}

.form-success h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.form-success p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-inline: auto;
  max-width: 44ch;
}

/* ---------- Contact info blocks ---------- */
.info-list {
  display: grid;
  gap: var(--space-6);
  list-style: none;
}

.info-item {
  display: flex;
  gap: var(--space-4);
}

.info-item svg {
  flex-shrink: 0;
  color: var(--color-accent);
  margin-top: 4px;
}

.info-item h3 {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: var(--space-1);
}

.info-item p,
.info-item a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
}

.info-item a:hover {
  color: var(--color-primary);
}

.map-frame {
  border: 0;
  width: 100%;
  height: 340px;
  border-radius: var(--radius-lg);
  filter: grayscale(0.15);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--color-deep);
  color: rgba(255, 255, 255, 0.72);
  padding-block: var(--space-16) var(--space-8);
  font-size: var(--text-sm);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: var(--space-10);
}

@media (max-width: 900px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }
}

.footer img.flogo {
  height: 40px;
  width: auto;
  filter: brightness(0) invert(1);
  margin-bottom: var(--space-5);
}

.footer h4 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: var(--space-4);
  font-weight: 700;
}

.footer ul {
  list-style: none;
  display: grid;
  gap: var(--space-3);
}

.footer a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
}

.footer a:hover {
  color: #7fd3de;
}

.footer__bottom {
  margin-top: var(--space-12);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: space-between;
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.55);
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 700ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Completed projects / track record ---------- */
.record {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  overflow: hidden;
}

.record__head,
.record__row,
.record__total {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 2fr) 5.5rem 5.5rem 7rem;
  gap: var(--space-5);
  align-items: center;
  padding: var(--space-5) var(--space-6);
}

.record__head {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: var(--color-surface-2);
  border-bottom: 1px solid var(--color-border);
}

.record__row {
  border-bottom: 1px solid var(--color-divider);
  transition: background 0.18s ease;
}

.record__row:last-child { border-bottom: 0; }
.record__row:hover { background: var(--color-surface-2); }

.record__name {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-width: 0;
}

.record__name strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text);
}

.record__note {
  display: block;
  margin-top: 2px;
  font-size: 0.8125rem;
  font-style: normal;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.record__thumb {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--color-surface-2);
}

.record__loc {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  min-width: 0;
}

.record__num {
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
}

.record__head .record__num { font-weight: 700; color: var(--color-text-muted); }

.record__total {
  background: var(--color-surface-2);
  border-top: 1px solid var(--color-border);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.record__total .record__num {
  font-size: 1.0625rem;
  letter-spacing: 0;
  color: var(--color-primary);
}

@media (max-width: 860px) {
  .record__head { display: none; }

  .record__row,
  .record__total {
    grid-template-columns: 1fr;
    gap: var(--space-3);
    padding: var(--space-6);
  }

  .record__row .record__loc,
  .record__row .record__num,
  .record__total .record__num {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--space-4);
    text-align: left;
  }

  .record__row .record__loc::before,
  .record__row .record__num::before,
  .record__total .record__num::before {
    content: attr(data-label);
    flex: 0 0 auto;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--color-text-muted);
  }

  .record__total > span:empty { display: none; }
}
