/* ==========================================================================
   Cornerstone Advisory Group — Stylesheet
   Structure:
     1.  Custom Properties
     2.  Reset & Normalize
     3.  Base Typography
     4.  Layout Utilities
     5.  Navigation
     6.  Hero
     7.  About
     8.  Services Grid (shared)
     9.  Financial Services
     10. Business Operations
     11. Specialty Section
     12. Contact & Form
     13. Buttons
     14. Footer
     15. Scroll Animations
     16. Media Queries  (768px tablet, 1200px desktop)
     17. Accessibility  (focus, reduced motion)
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. CUSTOM PROPERTIES
   -------------------------------------------------------------------------- */
:root {
  /* ── Brand Colors ───────────────────────────────────────────────────── */
  --navy:            #0D1B2A;
  --navy-mid:        #162537;
  --navy-light:      #1E3350;
  --gold:            #C9A84C;
  --gold-dark:       #A8882E;
  --gold-light:      #DFC278;
  --gold-subtle:     rgba(201, 168, 76, 0.12);
  --gold-subtle-mid: rgba(201, 168, 76, 0.22);

  /* ── Neutrals ───────────────────────────────────────────────────────── */
  --white:           #FFFFFF;
  --off-white:       #F8F7F4;
  --gray-50:         #F2F1EE;
  --gray-100:        #E8E6E1;
  --gray-200:        #D1CEC7;
  --gray-400:        #9A958C;
  --gray-600:        #635E57;
  --gray-800:        #2E2B26;

  /* ── Semantic aliases ───────────────────────────────────────────────── */
  --color-bg:           var(--white);
  --color-bg-alt:       var(--off-white);
  --color-bg-dark:      var(--navy);
  --color-text:         var(--navy);
  --color-text-muted:   var(--gray-600);
  --color-text-light:   rgba(255,255,255,0.80);
  --color-border:       var(--gray-100);
  --color-border-dark:  rgba(255,255,255,0.10);
  --color-accent:       var(--gold);
  --color-accent-dark:  var(--gold-dark);
  --color-error:        #C0392B;
  --color-success:      #1A6B3C;

  /* ── Typography ─────────────────────────────────────────────────────── */
  --font-heading:  'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body:     'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  /* ── Type scale (fluid where beneficial) ────────────────────────────── */
  --text-xs:    0.6875rem;   /* 11px */
  --text-sm:    0.8125rem;   /* 13px */
  --text-base:  1rem;        /* 16px */
  --text-md:    1.0625rem;   /* 17px */
  --text-lg:    1.1875rem;   /* 19px */
  --text-xl:    1.375rem;    /* 22px */
  --text-2xl:   1.75rem;     /* 28px */
  --text-3xl:   2.25rem;     /* 36px */
  --text-4xl:   3rem;        /* 48px */
  --text-5xl:   clamp(2.75rem, 5vw + 1rem, 4.5rem);  /* fluid 44–72px */

  --leading-tight:   1.12;
  --leading-snug:    1.3;
  --leading-normal:  1.65;
  --leading-relaxed: 1.8;

  --tracking-tight:  -0.02em;
  --tracking-normal:  0em;
  --tracking-wide:    0.04em;
  --tracking-widest:  0.12em;

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

  /* ── Layout ──────────────────────────────────────────────────────────── */
  --max-w:         1200px;
  --max-w-narrow:  760px;
  --max-w-xs:      560px;
  --gutter:        clamp(1.25rem, 4vw, 2rem);
  --section-py:    clamp(4rem, 8vw, 7rem);

  /* ── Radii & Shadows ─────────────────────────────────────────────────── */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:  16px;

  --shadow-xs:  0 1px 3px rgba(13,27,42,.06);
  --shadow-sm:  0 2px 8px rgba(13,27,42,.08), 0 1px 2px rgba(13,27,42,.04);
  --shadow-md:  0 4px 20px rgba(13,27,42,.10), 0 2px 6px rgba(13,27,42,.06);
  --shadow-lg:  0 8px 40px rgba(13,27,42,.13), 0 4px 12px rgba(13,27,42,.08);
  --shadow-gold: 0 4px 24px rgba(201,168,76,.20);

  /* ── Transitions ─────────────────────────────────────────────────────── */
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --t-fast:   150ms ease;
  --t-base:   260ms ease;
  --t-slow:   420ms var(--ease-out-quart);

  /* ── Nav ─────────────────────────────────────────────────────────────── */
  --nav-h: 72px;
}


