/* Calm motion layer. Nothing flashes, nothing is sudden. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .6s; }

.site-header { position: sticky; top: 0; z-index: 50; transition: background-color .7s ease, box-shadow .7s ease; }
.site-header.is-scrolled { background: rgba(244,239,230,.82); -webkit-backdrop-filter: blur(14px) saturate(1.1); backdrop-filter: blur(14px) saturate(1.1); box-shadow: 0 1px 0 rgba(118,95,53,.18); }

/* hamburger (phones only) */
.nav-toggle { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; background: none; border: 1px solid #C9BEA9; border-radius: 2px; color: #2A2826; cursor: pointer; }
.nav-toggle span { display: block; width: 18px; height: 1.5px; background: currentColor; position: relative; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; width: 18px; height: 1.5px; background: currentColor; transition: transform .5s ease; }
.nav-toggle span::before { top: -6px; } .nav-toggle span::after { top: 6px; }
@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none !important; width: 100%; flex-direction: column; align-items: flex-start !important; padding: 8px 0 16px; }
  .site-nav.open { display: flex !important; }
}

/* kintsugi seam */
.mask-wrap { position: relative; }
.seam { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.seam path { fill: none; stroke: #D8C590; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(216,197,144,.7)); }
.seam .s2 { stroke-width: 2.2; opacity: .8; }
.seam .s1 { stroke-width: 4.5; }

/* gentle entrance + scroll reveals (only when JS is running) */
.js .settle { opacity: 0; transform: translateY(14px); animation: settle 1.8s cubic-bezier(.2,.6,.2,1) forwards; }
.js .settle.d1 { animation-delay: .5s; } .js .settle.d2 { animation-delay: 1.1s; } .js .settle.d3 { animation-delay: 1.7s; }
@keyframes settle { to { opacity: 1; transform: none; } }
.js .seam path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 5.5s ease-in-out .8s forwards; }
.js .seam .s2 { animation-delay: 1.6s; animation-duration: 4.5s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 1.4s ease, transform 1.4s cubic-bezier(.2,.6,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
.js .lab-path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 7s ease-in-out; }
.js .lab.in .lab-path { stroke-dashoffset: 0; }
.js .lab-dot { opacity: 0; transition: opacity 2s ease 6s; } .js .lab.in .lab-dot { opacity: 1; }

/* soft glow on the call-to-action buttons */
a[href="/request-a-call/"], a[href="/labyrinth/"], a[href="/quiz/"] { transition: box-shadow .8s ease, transform .8s ease, background-color .8s ease; }
a[href="/request-a-call/"]:hover { box-shadow: 0 0 0 1px rgba(216,197,144,.5), 0 0 28px rgba(216,197,144,.35); }
a[href="/labyrinth/"]:hover, a[href="/quiz/"]:hover { box-shadow: 0 0 34px rgba(216,197,144,.22); transform: translateY(-3px); }
main section { transition: background-color 1.2s ease; }

/* still version */
@media (prefers-reduced-motion: reduce) {
  .js .settle, .js .reveal { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
  .js .seam path, .js .lab-path { stroke-dashoffset: 0 !important; animation: none !important; transition: none !important; }
  .js .lab-dot { opacity: 1 !important; transition: none !important; }
  .site-header, main section, a { transition: none !important; }
  @view-transition { navigation: none; }
}
@media (max-width: 720px) {
  .site-header { flex-wrap: wrap; gap: 0 12px !important; }
  .site-header > a:first-child { flex: 1 1 0; min-width: 0; }
  .nav-toggle { flex: none; }
}
