/* Reset, base elements and shared components.
   Layer order matters: `sweep` sits below `components` so component padding/margins win over the
   reveal mask's box tweaks, and `sections` (page-specific rules) wins over both. */
@layer base, sweep, components, sections;

@layer base {
  *, ::after, ::before, ::backdrop { box-sizing: border-box; border: 0 solid; margin: 0; padding: 0; }
  html {
    -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
    tab-size: 4; line-height: 1.5; font-family: var(--font-sans);
    font-feature-settings: normal; font-variation-settings: normal;
    -webkit-tap-highlight-color: transparent;
  }
  hr { height: 0; color: inherit; border-top-width: 1px; }
  h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }
  a { color: inherit; text-decoration: inherit; }
  b, strong { font-weight: bolder; }
  code, kbd, samp, pre { font-family: var(--font-mono); font-feature-settings: normal; font-variation-settings: normal; font-size: 1em; }
  small { font-size: 80%; }
  summary { display: list-item; }
  ol, ul, menu { list-style: none; }
  img, svg, video, canvas, audio, iframe, embed, object { vertical-align: middle; display: block; }
  img, video { max-width: 100%; height: auto; }
  button, input, select, optgroup, textarea { font: inherit; letter-spacing: inherit; color: inherit; opacity: 1; background-color: rgba(0, 0, 0, 0); border-radius: 0; }
  button, input:where([type="button"], [type="reset"], [type="submit"]) { appearance: button; }
  [hidden]:where(:not([hidden="until-found"])) { display: none !important; }
}