/* --------------------------------------------------------------------------
   2. RESET & NORMALIZE
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
  hanging-punctuation: first last;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
}

img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
ul[role="list"], ol[role="list"] { list-style: none; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; background: none; border: none; }


/* --------------------------------------------------------------------------
   3. BASE TYPOGRAPHY
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: var(--leading-tight);
  color: var(--color-text);
  letter-spacing: var(--tracking-tight);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: clamp(2rem, 3vw + 0.5rem, var(--text-4xl)); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p { line-height: var(--leading-normal); }
p + p { margin-top: var(--sp-4); }

strong { font-weight: 600; }

em {
  font-style: italic;
  font-family: var(--font-heading);
}


/* --------------------------------------------------------------------------
   4. LAYOUT UTILITIES
   -------------------------------------------------------------------------- */
.section-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-block: var(--section-py);
}

.section-header {
  margin-bottom: var(--sp-16);
}

.section-header h2 {
  margin-bottom: var(--sp-4);
}

.section-subhead {
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: 400;
  line-height: var(--leading-relaxed);
  color: var(--color-text-muted);
  max-width: 60ch;
}

/* Divider accent line above section h2 */
.section-header h2::before {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--gold);
  margin-bottom: var(--sp-5);
}

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

.hidden { display: none !important; }


/* --------------------------------------------------------------------------
   5. NAVIGATION
   -------------------------------------------------------------------------- */
#site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 200;
  height: var(--nav-h);
  transition: background-color var(--t-base),
              box-shadow var(--t-base),
              backdrop-filter var(--t-base);
  /* Default: transparent over dark hero */
  background-color: transparent;
}

/* Scrolled state — frosted glass */
#site-header.is-scrolled {
  background-color: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 1px 0 rgba(13,27,42,.08),
              0 4px 24px rgba(13,27,42,.07);
}

#main-nav { height: 100%; }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
  /* Default: white text for transparent nav over dark hero */
  color: var(--white);
  transition: color var(--t-base);
}

#site-header.is-scrolled .nav-inner {
  color: var(--navy);
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-shrink: 0;
}

.logo-wordmark {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  transition: opacity var(--t-fast);
}

.nav-logo:hover .logo-wordmark { opacity: 0.80; }

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
}

.nav-link {
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  opacity: 0.85;
  transition: opacity var(--t-fast), color var(--t-fast);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  inset-block-end: -3px;
  inset-inline: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-base);
}

.nav-link:hover,
.nav-link.is-active {
  opacity: 1;
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

/* "Let's Talk" CTA pill in nav */
.nav-cta {
  padding: 0.5rem 1.25rem;
  border: 1.5px solid var(--gold);
  border-radius: var(--radius-sm);
  color: var(--gold) !important;
  opacity: 1 !important;
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  transition: background-color var(--t-fast),
              color var(--t-fast),
              border-color var(--t-fast);
}

.nav-cta::after { display: none; }

.nav-cta:hover {
  background-color: var(--gold);
  color: var(--navy) !important;
}

/* Hamburger toggle — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: var(--sp-2);
  border-radius: var(--radius-sm);
  color: inherit;
  transition: background-color var(--t-fast);
}

.nav-toggle:hover { background-color: rgba(255,255,255,0.08); }
#site-header.is-scrolled .nav-toggle:hover { background-color: rgba(13,27,42,0.06); }

.hamburger-bar {
  display: block;
  width: 100%;
  height: 1.5px;
  background-color: currentColor;
  border-radius: 2px;
  transition: transform var(--t-base), opacity var(--t-fast), width var(--t-base);
  transform-origin: center;
}

/* Animate hamburger → X when open */
.nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}


