/* Shared styles for all pages. Rules here were identical across all six
   pages and were extracted so they only need editing in one place.
   Page-specific rules remain in that page's own <style> block, which
   loads after this file and therefore still wins any tie. */

* {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

html {
      scroll-behavior: smooth;
    }

body {
      font-family: 'Osnova Pro', sans-serif;
      background: var(--page-bg);
      color: var(--text);
      overflow-x: hidden;
      transition: background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }

:root {
      --page-bg: #1a1210;
      --section-bg: #1a1210;
      --section-alt: linear-gradient(180deg, #1a1210, #251a17);
      --hero-bg: linear-gradient(165deg, #1a1210 0%, #251a17 40%, #2d201b 100%);
      --section-dark-bg: #0f0a09;
      --text: #FFF8F0;
      --text-muted: #D08468;
      --nav-bg: transparent;
      --nav-bg-scroll: rgba(26, 18, 16, 0.92);
      --nav-shadow: 0 1px 20px rgba(0, 0, 0, 0.3);
      --scrollbar-track: #251a17;
      --scrollbar-thumb: #8C3121;
      --grain-opacity: 0.06;
    }

.dark {
      --page-bg: #1a1210;
      --section-bg: #1a1210;
      --section-alt: linear-gradient(180deg, #1a1210, #251a17);
      --hero-bg: linear-gradient(165deg, #1a1210 0%, #251a17 40%, #2d201b 100%);
      --section-dark-bg: #0f0a09;
      --text: #FFF8F0;
      --text-muted: #D08468;
      --nav-bg: transparent;
      --nav-bg-scroll: rgba(26, 18, 16, 0.92);
      --nav-shadow: 0 1px 20px rgba(0, 0, 0, 0.3);
      --scrollbar-track: #251a17;
      --scrollbar-thumb: #8C3121;
      --grain-opacity: 0.06;
    }

.dark .grain::after {
      opacity: var(--grain-opacity);
    }

.theme-hero-bg {
      background: var(--hero-bg) !important;
    }

.theme-section-bg {
      background: var(--section-bg) !important;
    }

.theme-section-alt {
      background: var(--section-alt) !important;
    }

.theme-section-dark {
      background: var(--section-dark-bg) !important;
    }

::-webkit-scrollbar-track {
      background: var(--scrollbar-track);
    }

::-webkit-scrollbar-thumb {
      background: var(--scrollbar-thumb);
      border-radius: 3px;
    }

.grain::after {
      content: '';
      position: absolute;
      inset: 0;
      opacity: 0.03;
      pointer-events: none;
      background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
      background-size: 200px;
    }

::-webkit-scrollbar {
      width: 6px;
    }

.dark .text-terra-900,
    .dark .text-terra-800 {
      color: #FFF8F0 !important;
    }

.dark .text-terra-700 {
      color: #F2E6D9 !important;
    }

.dark .text-terra-600 {
      color: #E8D5C4 !important;
    }

.dark .text-terra-500 {
      color: #D08468 !important;
    }

.dark .text-terra-400 {
      color: #D4B89E !important;
    }

.dark .border-terra-200 {
      border-color: rgba(212, 184, 158, 0.2) !important;
    }

.dark .border-terra-100 {
      border-color: rgba(212, 184, 158, 0.15) !important;
    }

.dark .border-white\/10 {
      border-color: rgba(255, 255, 255, 0.08) !important;
    }

.dark .bg-white {
      background-color: rgba(40, 28, 24, 0.8) !important;
    }

.dark .bg-cream-50 {
      background-color: rgba(30, 20, 17, 0.6) !important;
    }

.dark .bg-white\/90 {
      background-color: rgba(40, 28, 24, 0.9) !important;
    }

.dark .bg-white\/5 {
      background-color: rgba(255, 255, 255, 0.04) !important;
    }

.theme-toggle {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      border: 1.5px solid currentColor;
      color: var(--text);
      background: transparent;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      overflow: hidden;
      transition: color 0.4s ease, border-color 0.4s ease;
    }

.theme-toggle:hover {
      transform: scale(1.1);
    }

.theme-toggle:active {
      transform: scale(0.92);
    }

.theme-toggle:focus-visible {
      outline: 2px solid #A33B27;
      outline-offset: 4px;
    }

.theme-toggle .toggle-icons {
      position: relative;
      width: 20px;
      height: 20px;
    }

.theme-toggle .icon-moon,
    .theme-toggle .icon-sun {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }

.theme-toggle .icon-moon {
      opacity: 1;
      transform: rotate(0deg) scale(1);
    }

.theme-toggle .icon-sun {
      opacity: 0;
      transform: rotate(-90deg) scale(0.5);
    }

.dark .theme-toggle .icon-moon {
      opacity: 0;
      transform: rotate(90deg) scale(0.5);
    }

.dark .theme-toggle .icon-sun {
      opacity: 1;
      transform: rotate(0deg) scale(1);
    }

.theme-toggle.animating {
      animation: toggleGlow 0.5s ease;
    }

@keyframes toggleGlow {
      0% {
        box-shadow: 0 0 0 0 rgba(208, 132, 104, 0);
      }

      40% {
        box-shadow: 0 0 12px 4px rgba(208, 132, 104, 0.4);
      }

      100% {
        box-shadow: 0 0 0 0 rgba(208, 132, 104, 0);
      }
    }

.theme-toggle .toggle-icons.lg {
      width: 32px;
      height: 32px;
    }

/* Animations */

@keyframes fadeUp {
      from {
        opacity: 0;
        transform: translateY(40px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

@keyframes fadeIn {
      from {
        opacity: 0;
      }

      to {
        opacity: 1;
      }
    }

@keyframes scaleIn {
      from {
        opacity: 0;
        transform: scale(0.92);
      }

      to {
        opacity: 1;
        transform: scale(1);
      }
    }

.anim-fade-up {
      animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
      opacity: 0;
    }

.anim-fade-in {
      animation: fadeIn 0.8s ease forwards;
      opacity: 0;
    }

.anim-scale-in {
      animation: scaleIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
      opacity: 0;
    }

.delay-1 {
      animation-delay: 0.1s;
    }

.delay-2 {
      animation-delay: 0.2s;
    }

.delay-3 {
      animation-delay: 0.3s;
    }

.delay-4 {
      animation-delay: 0.4s;
    }

/* Scroll reveal.
   Scoped to html.js on purpose. The `js` class is added by an inline script at the top
   of every page's <head>, so it is present only when JavaScript actually runs. Without
   that guard, `opacity: 0` is the default state and any JS failure leaves every
   .reveal element permanently invisible -- blank sections, not un-animated ones.
   Content visible by default; the animation is progressive enhancement. */

html.js .reveal {
      opacity: 0;
      transform: translateY(40px);
      transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }

html.js .reveal.visible {
      opacity: 1;
      transform: translateY(0);
    }

.btn-primary {
      background: #A33B27;
      color: #FFF8F0;
      padding: 16px 40px;
      border-radius: 100px;
      font-weight: 500;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      font-size: 0.8rem;
      transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
      box-shadow: 0 4px 20px rgba(163, 59, 39, 0.25), 0 2px 6px rgba(163, 59, 39, 0.15);
      position: relative;
      overflow: hidden;
      display: inline-block;
      text-decoration: none;
    }

.btn-primary::before {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
      transform: translateX(-100%);
      transition: transform 0.5s ease;
    }

.btn-primary:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 32px rgba(163, 59, 39, 0.35), 0 4px 12px rgba(163, 59, 39, 0.2);
    }

.btn-primary:hover::before {
      transform: translateX(100%);
    }

.btn-primary:active {
      transform: translateY(0);
    }

/* Nav */

.nav-link {
      position: relative;
      color: #4F1C13;
      font-size: 0.82rem;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      text-decoration: none;
      font-weight: 500;
      transition: color 0.3s ease;
    }

.nav-link::after {
      content: '';
      position: absolute;
      bottom: -4px;
      left: 0;
      width: 0;
      height: 1.5px;
      background: #A33B27;
      transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

.nav-link:hover {
      color: #A33B27;
    }

.nav-link:hover::after {
      width: 100%;
    }

.dark .nav-link {
      color: #E8D5C4;
    }

.dark .nav-link:hover {
      color: #FFF8F0;
    }

.dark .nav-link::after {
      background: #D08468;
    }

.dark .mobile-nav {
      background-color: #1a1210 !important;
    }

.dark .bg-terra-800 {
      background-color: #FFF8F0 !important;
    }

/* Mobile nav */

.mobile-nav {
      transform: translateX(100%);
      transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
      background: #1a1210 !important;
    }

.mobile-nav.open {
      transform: translateX(0);
    }

.mobile-nav-overlay {
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s ease;
    }

.mobile-nav-overlay.open {
      opacity: 1;
      pointer-events: auto;
    }

/* ========== MOTION SYSTEM (site-wide) ========== */

.hero-mesh{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:0}

.hero-mesh > div{position:absolute;border-radius:50%;filter:blur(90px);opacity:.55;mix-blend-mode:screen}

.mesh-blob-1{width:520px;height:520px;background:radial-gradient(circle,#C85A3E 0%,transparent 70%);top:-10%;left:-10%;animation:drift1 22s ease-in-out infinite alternate}

.mesh-blob-2{width:460px;height:460px;background:radial-gradient(circle,#A33B27 0%,transparent 70%);bottom:-15%;right:-5%;animation:drift2 26s ease-in-out infinite alternate}

.mesh-blob-3{width:380px;height:380px;background:radial-gradient(circle,#E08A68 0%,transparent 70%);top:40%;left:40%;animation:drift3 18s ease-in-out infinite alternate}

@keyframes drift1{0%{transform:translate(0,0) scale(1)}100%{transform:translate(120px,80px) scale(1.05)}}

@keyframes drift2{0%{transform:translate(0,0) scale(1)}100%{transform:translate(-90px,-60px) scale(1.1)}}

@keyframes drift3{0%{transform:translate(0,0) scale(1)}100%{transform:translate(-140px,100px) scale(.9)}}

.ken-burns{transform-origin:center center}

.particle-layer{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:1}

.particle{position:absolute;bottom:-10px;width:6px;height:6px;border-radius:50%;background:radial-gradient(circle,rgba(224,138,104,.9),rgba(163,59,39,0));opacity:0;animation:floatParticle 15s linear infinite}

.particle:nth-child(1){left:10%;animation-duration:14s;animation-delay:0s}

.particle:nth-child(2){left:22%;animation-duration:18s;animation-delay:3s}

.particle:nth-child(3){left:38%;animation-duration:16s;animation-delay:6s}

.particle:nth-child(4){left:52%;animation-duration:20s;animation-delay:1s}

.particle:nth-child(5){left:66%;animation-duration:13s;animation-delay:4s}

.particle:nth-child(6){left:78%;animation-duration:17s;animation-delay:7s}

.particle:nth-child(7){left:88%;animation-duration:15s;animation-delay:2s}

.particle:nth-child(8){left:94%;animation-duration:19s;animation-delay:5s}

@keyframes floatParticle{0%{transform:translateY(0) translateX(0);opacity:0}10%{opacity:.8}50%{transform:translateY(-60vh) translateX(20px)}90%{opacity:.6}100%{transform:translateY(-110vh) translateX(-10px);opacity:0}}

.btn-glow,.btn-primary{position:relative;isolation:isolate}

.btn-glow::before,.btn-primary::before{content:"";position:absolute;inset:-3px;border-radius:inherit;padding:3px;background:conic-gradient(from 0deg,#C85A3E,#E08A68,#7A2817,#C85A3E);mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;filter:blur(6px);opacity:0;transition:opacity .4s ease;animation:borderSpin 6s linear infinite;z-index:-1;pointer-events:none}

.btn-glow:hover::before,.btn-primary:hover::before,.btn-glow.always-glow::before,.btn-primary.always-glow::before{opacity:.7}

@keyframes borderSpin{to{transform:rotate(1turn)}}

.ball-trail{position:absolute;inset:0;pointer-events:none;z-index:1;opacity:.35}

.ball-trail path{fill:none;stroke:#E08A68;stroke-width:2.5;stroke-linecap:round;stroke-dasharray:600;stroke-dashoffset:600;animation:drawArc 8s ease-in-out infinite}

@keyframes drawArc{0%{stroke-dashoffset:600;opacity:0}15%{opacity:.5}50%{stroke-dashoffset:0;opacity:.5}80%{stroke-dashoffset:-600;opacity:0}100%{stroke-dashoffset:-600;opacity:0}}

.hero-title-animated{background:linear-gradient(110deg,currentColor 0%,#E08A68 35%,currentColor 50%,#C85A3E 65%,currentColor 100%);background-size:300% 100%;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;--h1-delay:0s;padding:0.05em 0}

.hero-title-animated.delay-1{--h1-delay:0.1s}

.hero-title-animated.delay-2{--h1-delay:0.2s}

.hero-title-animated.delay-3{--h1-delay:0.3s}

.hero-title-animated.anim-fade-up{opacity:0;animation:fadeUp 0.9s var(--h1-delay) cubic-bezier(.16,1,.3,1) forwards,titleShimmer 12s calc(var(--h1-delay) + 1s) ease-in-out infinite}

@keyframes titleShimmer{0%,100%{background-position:0% 50%}50%{background-position:100% 50%}}

.grain::after{animation:grainDrift 40s steps(10) infinite}

@keyframes grainDrift{0%{background-position:0 0}25%{background-position:-4px 2px}50%{background-position:3px -3px}75%{background-position:-2px -4px}100%{background-position:0 0}}

/* ========== END MOTION SYSTEM ========== */
