@layer reset, tokens, layout, components, utilities;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; }
  body { min-height: 100vh; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
  img { max-width: 100%; display: block; }
  a { text-decoration: none; color: inherit; }
  button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
  ul { list-style: none; }
  input, textarea { font: inherit; }
}

@layer tokens {
  :root {
    --canvas-bg: #faf7f2;
    --canvas-alt: #f1ece2;
    --surface: #ffffff;
    --ink-900: #1a1e24;
    --ink-700: #3d4550;
    --ink-500: #6c7480;
    --ink-300: #9aa1ab;
    --line: #e3ddce;
    --primary-900: #142943;
    --primary-700: #1f3a5f;
    --primary-500: #33587f;
    --accent-500: #d97b3f;
    --accent-600: #bd6329;
    --accent-tint: #f7ddc0;
    --teal-500: #4a7c74;
    --teal-700: #33564f;
    --dark-bg: #0f131a;
    --dark-surface: #171d27;
    --dark-line: #2a323e;
    --dark-text: #eef1f5;
    --dark-text-soft: #b6bec9;

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 26px;
    --radius-xl: 40px;
    --radius-pill: 999px;

    --space-3xs: .25rem;
    --space-2xs: .5rem;
    --space-xs: .75rem;
    --space-sm: 1.25rem;
    --space-md: 2rem;
    --space-lg: 3.25rem;
    --space-xl: 5rem;
    --space-2xl: 7.5rem;
    --space-3xl: 10rem;

    --shadow-sm: 0 1px 2px rgba(26,30,36,.06), 0 1px 1px rgba(26,30,36,.05);
    --shadow-md: 0 10px 26px -10px rgba(26,30,36,.22), 0 2px 8px rgba(26,30,36,.08);
    --shadow-lg: 0 30px 60px -20px rgba(26,30,36,.32), 0 10px 20px -8px rgba(26,30,36,.14);
    --shadow-glow-accent: 0 10px 34px -8px rgba(217,123,63,.5);
    --shadow-glow-teal: 0 10px 34px -8px rgba(74,124,116,.45);

    --font-heading: 'Crimson Pro', serif;
    --font-body: 'Albert Sans', sans-serif;

    --ease: cubic-bezier(.22,.9,.32,1);
  }
}

@layer layout {
  html, body { background: var(--canvas-bg); color: var(--ink-900); font-family: var(--font-body); }
  body.canvas { overflow-x: hidden; }
  main { display: block; }
  .stage, .gallery { position: relative; padding-inline: var(--space-md); }
  [data-section-theme] { transition: background .4s ease, color .4s ease; }
  [data-section-theme="dark"] { background: var(--dark-bg); color: var(--dark-text-soft); }
  [data-section-theme="dark"] h1, [data-section-theme="dark"] h2, [data-section-theme="dark"] h3 { color: var(--dark-text); }
  .stage { padding-block: calc(var(--space-3xl) + 2rem) var(--space-2xl); min-height: 92vh; display: flex; align-items: center; }
  .stage--sub { min-height: 56vh; padding-block: calc(var(--space-2xl) + 2rem) var(--space-xl); }
  .stage--legal { min-height: 40vh; }
  .stage--thanks { min-height: 80vh; }
  .gallery { padding-block: var(--space-2xl); max-width: 1360px; margin-inline: auto; }
  .gallery--intro, .gallery--location, .gallery--interviews, .gallery--permits { display: grid; grid-template-columns: 1fr; gap: var(--space-lg); align-items: center; }
  .gallery-offset { max-width: 640px; }
  .gallery-offset--right { justify-self: start; }
  .gallery-offset--left { justify-self: end; text-align: right; }
  .gallery-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; height: 420px; object-fit: cover; }
  @media (min-width: 900px) {
    .gallery--intro, .gallery--location, .gallery--interviews, .gallery--permits {
      grid-template-columns: repeat(2, 1fr);
    }
    .gallery--intro .gallery-offset--right, .gallery--interviews .gallery-offset--right { grid-column: 7 / 13; }
    .gallery--intro .gallery-media, .gallery--interviews .gallery-media { grid-column: 1 / 6; }
    .gallery--location .gallery-media--first { grid-column: 1 / 6; }
    .gallery--location .gallery-offset--right { grid-column: 7 / 13; }
    .gallery--permits .gallery-media { grid-column: 1 / 6; }
    .gallery--permits .gallery-offset--left { grid-column: 7 / 13; text-align: left; justify-self: start; }
  }
}