/* --------------------------------------------------------------------------
   6. HERO
   -------------------------------------------------------------------------- */
#hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  background-color: var(--navy);
  /*
   * Placeholder: Unsplash photo — modern corporate meeting room.
   * Replace with a local asset before launch:
   *   background-image: url('../images/hero-bg.jpg');
   */
  background-image: url('https://images.unsplash.com/photo-1542744173-8e7e53415bb0?auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center 30%;
  overflow: hidden;
}

/* Gradient overlay — ready for background image; also adds depth to flat color */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      135deg,
      rgba(13, 27, 42, 0.97) 0%,
      rgba(22, 37, 55, 0.85) 60%,
      rgba(30, 51, 80, 0.70) 100%
    );
  z-index: 1;
}

/* Decorative gold accent — top-right corner geometric shape */
#hero::after {
  content: '';
  position: absolute;
  inset-block-start: 0;
  inset-inline-end: 0;
  width: clamp(280px, 35vw, 520px);
  height: clamp(280px, 35vw, 520px);
  background: radial-gradient(
    ellipse at top right,
    rgba(201, 168, 76, 0.08) 0%,
    transparent 65%
  );
  z-index: 1;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding-block-start: calc(var(--nav-h) + var(--sp-16));
  padding-block-end: var(--sp-32);
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Eyebrow — tagline above h1 */
.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--sp-6);
  padding-bottom: var(--sp-4);
  position: relative;
}

.hero-eyebrow::after {
  content: '';
  position: absolute;
  inset-block-end: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, var(--gold), transparent);
  opacity: 0.5;
}

#hero h1 {
  font-size: var(--text-5xl);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--white);
  max-width: 13ch;
  margin-bottom: var(--sp-8);
}

#hero h1 em {
  font-style: italic;
  font-weight: 300;
  color: var(--gold-light);
}

.hero-subhead {
  font-size: clamp(1rem, 1.5vw + 0.25rem, 1.125rem);
  font-weight: 300;
  line-height: var(--leading-relaxed);
  color: var(--color-text-light);
  max-width: 52ch;
  margin-bottom: var(--sp-12);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
}

/* Hero scroll indicator */
.hero-inner::after {
  content: '';
  position: absolute;
  inset-block-end: var(--sp-10);
  inset-inline-start: var(--gutter);
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  opacity: 0.5;
  animation: scrollPulse 2.5s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.25; transform: scaleY(1); }
  50%       { opacity: 0.6;  transform: scaleY(1.1); }
}


/* --------------------------------------------------------------------------
   7. ABOUT
   -------------------------------------------------------------------------- */
#about {
  background-color: var(--color-bg-alt);
  position: relative;
}

/* Full-width photo between the section header and the two-column body */
.about-photo {
  width: 100%;
  margin-bottom: var(--sp-16);
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 21 / 8;
  box-shadow: var(--shadow-md);
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
  transition: transform 0.9s var(--ease-out-quart);
}

.about-photo:hover img {
  transform: scale(1.025);
}

.about-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-20);
  align-items: start;
}

.about-prose p {
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--color-text-muted);
}

/* Value props list */
.value-props {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-block-start: 1px solid var(--color-border);
}

.value-prop-item {
  padding-block: var(--sp-8);
  border-block-end: 1px solid var(--color-border);
  padding-inline-start: var(--sp-6);
  position: relative;
  transition: padding-inline-start var(--t-base);
}

/* Gold left accent bar */
.value-prop-item::before {
  content: '';
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 2px;
  background: var(--gold);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--t-slow);
}

.value-prop-item:hover::before { transform: scaleY(1); }

.value-prop-item h3 {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: var(--sp-2);
}

.value-prop-item p {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--color-text-muted);
}


