/* ==========================================================================
   Skanli / home.css
   Home page only: the hero and the home section layouts. Owner: foundation builder.
   Loads after site.css.

   The hero: two headings, then three cards, each a live 3D scene (assets/js/hero3d.js draws
   them with three.js). A card is a stage (the canvas, its number tag and the drag hint; the
   diner's live notes too) over a caption row whose arrow button opens the contact popup
   (site.js) with that service ticked.
   ========================================================================== */

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero{padding:28px 0 64px}
.hero__head{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:var(--gutter);align-items:end}
.hero__eyebrow{grid-column:1 / -1}
.hero__title{
  grid-column:1 / span 8;margin:14px 0 0 -.03em;
  font:400 clamp(2.25rem,1rem + 3vw,3.875rem)/1.02 var(--font-serif);letter-spacing:-.03em;color:var(--ink);text-wrap:balance;
}
.hero__title em{letter-spacing:-.02em}
.hero__sub{
  grid-column:9 / -1;margin:0 0 .3em;
  font:500 clamp(1.0625rem,.95rem + .38vw,1.3125rem)/1.42 var(--font-sans);letter-spacing:-.012em;color:var(--ink-2);text-wrap:pretty;
}

/* The three scene cards */
.hero__scenes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--gutter);margin:36px 0 0;padding:0;list-style:none}
.scene{
  position:relative;display:flex;flex-direction:column;min-width:0;overflow:hidden;
  background:var(--paper);border:1px solid var(--rule);border-radius:var(--radius-3);
  transition:border-color var(--dur-2),box-shadow var(--dur-3) var(--ease-arrive);
}
.scene:hover{border-color:var(--rule-2);box-shadow:var(--shadow-2)}
.scene__stage{
  position:relative;height:clamp(280px,calc(100vh - 460px),480px);overflow:hidden;
  background:radial-gradient(120% 95% at 50% 6%,#FFFFFF 0%,#F8F6F0 50%,#ECE8DE 100%);
  -webkit-user-select:none;user-select:none;
}
@supports (height:1svh){ .scene__stage{height:clamp(280px,calc(100svh - 460px),480px)} }
/* Dot grid, fading out towards the edges */
.scene__stage::before{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(rgb(17 24 20 / .11) 1px,transparent 1.5px) 0 0 / 22px 22px;
  -webkit-mask-image:radial-gradient(70% 62% at 50% 56%,#000 25%,transparent 100%);mask-image:radial-gradient(70% 62% at 50% 56%,#000 25%,transparent 100%);
}
.scene__canvas{position:absolute;inset:0;display:block;width:100%;height:100%;cursor:grab;touch-action:pan-y}
.scene.is-grabbing .scene__canvas{cursor:grabbing}
/* Label and hint share one row: a long label wraps instead of running under the hint */
.scene__head{
  position:absolute;left:16px;right:12px;top:11px;z-index:2;display:flex;align-items:flex-start;justify-content:space-between;gap:12px;pointer-events:none;
}
.scene__tag{
  margin:3px 0 0;min-width:0;display:flex;align-items:center;gap:9px;
  font:500 var(--fs-label)/16px var(--font-mono);letter-spacing:.08em;text-transform:uppercase;color:var(--ink-2);
}
.scene__tag span{display:inline-grid;place-items:center;min-width:26px;height:20px;padding:0 5px;background:var(--ink);color:var(--lime);letter-spacing:.04em}
.scene__hint{
  flex:none;margin:0;display:flex;align-items:center;gap:6px;
  padding:4px 10px 4px 8px;border:1px solid var(--rule);border-radius:var(--radius-pill);background:rgb(255 255 255 / .85);
  font:500 var(--fs-micro)/14px var(--font-mono);letter-spacing:.03em;color:var(--ink-3);transition:opacity var(--dur-3);
}
.scene__hint svg{width:13px;height:13px;flex:none}
/* On narrow cards the hint shrinks to its icon, so the label keeps one line */
.scene{container-type:inline-size}
@container (max-width:400px){ .scene__hint{padding:4px} .scene__hint span{display:none !important} }
.scene__hint-touch{display:none}
@media (hover:none){ .scene__hint-mouse{display:none} .scene__hint-touch{display:inline} }
.scene.is-touched .scene__hint{opacity:0}
.scene__meta{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 16px 16px 20px;border-top:1px solid var(--rule)}
.scene__title{font:600 17px/1.35 var(--font-sans);letter-spacing:-.01em;color:var(--ink);text-wrap:balance}
.scene__go{
  flex:none;display:grid;place-items:center;width:44px;height:44px;padding:0;cursor:pointer;
  border:1px solid var(--ink);border-radius:50%;background:var(--ink);color:var(--bone);
  transition:background-color var(--dur-2),color var(--dur-2),transform var(--dur-2) var(--ease-arrive);
}
.scene__go:hover{background:var(--lime);color:var(--ink);transform:translateX(2px)}
.scene__go:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.scene__go svg{width:16px;height:16px}

/* The diner's live notes: hero3d.js pins each one beside its spot on the model */
.scene__chip{
  position:absolute;left:0;top:0;z-index:1;display:flex;align-items:flex-start;gap:8px;pointer-events:none;
  padding:8px 12px 9px 10px;border:1px solid var(--rule);border-radius:12px;background:rgb(255 255 255 / .95);box-shadow:var(--shadow-2);
  font:500 12px/1.3 var(--font-sans);color:var(--ink-3);white-space:nowrap;
  opacity:0;transform:translate3d(-999px,0,0);transition:opacity .5s var(--ease-arrive);
}
.scene__chip.is-on{opacity:1}
.scene__chip i{flex:none;width:8px;height:8px;margin-top:4px;border-radius:50%;background:var(--lime);box-shadow:0 0 0 3px color-mix(in srgb,var(--lime) 35%,transparent)}
.scene__chip b{display:block;font-weight:600;font-size:13px;color:var(--ink)}
.scene__chip small{display:block;font-size:12px;border-radius:3px}
.scene__chip small.is-new{animation:chip-new .9s var(--ease-arrive)}
@keyframes chip-new{from{background:color-mix(in srgb,var(--lime) 70%,transparent);color:var(--ink)}}

/* The shop card's dots, one per model (hero3d.js adds the buttons): the current one is a bar */
.scene__dots{
  position:absolute;left:50%;bottom:10px;z-index:2;display:flex;gap:0;padding:1px 5px;transform:translateX(-50%);
  border:1px solid var(--rule);border-radius:var(--radius-pill);background:rgb(255 255 255 / .85);
}
.scene__dots:empty{display:none}
.scene__dots button{position:relative;width:22px;height:22px;padding:0;border:0;background:none;cursor:pointer}
.scene__dots button::before{
  content:"";position:absolute;left:50%;top:50%;width:7px;height:7px;border-radius:4px;background:rgb(17 24 20 / .3);
  transform:translate(-50%,-50%);transition:width .35s var(--ease-arrive),background-color .35s;
}
.scene__dots button[aria-current="true"]::before{width:18px;background:var(--ink)}
.scene__dots button:disabled{cursor:default}
.scene__dots button:disabled::before{background:rgb(17 24 20 / .12)}
.scene__dots button:focus-visible{outline:2px solid var(--focus);outline-offset:-2px;border-radius:6px}

/* No WebGL: the screen plays flat (hero3d.js) */
.scene--flat .scene__canvas,.scene--flat .scene__hint,.scene--flat .scene__dots{display:none}
.scene__flat{
  position:absolute;left:50%;top:55%;max-width:82%;max-height:72%;transform:translate(-50%,-50%);
  border:6px solid #1B201D;border-radius:12px;box-shadow:var(--shadow-3);background:#1B201D;
}

/* The headings and cards ease in on load */
@media (prefers-reduced-motion:no-preference){
  .hero__eyebrow,.hero__title,.hero__sub,.scene{animation:reveal-in 900ms var(--ease-arrive) backwards}
  .hero__title{animation-delay:70ms}
  .hero__sub{animation-delay:160ms}
  .scene:nth-child(1){animation-delay:240ms}
  .scene:nth-child(2){animation-delay:330ms}
  .scene:nth-child(3){animation-delay:420ms}
}

@media (max-width:1099px){
  .hero{padding:24px 0 56px}
  .hero__title{grid-column:1 / -1}
  .hero__sub{grid-column:1 / span 9;margin:16px 0 0}
  .hero__scenes{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:32px}
  .scene:nth-child(3){grid-column:1 / -1}
  .scene__stage{height:340px}
}
@media (max-width:699px){
  .hero{padding:20px 0 48px}
  .hero__title{margin-top:12px;line-height:1.04}
  .hero__sub{grid-column:1 / -1;margin-top:14px}
  .hero__scenes{grid-template-columns:minmax(0,1fr);gap:16px;margin-top:28px}
  .scene:nth-child(3){grid-column:auto}
  .scene__stage{height:auto;aspect-ratio:1 / .92}
  .scene__meta{padding:14px 12px 14px 16px}
  .scene__title{font-size:16px}
}

/* ── Services ─────────────────────────────────────────────────────────── */
.service-after{
  display:flex;align-items:center;gap:16px;padding:24px 0 0;
  font-size:var(--fs-lede);line-height:1.45;letter-spacing:-.01em;color:var(--ink);
}
.service-after__icon{display:grid;place-items:center;flex:none;width:48px;height:48px;background:var(--lime);color:var(--ink)}
.service-after__icon svg{width:24px;height:24px}

/* ── Selected work ────────────────────────────────────────────────────── */
.work-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:64px var(--gutter)}
.work-grid > .project-card{grid-column:span 4}
.work-grid > .project-card--feature{grid-column:span 6}
/* Skanli's own product, first and full width: picture left, words right (stacked below 1100px) */
.work-grid > .project-card--lead{grid-column:1 / -1;display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:var(--gutter);align-items:center}
.project-card--lead > .project-card__media{grid-column:1 / span 7}
.project-card--lead > .project-card__body{grid-column:8 / span 5;padding-top:0}
.project-card--lead .project-card__title{font-size:clamp(2.25rem,1.5rem + 2vw,3.5rem)}
.project-card__features{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0 0;padding:0;list-style:none}
.project-card__features li{padding:6px 12px;border:1px solid var(--line-strong);font-size:14px;line-height:1.3;color:var(--text-2)}
.work-more{
  grid-column:span 4;position:relative;display:flex;flex-direction:column;justify-content:space-between;gap:32px;
  min-height:100%;padding:24px;border:1px solid var(--ink);background:var(--surface);
  transition:background-color var(--dur-2) linear;
}
.work-more:hover{background:var(--surface-hover,var(--paper))}
.work-more__title{font:400 var(--fs-h3)/1.1 var(--font-serif);letter-spacing:-.018em}
.work-more__title a::after{content:"";position:absolute;inset:0}
.work-more__title a:focus-visible{outline:none}
.work-more__title a:focus-visible::after{outline:2px solid var(--focus);outline-offset:4px}
.work-more__list{display:grid;gap:0}
.work-more__list li{display:flex;justify-content:space-between;gap:16px;padding:7px 0;border-top:1px solid var(--rule);font-size:15px;line-height:1.35;color:var(--ink-2)}
.work-more__list li span:last-child{font:500 var(--fs-micro)/20px var(--font-mono);letter-spacing:.06em;text-transform:uppercase;color:var(--ink-3)}
.work-more__go{display:flex;align-items:center;justify-content:space-between;gap:12px;font:500 16px/1.3 var(--font-sans)}
.work-more__go svg{width:20px;height:20px;transition:transform 320ms var(--ease-arrive)}
.work-more:hover .work-more__go svg{transform:translateX(4px)}
@media (max-width:1099px){
  .work-grid{gap:56px var(--gutter)}
  .work-grid > .project-card,.work-grid > .project-card--feature,.work-more{grid-column:span 6}
  .work-grid > .project-card--lead{grid-column:1 / -1}
  .project-card--lead > .project-card__media,.project-card--lead > .project-card__body{grid-column:1 / -1}
  .project-card--lead > .project-card__body{padding-top:20px}
}
@media (max-width:699px){
  .work-grid{grid-template-columns:minmax(0,1fr);gap:48px}
  .work-grid > .project-card,.work-grid > .project-card--feature,.work-more{grid-column:1 / -1}
}

/* ── Process ──────────────────────────────────────────────────────────── */
.process-steps{grid-template-columns:repeat(5,minmax(0,1fr))}
@media (max-width:1099px){ .process-steps{grid-template-columns:repeat(3,minmax(0,1fr));row-gap:48px} }
@media (max-width:699px){ .process-steps{grid-template-columns:minmax(0,1fr);row-gap:36px} }

/* ── Products ─────────────────────────────────────────────────────────── */
.product-grid__more{position:relative;transition:background-color var(--dur-2) linear}
.product-grid__more:hover{background:var(--surface-hover,var(--paper))}
.product-grid__more .work-more__go svg{transition:transform 320ms var(--ease-arrive)}
.product-grid__more:hover .work-more__go svg{transform:translateX(4px)}

/* ── Clients ──────────────────────────────────────────────────────────── */
.clients-foot{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:16px 32px;margin-top:28px}
.clients-foot p{max-width:60ch;color:var(--ink-2)}

/* ── Questions (the FAQ, written by tools/seo.py) ─────────────────────── */
/* Plain <details>: every answer is in the page for search engines and assistants, open or shut */
.faq{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:var(--gutter)}
.faq__item{grid-column:4 / span 8;border-bottom:1px solid var(--rule)}
.faq__item:first-child{border-top:1px solid var(--rule)}
.faq__q{
  display:flex;align-items:center;justify-content:space-between;gap:24px;padding:22px 4px 22px 0;cursor:pointer;list-style:none;
  font:500 clamp(1.125rem,1rem + .4vw,1.375rem)/1.35 var(--font-sans);letter-spacing:-.012em;color:var(--ink);
}
.faq__q::-webkit-details-marker{display:none}
.faq__q::after{
  content:"";flex:none;width:14px;height:14px;transition:transform var(--dur-2) var(--ease-arrive);
  background:linear-gradient(currentColor,currentColor) center / 14px 1.5px no-repeat,linear-gradient(currentColor,currentColor) center / 1.5px 14px no-repeat;
}
.faq__item[open] .faq__q::after{transform:rotate(45deg)}
.faq__q:hover{color:var(--ink-2)}
.faq__q:focus-visible{outline:2px solid var(--focus);outline-offset:4px}
.faq__a{max-width:68ch;padding:0 48px 26px 0;font-size:var(--fs-body);line-height:var(--lh-body);color:var(--ink-2)}
@media (max-width:1099px){ .faq__item{grid-column:1 / -1} }
@media (max-width:699px){ .faq__q{padding:18px 0} .faq__a{padding-right:0} }