@layer components {

  .dot-grid { position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background-image: radial-gradient(circle, rgba(20,41,67,.14) 1.4px, transparent 1.4px);
    background-size: 26px 26px; opacity: .7; }
  .stage-bg--dark { background-image: radial-gradient(circle, rgba(238,241,245,.1) 1.4px, transparent 1.4px); }
  .stage-content, .stage-content * { position: relative; z-index: 1; }

  
  .canvas-header { position: fixed; top: 0; left: 0; width: 100%; z-index: 900; perspective: 1600px; }
  .drawer-flip { position: relative; height: 84px; transform-style: preserve-3d; transition: height .6s var(--ease), transform .8s var(--ease); }
  .drawer-flip.is-open { height: 100vh; transform: rotateX(180deg); }
  .drawer-face { position: absolute; inset: 0; backface-visibility: hidden; }
  .drawer-face--front { background: rgba(250,247,242,.86); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(20,41,67,.08); transition: background .4s ease, border-color .4s ease; }
  .drawer-face--back { transform: rotateX(180deg); background: var(--primary-900); display: flex; flex-direction: column; align-items: center; justify-content: center; }

  .header-row { max-width: 1360px; margin-inline: auto; height: 84px; display: flex; align-items: center; justify-content: space-between; padding-inline: var(--space-md); }
  .brand { display: flex; align-items: center; gap: .6rem; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-name { font-family: var(--font-heading); font-weight: 600; font-size: 1.3rem; letter-spacing: .01em; color: var(--ink-900); transition: color .4s ease; }

  .nav-desktop { display: none; gap: var(--space-md); }
  .nav-desktop a { font-size: .95rem; font-weight: 500; color: var(--ink-700); position: relative; padding-block: .3rem; transition: color .35s ease; }
  .nav-desktop a::after { content: ''; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: var(--accent-500); transition: width .35s var(--ease); }
  .nav-desktop a:hover::after, .nav-desktop a.is-active::after { width: 100%; }
  .nav-desktop a.is-active { color: var(--ink-900); }

  .hamburger { width: 44px; height: 44px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border-radius: var(--radius-sm); }
  .hamburger span { width: 22px; height: 2px; background: var(--ink-900); border-radius: 2px; transition: background .3s ease; }
  .hamburger--close { color: var(--dark-text); font-size: 1.4rem; position: absolute; top: 20px; right: 20px; }

  .canvas-header[data-theme="dark"] .drawer-face--front { background: rgba(15,19,26,.75); border-color: rgba(238,241,245,.1); }
  .canvas-header[data-theme="dark"] .brand-name,
  .canvas-header[data-theme="dark"] .nav-desktop a { color: var(--dark-text); }
  .canvas-header[data-theme="dark"] .hamburger span { background: var(--dark-text); }

  .nav-mobile { display: flex; flex-direction: column; align-items: center; gap: var(--space-md); }
  .nav-mobile a { font-family: var(--font-heading); font-size: 1.8rem; color: var(--dark-text); font-weight: 600; transition: color .3s ease, transform .3s ease; }
  .nav-mobile a:hover { color: var(--accent-500); transform: translateX(6px); }

  @media (min-width: 880px) {
    .nav-desktop { display: flex; }
    .hamburger { display: none; }
  }

  
  .stage-eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-600); font-weight: 600; margin-bottom: var(--space-sm); }
  .stage-title { font-family: var(--font-heading); font-weight: 700; line-height: .98; font-size: clamp(2.8rem, 9vw, 7.2rem); color: var(--ink-900); letter-spacing: -.01em; }
  .stage-title--sub { font-size: clamp(2.3rem, 6vw, 4.4rem); line-height: 1.05; }
  .stage-sub { margin-top: var(--space-md); font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--ink-700); max-width: 640px; line-height: 1.65; }
  .stage-content { max-width: 900px; }
  .stage-content .btn { margin-top: var(--space-lg); }

  
  .btn { display: inline-flex; align-items: center; gap: .6rem; padding: .95rem 1.8rem; border-radius: var(--radius-pill); font-weight: 600; font-size: .98rem; transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .35s var(--ease), color .35s var(--ease); min-height: 44px; }
  .btn--solid { background: var(--primary-700); color: #fff; box-shadow: var(--shadow-md); }
  .btn--solid:hover { background: var(--primary-900); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
  .btn--ghost { border: 1.5px solid var(--ink-900); color: var(--ink-900); }
  .btn--ghost:hover { background: var(--ink-900); color: var(--canvas-bg); transform: translateY(-3px); box-shadow: var(--shadow-md); }
  .btn--ghost-dark { border-color: var(--dark-text); color: var(--dark-text); }
  .btn--ghost-dark:hover { background: var(--dark-text); color: var(--dark-bg); }
  .btn--full { width: 100%; justify-content: center; }

  
  .spotlight-tag { display: inline-block; font-size: .8rem; letter-spacing: .07em; text-transform: uppercase; font-weight: 600; color: var(--accent-600); margin-bottom: .8rem; }
  .spotlight-tag--dark { color: var(--accent-500); }

  
  .gallery-heading { max-width: 720px; margin-bottom: var(--space-lg); }
  .gallery-heading--center { margin-inline: auto; text-align: center; }
  .gallery-heading h2, .gallery-offset h2, .interview-body h3 { font-family: var(--font-heading); font-size: clamp(1.9rem, 3.4vw, 2.9rem); font-weight: 600; line-height: 1.15; margin-bottom: var(--space-sm); color: inherit; }
  .gallery-lead { color: var(--ink-500); font-size: 1.05rem; line-height: 1.6; }
  .gallery-offset p { color: var(--ink-700); line-height: 1.75; margin-bottom: var(--space-sm); font-size: 1.02rem; }
  .dark-text, .dark-text p, .dark-text h2 { color: var(--dark-text); }
  .dark-text .gallery-lead { color: var(--dark-text-soft); }

  
  .shelf { display: grid; gap: var(--space-md); grid-template-columns: 1fr; }
  .shelf--cards { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .shelf--split { grid-template-columns: 1fr; }
  .shelf--values { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

  @media (min-width: 760px) {
    .shelf--split { grid-template-columns: 1fr 1fr; }
  }

  .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-md); box-shadow: var(--shadow-sm); transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease); }
  .card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: transparent; }
  .card h3 { font-family: var(--font-heading); font-size: 1.35rem; font-weight: 600; margin-bottom: .7rem; color: var(--ink-900); }
  .card p { color: var(--ink-700); line-height: 1.65; font-size: .98rem; }
  .card-icon { width: 52px; height: 52px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-md); background: var(--canvas-alt); color: var(--primary-700); font-size: 1.35rem; margin-bottom: var(--space-sm); transition: box-shadow .4s ease, background .4s ease; }
  .card:hover .card-icon { box-shadow: var(--shadow-glow-accent); background: var(--accent-tint); color: var(--accent-600); }
  .card-icon--accent { background: var(--accent-tint); color: var(--accent-600); }
  .card-icon--teal { background: #e2ede9; color: var(--teal-700); }
  .card--wide p { margin-bottom: var(--space-xs); }
  .card--value { text-align: left; }
  .card--dark { background: var(--dark-surface); border-color: var(--dark-line); }
  .card--dark h3 { color: var(--dark-text); }
  .card--dark p { color: var(--dark-text-soft); }
  .card--dark .card-icon { background: rgba(238,241,245,.08); color: var(--accent-500); }

  
  .cost-table { margin-top: var(--space-md); border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--dark-line); }
  .cost-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr; }
  .cost-row > span { padding: 1rem 1.1rem; font-size: .95rem; border-bottom: 1px solid var(--dark-line); color: var(--dark-text-soft); }
  .cost-row:last-child > span { border-bottom: none; }
  .cost-row--head { background: rgba(238,241,245,.06); }
  .cost-row--head > span { color: var(--dark-text); font-weight: 600; }
  .cost-note { margin-top: var(--space-sm); font-size: .9rem; color: var(--dark-text-soft); }

  .revenue-disclaimer { margin-top: var(--space-md); font-size: .92rem; color: var(--ink-500); display: flex; gap: .5rem; align-items: flex-start; max-width: 800px; }

  .permit-list { display: flex; flex-direction: column; gap: .85rem; margin: var(--space-sm) 0; }
  .permit-list li { display: flex; gap: .7rem; align-items: flex-start; color: var(--dark-text-soft); line-height: 1.55; }
  .permit-list i { color: var(--accent-500); margin-top: .3rem; }

  
  .interview-card { display: grid; grid-template-columns: 1fr; gap: var(--space-lg); align-items: center; background: var(--surface); border-radius: var(--radius-xl); padding: var(--space-md); box-shadow: var(--shadow-md); }
  .interview-card--dark { background: var(--dark-surface); }
  .interview-media img { border-radius: var(--radius-lg); height: 340px; object-fit: cover; width: 100%; }
  @media (min-width: 860px) {
    .interview-card { grid-template-columns: .9fr 1.1fr; padding: var(--space-lg); }
    .interview-card--reverse { grid-template-columns: 1.1fr .9fr; }
    .interview-card--reverse .interview-media { order: 2; }
  }

  
  .canvas-footer { background: var(--dark-bg); color: var(--dark-text-soft); padding-block: var(--space-2xl) var(--space-md); margin-top: 0; }
  .footer-top { max-width: 1360px; margin-inline: auto; padding-inline: var(--space-md); display: grid; gap: var(--space-lg); grid-template-columns: 1fr; }
  .footer-brand { max-width: 380px; }
  .footer-brand p { margin-top: var(--space-sm); line-height: 1.65; font-size: .93rem; }
  .brand-mark--footer { width: 30px; height: 30px; }
  .footer-brand .brand-name { color: var(--dark-text); }
  .footer-cols { display: grid; gap: var(--space-lg); grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
  .footer-col h4 { font-family: var(--font-heading); color: var(--dark-text); font-size: 1.05rem; margin-bottom: var(--space-sm); }
  .footer-col a, .footer-col p { display: block; font-size: .92rem; margin-bottom: .65rem; color: var(--dark-text-soft); transition: color .3s ease; }
  .footer-col a:hover { color: var(--accent-500); }
  .footer-col p i { color: var(--accent-500); margin-right: .4rem; width: 14px; }
  @media (min-width: 900px) { .footer-top { grid-template-columns: 1.1fr 2fr; } }
  .footer-bottom { max-width: 1360px; margin: var(--space-lg) auto 0; padding: var(--space-sm) var(--space-md) 0; border-top: 1px solid var(--dark-line); font-size: .85rem; text-align: center; }

  
  .contact-grid { display: grid; gap: var(--space-lg); grid-template-columns: 1fr; }
  @media (min-width: 940px) { .contact-grid { grid-template-columns: 1.2fr .8fr; } }
  .contact-form-wrap h2, .contact-side h3 { font-family: var(--font-heading); font-size: 1.6rem; margin-bottom: var(--space-md); }
  .form-floating { display: flex; flex-direction: column; gap: var(--space-sm); }
  .field-float { position: relative; }
  .field-float input, .field-float textarea {
    width: 100%; padding: 1.3rem 1rem .75rem; border: 1.5px solid var(--line); border-radius: var(--radius-md);
    background: var(--surface); color: var(--ink-900); transition: border-color .3s ease, box-shadow .3s ease;
  }
  .field-float textarea { min-height: 130px; resize: vertical; }
  .field-float input:focus, .field-float textarea:focus { outline: none; border-color: var(--primary-500); box-shadow: 0 0 0 4px rgba(31,58,95,.12); }
  .field-float label { position: absolute; left: 1rem; top: 1.05rem; font-size: 1rem; color: var(--ink-500); pointer-events: none; transition: all .25s var(--ease); background: transparent; padding-inline: .2rem; }
  .field-float input:focus + label, .field-float input:not(:placeholder-shown) + label,
  .field-float textarea:focus + label, .field-float textarea:not(:placeholder-shown) + label {
    top: -.55rem; left: .75rem; font-size: .78rem; color: var(--primary-700); background: var(--surface); font-weight: 600;
  }
  .field-float--phone .label-phone { display: none; }
  .checkbox-row { display: flex; gap: .7rem; align-items: flex-start; font-size: .9rem; color: var(--ink-700); line-height: 1.5; }
  .checkbox-row input { margin-top: .3rem; width: 18px; height: 18px; accent-color: var(--primary-700); }
  .checkbox-row a { color: var(--primary-700); font-weight: 600; }
  .form-note { font-size: .88rem; color: var(--accent-600); min-height: 1.2em; }

  .card--contact-info p { margin-bottom: .7rem; color: var(--ink-700); }
  .card--contact-info p i { color: var(--accent-600); margin-right: .5rem; width: 16px; }
  .map-wrap { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); margin-block: var(--space-md); }
  .card--newsletter p { margin-bottom: var(--space-sm); }
  .newsletter-form { display: flex; flex-direction: column; gap: .8rem; }
  .newsletter-form input { padding: .9rem 1rem; border-radius: var(--radius-md); border: 1.5px solid var(--line); }
  .newsletter-form input:focus { outline: none; border-color: var(--primary-500); }

  
  .thanks-box { text-align: center; max-width: 560px; margin-inline: auto; position: relative; z-index: 1; }
  .thanks-icon { font-size: 4rem; color: var(--accent-500); margin-bottom: var(--space-md); filter: drop-shadow(0 8px 20px rgba(217,123,63,.4)); }
  .thanks-box h1 { font-family: var(--font-heading); font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: var(--space-sm); }
  .thanks-box p { color: var(--ink-700); line-height: 1.7; margin-bottom: var(--space-lg); }

  
  .legal-accordion { max-width: 880px; margin-inline: auto; display: flex; flex-direction: column; gap: var(--space-sm); }
  .accordion-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); }
  .accordion-head { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 1.2rem 1.5rem; font-weight: 600; font-size: 1.02rem; text-align: left; }
  .accordion-head i { transition: transform .35s var(--ease); color: var(--accent-600); }
  .accordion-item.is-open .accordion-head i { transform: rotate(180deg); }
  .accordion-body { max-height: 0; overflow: hidden; transition: max-height .45s var(--ease), padding .45s var(--ease); padding: 0 1.5rem; }
  .accordion-item.is-open .accordion-body { max-height: 600px; padding: 0 1.5rem 1.3rem; }
  .accordion-body p { color: var(--ink-700); line-height: 1.7; }

  
  .drawer-cookie-overlay { position: fixed; inset: 0; background: rgba(15,19,26,.55); z-index: 1200; opacity: 0; pointer-events: none; transition: opacity .4s ease; }
  .drawer-cookie-overlay.is-visible { opacity: 1; pointer-events: auto; }
  .drawer-cookie { position: fixed; top: 0; right: 0; width: min(320px, 88vw); height: 100%; background: var(--dark-surface); color: var(--dark-text); z-index: 1300; transform: translateX(100%); transition: transform .5s var(--ease); display: flex; flex-direction: column; box-shadow: -12px 0 40px rgba(0,0,0,.35); }
  .drawer-cookie.is-visible { transform: translateX(0); }
  .drawer-cookie-head { padding: var(--space-md); border-bottom: 1px solid var(--dark-line); display: flex; align-items: center; gap: .7rem; }
  .drawer-cookie-head i { font-size: 1.4rem; color: var(--accent-500); }
  .drawer-cookie-head h3 { font-family: var(--font-heading); font-size: 1.15rem; }
  .drawer-cookie-body { padding: var(--space-md); flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: var(--space-sm); }
  .drawer-cookie-body p { font-size: .87rem; color: var(--dark-text-soft); line-height: 1.6; }
  .cookie-category { display: flex; justify-content: space-between; align-items: center; padding: .8rem 0; border-bottom: 1px solid var(--dark-line); }
  .cookie-category:last-child { border-bottom: none; }
  .cookie-category-info h4 { font-size: .95rem; margin-bottom: .2rem; }
  .cookie-category-info span { font-size: .78rem; color: var(--dark-text-soft); }
  .toggle-switch { position: relative; width: 46px; height: 26px; flex-shrink: 0; }
  .toggle-switch input { opacity: 0; width: 100%; height: 100%; position: absolute; cursor: pointer; margin: 0; }
  .toggle-slider { position: absolute; inset: 0; background: rgba(238,241,245,.15); border-radius: var(--radius-pill); transition: background .3s ease; }
  .toggle-slider::before { content: ''; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .3s ease; }
  .toggle-switch input:checked + .toggle-slider { background: var(--accent-500); }
  .toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }
  .toggle-switch input:disabled + .toggle-slider { opacity: .5; }
  .drawer-cookie-actions { padding: var(--space-md); border-top: 1px solid var(--dark-line); display: flex; flex-direction: column; gap: .7rem; }
  .cookie-btn { padding: .85rem 1rem; border-radius: var(--radius-pill); font-weight: 600; font-size: .92rem; text-align: center; transition: all .3s ease; min-height: 44px; }
  .cookie-btn--accept { background: var(--accent-500); color: #1a1108; }
  .cookie-btn--accept:hover { background: var(--accent-600); box-shadow: var(--shadow-glow-accent); }
  .cookie-btn--reject { border: 1.5px solid var(--dark-line); color: var(--dark-text); }
  .cookie-btn--reject:hover { border-color: var(--dark-text); }
  .cookie-btn--save { color: var(--dark-text-soft); font-size: .85rem; text-decoration: underline; }

  .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
  .reveal.is-visible { opacity: 1; transform: translateY(0); }
}

@layer utilities {
  .pace .pace-progress { background: var(--accent-500); height: 3px; }
  .pace .pace-progress-inner { box-shadow: 0 0 10px var(--accent-500), 0 0 5px var(--accent-500); }
  .pace .pace-activity { display: none; }
  ::selection { background: var(--accent-tint); color: var(--ink-900); }
  @media (max-width: 640px) {
    .gallery { padding-block: var(--space-xl); }
    .interview-media img { height: 240px; }
    .gallery-media img { height: 280px; }
  }
}