/* --------------------------------------------------------------------------
   8. SERVICES GRID (shared by Financial & Operations)
   -------------------------------------------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-6);
}

.service-card {
  background: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--sp-8) var(--sp-6);
  position: relative;
  overflow: hidden;
  transition: transform var(--t-slow),
              box-shadow var(--t-slow),
              border-color var(--t-base);
}

/* Gold top border that slides in on hover */
.service-card::before {
  content: '';
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-slow);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.service-card:hover::before {
  transform: scaleX(1);
}

/* Icon */
.service-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--gold-subtle);
  color: var(--gold-dark);
  margin-bottom: var(--sp-5);
  font-size: 1.1rem;
  transition: background-color var(--t-base), color var(--t-base);
}

.service-card:hover .service-icon {
  background: var(--gold);
  color: var(--navy);
}

.service-card h3 {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--navy);
  margin-bottom: var(--sp-3);
  line-height: var(--leading-snug);
}

.service-card p {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--color-text-muted);
}


/* --------------------------------------------------------------------------
   9. FINANCIAL SERVICES
   -------------------------------------------------------------------------- */
#financial-services {
  background-color: var(--color-bg);
}


/* --------------------------------------------------------------------------
   10. BUSINESS OPERATIONS
   -------------------------------------------------------------------------- */
#business-operations {
  background-color: var(--color-bg-alt);
}

/* On alt bg, cards get a hair of extra border to distinguish */
#business-operations .service-card {
  background: var(--white);
  box-shadow: var(--shadow-xs);
}


/* --------------------------------------------------------------------------
   11. SPECIALTY SECTION
   -------------------------------------------------------------------------- */
#specialty {
  background-color: var(--navy);
  /*
   * Placeholder: Unsplash photo — dietary supplements / health food.
   * Replace with a local asset before launch:
   *   background-image: …, url('../images/specialty-bg.jpg');
   */
  background-image:
    linear-gradient(
      to bottom,
      rgba(13, 27, 42, 0.91) 0%,
      rgba(13, 27, 42, 0.87) 50%,
      rgba(13, 27, 42, 0.94) 100%
    ),
    url('https://images.unsplash.com/photo-1490645935967-10de6ba17061?auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
  overflow: hidden;
}

/* Decorative radial glow — bottom left */
#specialty::before {
  content: '';
  position: absolute;
  inset-block-end: -10%;
  inset-inline-start: -5%;
  width: clamp(300px, 40vw, 600px);
  height: clamp(300px, 40vw, 600px);
  background: radial-gradient(
    ellipse,
    rgba(201, 168, 76, 0.07) 0%,
    transparent 65%
  );
  pointer-events: none;
}

/* Fine horizontal rule texture across top */
#specialty::after {
  content: '';
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(201,168,76,0.4) 30%,
    rgba(201,168,76,0.4) 70%,
    transparent
  );
}

#specialty .section-inner {
  position: relative;
  z-index: 1;
}

#specialty .section-header h2 {
  color: var(--white);
  font-size: clamp(2rem, 3vw + 0.5rem, 3.25rem);
}

/* Override the gold accent line above h2 to match dark bg */
#specialty .section-header h2::before {
  background: var(--gold);
}

.specialty-body {
  max-width: var(--max-w-narrow);
}

.specialty-body p {
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: rgba(255,255,255,0.75);
  margin-bottom: var(--sp-6);
}

.specialty-body p:last-of-type {
  color: rgba(255,255,255,0.92);
  font-style: italic;
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 400;
  line-height: var(--leading-snug);
  padding-block: var(--sp-6);
  border-block: 1px solid rgba(201,168,76,0.2);
  margin-block: var(--sp-8);
}

.specialty-cta {
  margin-block-start: var(--sp-4);
}


/* --------------------------------------------------------------------------
   12. CONTACT & FORM
   -------------------------------------------------------------------------- */
#contact {
  background-color: var(--color-bg);
}

#contact .section-header h2 {
  color: var(--navy);
}