/* Light-sweep reveal: a diagonal mask slides off the element. Only active while animations are on. */
@layer sweep {
  /* .sweep--static: hero copy keeps the mask box even with animations off */
  html:not([data-motion="reduced"]) .sweep, .sweep--static {
    -webkit-mask-image: linear-gradient(106deg, #000 40%, rgba(0, 0, 0, .28) 50%, transparent 58%);
    mask-image: linear-gradient(106deg, #000 40%, rgba(0, 0, 0, .28) 50%, transparent 58%);
    -webkit-mask-size: 270% 100%; mask-size: 270% 100%;
    -webkit-mask-position: var(--sw, 0%) 0; mask-position: var(--sw, 0%) 0;
    margin: -.12em -.06em -.24em;
    padding: .12em .06em .24em;
  }
  html:not([data-motion="reduced"]) .sweep.is-done, .sweep--static.is-done { -webkit-mask-image: none; mask-image: none; }
}

@layer components {
  .gutter { padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
  .display { font-family: var(--font-display); letter-spacing: var(--display-tracking); font-weight: var(--display-weight); font-stretch: var(--display-stretch); line-height: var(--display-leading); }
  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border-width: 0; }
  .mask { margin: -.14em -.06em -.26em; padding: .14em .06em .26em; display: block; overflow: clip; }

  /* Window light: four soft bars, blended into the wall */
  .light { mix-blend-mode: soft-light; filter: blur(.28vw); will-change: transform; grid-template-columns: repeat(4, 1fr); gap: 5.5%; display: grid; }
  .lightbox { mix-blend-mode: soft-light; position: absolute; inset: 0; }
  .lightbox + .lightbox { mix-blend-mode: screen; opacity: .1; }
  .lightbox .light { mix-blend-mode: normal; opacity: 1; }
  .light__bar { background: linear-gradient(#ffd5a8, #ffb472); display: block; }
  .light + .light { mix-blend-mode: screen; opacity: .1; }

  /* Cover-fit scene box: keeps the scene's aspect ratio and always covers its frame */
  .room { width: max(100%, calc(var(--rh, 100svh) * var(--ra))); aspect-ratio: var(--ra); position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
  .room > img { object-fit: cover; width: 100%; height: 100%; position: absolute; inset: 0; }

  /* Text link with a growing underline */
  .link { text-decoration: none; position: relative; }
  .link::after { content: ""; transform-origin: 100% center; height: .14em; min-height: 2px; transition: transform .45s var(--ease-out-expo); background: currentcolor; border-radius: 99px; position: absolute; bottom: -.18em; left: 0; right: 0; transform: scaleX(0); }
  .link:focus-visible::after, .link[aria-current="true"]::after { transform-origin: 0 center; transform: scaleX(1); }
  @media (hover: hover) { .link:hover::after { transform-origin: 0 center; transform: scaleX(1); } }
  .link .arrow { transition: translate .5s var(--ease-out-expo); }
  @media (hover: hover) { .link:hover .arrow { translate: 4px; } }

  /* Buttons */
  .btn {
    white-space: nowrap; min-height: 52px; border-radius: var(--radius-btn); justify-content: center; align-items: center; gap: .6em;
    padding: 0 1.35em; font-size: 1rem; font-weight: 600; line-height: 1; display: inline-flex; position: relative;
    --ab: color-mix(in srgb, currentColor 26%, transparent); --ac: currentColor;
  }
  .btn .arrow { box-sizing: content-box; background: color-mix(in srgb, currentcolor 13%, transparent); border-radius: 99px; width: .95em; height: .95em; margin-right: -.62em; padding: .44em; transition: background-color .4s, color .4s; }
  .btn--ink { background-color: var(--c-ink); color: var(--c-cream); --ab: #ff6a00; --ac: #0b0b0b; }
  .btn--orange { background-color: var(--c-orange); color: var(--c-ink); --ab: #0b0b0b; --ac: #f6f1e6; }
  .btn--cream { background-color: var(--c-cream); color: var(--c-ink); --ab: #0b0b0b; --ac: #f6f1e6; }
  .btn:active { transition-duration: 80ms; transform: scale(.975); }
  @media (hover: hover) {
    .btn:hover .arrow { background: var(--ab); color: var(--ac); }
    .btn:hover .arrow path { animation: arrow-pass .62s cubic-bezier(.65, 0, .2, 1); }
  }
  @keyframes arrow-pass {
    0% { transform: none; }
    48% { transform: translate(26px); }
    49% { opacity: 0; transform: translate(26px); }
    50% { opacity: 0; transform: translate(-26px); }
    51% { opacity: 1; }
    100% { transform: none; }
  }

  /* Pointer glow shared by buttons, chips, process tabs and FAQ rows (JS feeds --mx/--my) */
  .btn, button.chip, .proc__tab button, .faq__item, .work__tab { --luz: #ff6a004d; --r: 110px; }
  .btn, button.chip, .proc__tab button, .faq__item { isolation: isolate; position: relative; }
  .btn, button.chip { overflow: hidden; }
  .btn::before, button.chip::before, .proc__tab button::before, .faq__item::before {
    content: ""; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0;
    background: radial-gradient(circle var(--r) at var(--mx, 50%) var(--my, 50%), var(--luz), transparent 100%);
    transition: opacity .45s; position: absolute; inset: 0;
  }
  .faq__item { --r: 320px; --luz: #ff6a0033; }
  .proc__tab button { --r: 260px; --luz: #ff6a0042; }
  .proc__tab button[aria-selected="true"], button.chip.is-on { --luz: #ff6a0099; }
  .btn--ink { --luz: #ff6a0080; --r: 78px; }
  .btn--orange { --luz: #ffe8b4d9; }
  .btn--cream { --luz: #ff8a339e; }
  .btn--line { --luz: color-mix(in srgb, currentColor 22%, transparent); }
  .btn { transition: transform .55s cubic-bezier(.2, 1.3, .35, 1), background-color .4s, color .3s, border-color .3s, box-shadow .4s; }
  @media (hover: hover) {
    .btn:hover::before, button.chip:hover::before, .proc__tab button:hover::before, .faq__item:hover::before { opacity: 1; }
    .btn:hover { transform: translateY(-2px) scale(1.018); }
    .btn:active { transform: scale(.965); }
    .btn:hover .dots:not(.is-open) i:first-child { translate: -8px; }
    .btn:hover .dots:not(.is-open) i:last-child { translate: 8px; }
    summary:hover .faq__icon { scale: 1.08; }
  }
  .faq__icon { transition: scale .5s cubic-bezier(.2, 1.4, .35, 1), box-shadow .4s, background-color .3s, color .3s; }
  .nudge { transition: transform .6s var(--ease-out-expo), opacity .5s; }
  @media (hover: hover) { .has-nudge:hover .nudge, .nudge:hover { transform: translate(8px); } }
  @media not all and (min-width: 30rem) { .btn { padding: 0 1em; font-size: .93rem; } }
  .btn--line { box-shadow: 0 0 0 1.5px inset; }
  .btn--lg { border-radius: 12px; min-height: 64px; padding: 0 1.8em; font-size: 1.12rem; }

  .chip { border-style: solid; border-width: 1.5px; border-radius: 8px; align-items: center; gap: .5em; min-height: 34px; padding: .3em .95em; font-size: .9rem; font-weight: 600; line-height: 1.2; display: inline-flex; }

  /* Menu button glyph: two dots that become a cross */
  .dots { width: 18px; height: 18px; position: relative; }
  .dots i { width: 6px; height: 6px; transition: width .4s var(--ease-kick), height .4s var(--ease-kick), translate .4s var(--ease-kick), rotate .4s var(--ease-kick), border-radius .3s; background: currentcolor; border-radius: 99px; margin: -3px 0 0 -3px; position: absolute; top: 50%; left: 50%; }
  .dots i:first-child { translate: -5px; }
  .dots i:last-child { translate: 5px; }
  .dots.is-open i { width: 18px; height: 3px; margin: -1.5px 0 0 -9px; translate: 0; }
  .dots.is-open i:first-child { rotate: 45deg; }
  .dots.is-open i:last-child { rotate: -45deg; }
}

/* Unlayered globals (these intentionally beat every layer) */
html { background: var(--c-ink); scrollbar-gutter: stable; }
html.lenis.lenis-stopped:not(.lenis-autoToggle) { overflow: revert; }
body {
  background: var(--c-cream); color: var(--c-ink); font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizelegibility; -webkit-tap-highlight-color: transparent;
  font-size: var(--fs-body); line-height: var(--lh-body); overflow-x: clip;
}
::selection { background: var(--c-orange); color: var(--c-ink); }
:focus-visible { outline: 3px solid var(--ring, var(--c-ink)); outline-offset: 4px; box-shadow: 0 0 0 4px var(--ring-in, var(--c-cream)); border-radius: 6px; }
/* Two-tone focus ring (WCAG 1.4.11): a 4px inner band plus a 3px outer line in opposite tones, so at least one of them reads 3:1 on ANY
   surface (photos, orange walls, cream, ink). The brand orange alone is only 2.5:1 on cream. */
[data-theme="accent"], [data-theme="dark"], .hdr[data-scheme="accent"], .hdr[data-scheme="dark"], .menu, .foot, .faq__more, .faq__more2, .pg-hero, .tools-hero, .tools__panel--wall, .tools__panel--night { --ring: var(--c-cream); --ring-in: var(--c-ink); }
/* elements that draw their own border with box-shadow keep it while focused */
.btn--line:focus-visible, .q-back:focus-visible, .q-line:focus-visible, .hdr__tools:focus-visible { box-shadow: inset 0 0 0 1.5px currentColor, 0 0 0 4px var(--ring-in, var(--c-cream)); }
.hdr[data-scheme="light"] .hdr__menu:focus-visible { box-shadow: inset 0 0 0 1.5px #0B0B0B, 0 0 0 4px var(--ring-in, var(--c-cream)); }
.hdr[data-scheme="dark"] .hdr__menu:focus-visible { box-shadow: inset 0 0 0 1.5px #F6F1E6, 0 0 0 4px var(--ring-in, var(--c-cream)); }
.hdr .hdr__logo:focus-visible { box-shadow: 0 0 0 4px var(--ring-in, var(--c-cream)); }
html { scroll-padding-top: 96px; scroll-padding-bottom: 24px; }
a, button, [role="button"], label, summary { cursor: pointer; }
button:disabled { cursor: progress; opacity: .7; }
html[data-motion="reduced"] *, html[data-motion="reduced"] ::before, html[data-motion="reduced"] ::after {
  transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important;
}
@supports not (overflow: clip) { body { overflow-x: hidden; } }

/* Intro overlay safety net: if scripts never run, it removes itself */
@keyframes intro-failsafe { 100% { opacity: 0; visibility: hidden; } }
[data-intro] { animation: intro-failsafe .4s ease 10s forwards; }

/* Windows high-contrast / forced colours: borders that are drawn with box-shadow vanish there, so give them a real border. */
@media (forced-colors: active) {
  .btn--line, .chip, .work__tab, .faq__item { border: 1.5px solid ButtonText; }
  :focus-visible { outline-color: Highlight; }
  .proc__bar { forced-color-adjust: none; }
}
/* Touch: grow the hit area of text links to ~44px without moving anything (invisible pseudo-element) */
@media (pointer: coarse) {
  .foot .link::before, .studio__links .link::before, .faq__more-mail::before, .faq__more2 .link::before, .contact__mail::before, .menu__mail::before, .pg-hero__crumbs a::before, .foot__motion::before { content: ""; position: absolute; inset: -10px -4px; }
}
/* Print: no fixed chrome */
@media print { .hdr, .intro, .curtain, .cookie, .skip, .menu { display: none !important; } }