/* Constrain both the form and thank-you card to the same width */
#contact-form,
#form-thank-you {
  max-width: var(--max-w-narrow);
}

.form-row--two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-6);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
}

.form-group label {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--navy);
  line-height: 1;
}

/* Red asterisk on required fields */
.field-required {
  color: var(--color-error);
  font-size: 0.9em;
  line-height: 1;
}

/* "Optional" pill badge */
.field-optional {
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--gray-400);
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-full);
  padding: 0.15em 0.55em;
  line-height: 1.5;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.8125rem 1rem;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--navy);
  line-height: var(--leading-normal);
  appearance: none;
  -webkit-appearance: none;
  transition:
    border-color var(--t-fast),
    box-shadow   var(--t-fast),
    background   var(--t-fast);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--gray-400);
  font-weight: 300;
}

/* Hover */
.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
  border-color: var(--gray-400);
}

/* Focus — gold ring */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-subtle-mid);
  background: #FFFDF5;
}

/* Custom chevron for <select> */
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%230D1B2A' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-inline-end: 2.75rem;
  cursor: pointer;
}

.form-group textarea {
  resize: vertical;
  min-height: 160px;
}

/* Inline validation */
.form-group input:invalid:not(:placeholder-shown),
.form-group textarea:invalid:not(:placeholder-shown) {
  border-color: rgba(192,57,43,0.50);
}

/* ── Required fields note ────────────────────────────────────────────────── */
.form-required-note {
  font-size: var(--text-xs);
  color: var(--gray-400);
  margin-bottom: var(--sp-5);
  letter-spacing: 0.01em;
}

.form-required-note span { color: var(--color-error); }

/* ── Submit row ──────────────────────────────────────────────────────────── */
.form-actions {
  margin-top: var(--sp-2);
}

/* ── Inline error banner (API failure only) ──────────────────────────────── */
#form-error[hidden] { display: none; }
#form-error {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
  padding: var(--sp-4) var(--sp-5);
  background: rgba(192,57,43,0.05);
  border: 1px solid rgba(192,57,43,0.20);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--color-error);
}

/* ── Thank-you card ──────────────────────────────────────────────────────── */

/* Hidden state: belt-and-suspenders with the HTML `hidden` attribute.
   The inline style="display:none" on the element is the third layer. */
#form-thank-you {
  display: none;
}

/* Revealed state: JS removes `hidden` attribute → this rule takes over */
#form-thank-you:not([hidden]) {
  display: block;
  animation: thankYouReveal 0.55s var(--ease-out-quart) both;
}

@keyframes thankYouReveal {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.thank-you-inner {
  padding: var(--sp-12);
  background: var(--white);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.thank-you-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--gold-subtle);
  color: var(--gold-dark);
  font-size: 1.75rem;
  margin-bottom: var(--sp-6);
}

.thank-you-inner h3 {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 500;
  color: var(--navy);
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--sp-4);
}

.thank-you-inner p {
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--color-text-muted);
  max-width: 44ch;
  margin-inline: auto;
  margin-bottom: var(--sp-8);
}


/* --------------------------------------------------------------------------
   13. BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.875rem 2rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  border: 1.5px solid transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background-color var(--t-base),
              color var(--t-base),
              border-color var(--t-base),
              box-shadow var(--t-base),
              transform var(--t-fast);
  white-space: nowrap;
}

.btn:active { transform: translateY(1px); }

/* Shine sweep on hover */
.btn::after {
  content: '';
  position: absolute;
  inset-block: 0;
  inset-inline-start: -75%;
  width: 50%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.15),
    transparent
  );
  transform: skewX(-15deg);
  transition: inset-inline-start var(--t-slow);
}

.btn:hover::after { inset-inline-start: 125%; }

/* Primary — gold fill */
.btn-primary {
  background-color: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
  box-shadow: 0 2px 8px rgba(201,168,76,.30);
}

.btn-primary:hover {
  background-color: var(--gold-dark);
  border-color: var(--gold-dark);
  box-shadow: var(--shadow-gold);
  color: var(--white);
}

/* Secondary — navy outline */
.btn-secondary {
  background-color: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.40);
}

.btn-secondary:hover {
  background-color: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.70);
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
  cursor: not-allowed;
}

/* Navy — used for the form submit button */
.btn-navy {
  background-color: var(--navy);
  color: var(--white);
  border-color: var(--navy);
  box-shadow: var(--shadow-sm);
}

.btn-navy:hover {
  background-color: var(--navy-light);
  border-color: var(--navy-light);
  box-shadow: var(--shadow-md);
  color: var(--gold-light);
}

/* Full-width modifier */
.btn-full {
  width: 100%;
  justify-content: center;
  padding-block: 1rem;
}

/* Ghost — tertiary action, e.g. "Send another message" */
.btn-ghost {
  background-color: transparent;
  color: var(--navy);
  border-color: var(--gray-200);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  padding: 0.625rem 1.5rem;
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold-dark);
  background-color: var(--gold-subtle);
}


/* --------------------------------------------------------------------------
   14. FOOTER
   -------------------------------------------------------------------------- */
#site-footer {
  background-color: var(--navy);
  position: relative;
}

/* Subtle top rule */
#site-footer::before {
  content: '';
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(201,168,76,0.35) 25%,
    rgba(201,168,76,0.35) 75%,
    transparent
  );
}

.footer-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-block: var(--sp-16) var(--sp-12);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items: start;
  gap: var(--sp-10) var(--sp-20);
}

.footer-brand { grid-column: 1; grid-row: 1; }

.footer-wordmark {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--white);
  letter-spacing: -0.01em;
  line-height: 1;
  margin-bottom: var(--sp-2);
}

.footer-tagline {
  font-size: var(--text-sm);
  font-weight: 300;
  color: var(--gold-light);
  letter-spacing: var(--tracking-wide);
}

.footer-nav {
  grid-column: 2;
  grid-row: 1;
  padding-block-start: var(--sp-1);
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  align-items: flex-end;
}

.footer-nav a {
  font-size: var(--text-sm);
  font-weight: 400;
  color: rgba(255,255,255,0.60);
  letter-spacing: var(--tracking-wide);
  transition: color var(--t-fast);
}

.footer-nav a:hover { color: var(--gold-light); }

.footer-legal {
  grid-column: 1 / -1;
  grid-row: 2;
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.30);
  letter-spacing: 0.03em;
  padding-block-start: var(--sp-8);
  border-block-start: 1px solid rgba(255,255,255,0.07);
}


/* --------------------------------------------------------------------------
   15. SCROLL ANIMATIONS
   -------------------------------------------------------------------------- */

/* Hero content fades in on page load (not scroll-triggered — always plays) */
.hero-inner {
  animation: heroDrop 0.9s var(--ease-out-quart) both;
}

@keyframes heroDrop {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0);    }
}

/* ── Generic scroll-reveal contract ────────────────────────────────────────
   Any element in the HTML that carries the `fade-in-up` class starts
   invisible. JS (IntersectionObserver) adds `visible` once the element
   enters the viewport; this block handles everything after that.
   ──────────────────────────────────────────────────────────────────────── */
.fade-in-up {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity  0.65s var(--ease-out-quart),
    transform 0.65s var(--ease-out-quart);
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays — applied to direct children of the services grid so each
   card fires slightly after the previous one.  Works for both 4-col and
   2-col layouts because nth-child is layout-agnostic. */
.services-grid > .fade-in-up:nth-child(1) { transition-delay:   0ms; }
.services-grid > .fade-in-up:nth-child(2) { transition-delay:  90ms; }
.services-grid > .fade-in-up:nth-child(3) { transition-delay: 180ms; }
.services-grid > .fade-in-up:nth-child(4) { transition-delay: 270ms; }

/* Relative stagger within the about two-column layout */
.about-prose.fade-in-up { transition-delay:  80ms; }
.value-props.fade-in-up { transition-delay: 180ms; }


/* --------------------------------------------------------------------------
   16. MEDIA QUERIES
   -------------------------------------------------------------------------- */

/* ── Tablet (≤ 1200px) — 2-col service grid ─────────────────────────────── */
@media (max-width: 1200px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-grid > .fade-in-up:nth-child(3) { transition-delay: 0ms;  }
  .services-grid > .fade-in-up:nth-child(4) { transition-delay: 80ms; }

  .about-body {
    gap: var(--sp-12);
  }
}

/* ── Tablet (≤ 768px) ────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --nav-h: 64px;
  }

  /* Nav goes full-screen dropdown */
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: fixed;
    inset-block-start: var(--nav-h);
    inset-inline: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background-color: var(--navy);
    padding: var(--sp-4) var(--gutter) var(--sp-8);
    box-shadow: 0 8px 32px rgba(0,0,0,.3);
    /* ensure it renders in dark mode regardless of scroll state */
    color: var(--white);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
    border-block-end: 1px solid rgba(255,255,255,0.07);
  }

  .nav-links li:last-child { border-block-end: none; }

  .nav-link {
    display: block;
    padding-block: var(--sp-4);
    opacity: 0.80;
    font-size: var(--text-base);
    letter-spacing: var(--tracking-wide);
  }

  .nav-link::after { display: none; }

  .nav-cta {
    display: inline-flex;
    margin-block-start: var(--sp-4);
    border-color: var(--gold) !important;
    color: var(--gold) !important;
  }

  /* Ensure nav text is always white when menu open (dark dropdown bg) */
  .nav-links .nav-link { color: var(--white) !important; }
  .nav-links .nav-cta  { color: var(--gold)  !important; }

  /* About — stack columns */
  .about-body {
    grid-template-columns: 1fr;
    gap: var(--sp-10);
  }

  /* Services — 1-col */
  .services-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-4);
  }

  /* Remove stagger on mobile (feels slow) */
  .services-grid > .fade-in-up { transition-delay: 0ms !important; }

  /* About photo — tighter crop on small screens */
  .about-photo { aspect-ratio: 16 / 7; }

  /* Disable fixed attachment — causes jank on iOS */
  #specialty { background-attachment: scroll; }

  /* Form — single column */
  .form-row--two-col {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .thank-you-inner {
    padding: var(--sp-8) var(--sp-6);
  }

  /* Hero */
  .hero-inner::after { display: none; } /* hide scroll line */

  #hero h1 { max-width: none; }

  /* Footer — stack grid */
  .footer-inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: var(--sp-8);
  }

  .footer-nav { grid-column: 1; grid-row: 2; }
  .footer-nav ul { align-items: flex-start; flex-direction: row; flex-wrap: wrap; gap: var(--sp-3) var(--sp-6); }
  .footer-legal { grid-row: 3; }
}

/* ── Small mobile (≤ 480px) ─────────────────────────────────────────────── */
@media (max-width: 480px) {
  .btn {
    padding: 0.8125rem 1.5rem;
    font-size: 0.75rem;
  }

  #hero h1 {
    letter-spacing: -0.02em;
  }

  .service-card { padding: var(--sp-6) var(--sp-5); }
}


/* --------------------------------------------------------------------------
   17. ACCESSIBILITY
   -------------------------------------------------------------------------- */

/* Focus-visible ring */
:focus-visible {
  outline: 2.5px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Skip to main content link */
a.skip-link {
  position: absolute;
  inset-block-start: -100%;
  inset-inline-start: var(--gutter);
  z-index: 9999;
  padding: var(--sp-3) var(--sp-6);
  background: var(--navy);
  color: var(--gold);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-decoration: none;
  transition: inset-block-start var(--t-fast);
}

a.skip-link:focus-visible {
  inset-block-start: 0;
  outline: none;
}

/* Reduced motion — kill all animations and transitions */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  /* Reveal all fade-in-up elements immediately — skip the animation */
  .fade-in-up {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
