/* =========================================================================
   home-experience.css — content (interface) layered over the dot device.
   The device itself is the dot field; this file styles the content + intro
   narrative only. No metal frames, no screens: dots carry the form.
   ========================================================================= */

.he{position:relative}
.he-pin{position:relative;min-height:100dvh;overflow:hidden}

.he-stage-layer{position:absolute;inset:0;z-index:2;display:grid;place-items:center;
  padding:var(--nav-h) 12px 0;pointer-events:none}

/* one device footprint per stage. --dev-w matches the dot device width (vh-based,
   same basis the dot field uses) so content stays inside the visible silhouette. */
.he-stage{position:absolute;inset:0;display:grid;place-content:center;justify-items:center;
  text-align:center;padding:var(--nav-h) 12px 9vh;gap:clamp(10px,1.6vh,18px);
  --dev-w:min(1040px,88vw)}                  /* default = full screen */
.he-stage:nth-child(1){--dev-w:min(82vh,58vw);padding:16vh 12px 8vh}    /* phone : hero only */
.he-stage:nth-child(2){--dev-w:min(86vw,120vh);padding:13vh 12px 8vh}    /* tablet : hero + copy */
.he-stage:nth-child(3){--dev-w:min(80vw,132vh);padding:11vh 12px 8vh}    /* laptop : hero + previews */
.he-stage:nth-child(4){--dev-w:min(1480px,94vw);padding:10vh 12px 8vh}  /* full : hero + work + systems + impact */
.he-stage > *{max-width:var(--dev-w);pointer-events:auto}

.he-eyebrow{margin:0;font-size:clamp(11px,1.4vh,13px);font-weight:500;color:var(--text-muted)}

.he-headline{margin:0;font-family:var(--font-display);font-weight:300;letter-spacing:-.03em;
  line-height:1.08;color:var(--text-primary);text-wrap:balance;overflow-wrap:break-word;
  max-width:calc(var(--dev-w) * 0.92);       /* keep type off the silhouette edges */
  font-size:clamp(1.9rem,5vw,4rem)}          /* default; per-stage overrides below */
.he-headline .kw-accent{color:var(--blue);font-weight:600}

/* per-stage type sized to its device (vh scales with the device, so it never exceeds it) */
.he-stage:nth-child(1) .he-headline{font-size:clamp(2.2rem,min(11vh,7.6vw),8rem);letter-spacing:-.03em;line-height:1.02}
.he-stage:nth-child(2) .he-headline{font-size:clamp(1.9rem,min(9vh,6.6vw),6.5rem);letter-spacing:-.03em;line-height:1.03}
.he-stage:nth-child(2) .he-sub{margin-top:clamp(24px,6vh,72px);font-size:clamp(1rem,2vh,1.3rem)}
.he-stage:nth-child(3) .he-headline{font-size:clamp(2rem,min(9vh,7.6vw),6.5rem);letter-spacing:-.03em;line-height:1.03}
.he-stage:nth-child(3) .he-previews{margin-top:clamp(28px,7vh,90px)}
.he-stage:nth-child(4) .he-headline{font-size:clamp(2.2rem,7vw,6.8rem);letter-spacing:-.03em;line-height:1.02}
.he-stage:nth-child(4) .he-regions{margin-top:clamp(32px,8vh,110px);
  /* align to the page container (.intro/.work): 1320 max, same side gutters, centred */
  width:calc(min(1320px, 100vw) - clamp(40px,10vw,128px));max-width:none;margin-inline:auto;box-sizing:border-box}

.he-sub{margin:0;color:var(--text-secondary);line-height:1.5;font-size:clamp(.85rem,1.7vh,1.05rem)}

.he-previews{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;width:var(--dev-w)}
.he-prev{flex:1 1 130px;min-width:0;border:1px solid var(--border);border-radius:10px;
  padding:10px 12px;background:var(--bg-elevated);text-align:left}
.he-prev b{display:block;font-weight:700;font-size:clamp(.78rem,1.5vh,.92rem);color:var(--text-primary);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.he-prev span{font-size:clamp(11px,1.3vh,12px);color:var(--text-muted)}

.he-regions{display:grid;grid-template-columns:repeat(3,1fr);width:var(--dev-w);text-align:left;
  border-top:1px solid var(--border);border-left:1px solid var(--border)}
.he-region{border-right:1px solid var(--border);border-bottom:1px solid var(--border);
  padding:14px 18px;min-height:74px;min-width:0;display:flex;flex-direction:column;justify-content:center}
.he-region b{display:block;font-weight:700;font-size:clamp(.85rem,1.6vh,1rem);color:var(--text-primary)}
.he-region span{font-size:clamp(11px,1.3vh,12px);color:var(--text-muted);line-height:1.4;margin-top:2px}

@media (max-width:760px){
  /* STAGE 1 only: typography leads, the phone is allowed to crop behind it */
  .he-stage:nth-child(1){--dev-w:min(80vw,30rem);padding: 11vh 18px 12vh;}
  .he-stage:nth-child(1) .he-headline{font-size:clamp(2rem,10vw,3.6rem);line-height:1.04;letter-spacing:-.025em}
  /* STAGE 2 only: wide tablet, hero headline + supporting copy */
  .he-stage:nth-child(2){--dev-w:min(88vw,34rem);padding:16vh 18px 10vh}
  .he-stage:nth-child(2) .he-headline{font-size:clamp(1.7rem,8vw,3rem);line-height:1.05;letter-spacing:-.02em}
  .he-stage:nth-child(2) .he-sub{margin-top:clamp(16px,4vh,32px);font-size:clamp(.95rem,3.6vw,1.1rem)}
  /* STAGE 4 only: ecosystem, hero headline + grid */
  .he-stage:nth-child(4){--dev-w:min(92vw,38rem);padding:12vh 18px 10vh}
  .he-stage:nth-child(4) .he-headline{font-size:clamp(2rem,9.5vw,3.6rem);line-height:1.03;letter-spacing:-.02em}
  .he-stage:nth-child(4) .he-regions{grid-template-columns:1fr 1fr;margin-top:clamp(20px,5vh,44px)}
  /* STAGE 3 only: laptop, hero headline + work examples */
  .he-stage:nth-child(3){--dev-w:min(88vw,34rem);padding:14vh 18px 10vh}
  .he-stage:nth-child(3) .he-headline{font-size:clamp(1.8rem,9vw,3rem);line-height:1.05;letter-spacing:-.02em}
  .he-stage:nth-child(3) .he-previews{flex-direction:column;margin-top:clamp(20px,5vh,40px)}
}

/* ---- PRELOADER narrative (beneath the RM, never inside it) ---- */
.preloader{position:fixed;inset:0;z-index:6;pointer-events:none}
.preloader__narrative{position:absolute;left:50%;top:63%;transform:translateX(-50%);white-space:nowrap;
  display:flex;align-items:center;gap:16px;font-family:var(--font-display);font-weight:600;
  text-transform:uppercase;letter-spacing:.14em;font-size:clamp(.78rem,1.3vw,.95rem);color:var(--text-muted)}
.preloader__narrative .arrow{color:var(--blue);font-weight:700}
html.intro-done .preloader{display:none}

/* ---- story progress rail (Screen / Product / Platform / Ecosystem) ---- */
.story-rail{position:fixed;left:50%;bottom:22px;transform:translateX(-50%);z-index:50;
  width:min(460px,84vw);pointer-events:none;opacity:0;transition:opacity .5s var(--ease-out)}
.story-rail.is-shown{opacity:1}
.story-rail__icons{display:flex;gap:6px;margin-bottom:8px}
.story-rail__icons .ricon{flex:1;display:flex;justify-content:center;align-items:flex-end}
.story-rail__icons .ricon svg{width:26px;height:24px;color:var(--text-muted);opacity:.4;
  transition:color .3s ease,opacity .3s ease,transform .3s var(--ease-out);transform:translateY(2px) scale(.92)}
.story-rail__icons .ricon.is-active svg{color:var(--text-primary);opacity:1;transform:translateY(0) scale(1)}
.story-rail__labels{display:flex;gap:6px;margin-bottom:9px}
.story-rail__labels .srl{flex:1;text-align:center;font-family:var(--font-display);
  font-size:11px;font-weight:500;letter-spacing:.1em;text-transform:uppercase;
  color:var(--text-muted);opacity:.5;transition:color .3s ease,opacity .3s ease}
.story-rail__labels .srl.is-active{color:var(--text-primary);opacity:1;font-weight:600}
/* clickable stages (only when the rail is shown) */
.story-rail.is-shown .srl,.story-rail.is-shown .ricon{pointer-events:auto;cursor:pointer}
.story-rail.is-shown .srl:hover,.story-rail.is-shown .ricon:hover svg{color:var(--text-primary);opacity:1}
.story-rail .srl:focus-visible{outline:2px solid var(--blue);outline-offset:3px;border-radius:3px;color:var(--text-primary);opacity:1}
.story-rail__track{display:flex;gap:6px}
.story-rail__seg{flex:1;height:2px;background:var(--border);border-radius:2px;overflow:hidden;position:relative}
.story-rail__seg .segfill{position:absolute;top:0;left:0;bottom:0;width:0;background:var(--blue);border-radius:2px}
@media (max-width:760px){
  .story-rail{width:min(300px,80vw);bottom:16px}
  .story-rail__labels{display:none}            /* mobile: icons + minimal 4-segment bar */
  .story-rail__icons .ricon svg{width:22px;height:20px}
}

/* ---- color-reactive headline ink (see core/text-ink.js) ---- */
.ink-letter {
  display: inline;
  background-repeat: no-repeat;
  -webkit-text-fill-color: currentColor; /* fallback before any bloom paints */
}
.ink-letter[style*="transparent"] { -webkit-text-fill-color: transparent; }

/* ===================== BIG CARDS — draggable discipline rail ===================== */
.big-cards{padding:clamp(36px,7vh,84px) 0;overflow:hidden}
.big-cards__track{
  display:flex;gap:clamp(16px,1.6vw,26px);
  padding-inline:clamp(20px,5vw,64px);        /* first card aligns to the page gutter */
  overflow-x:auto;overflow-y:hidden;
  scroll-snap-type:x mandatory;
  cursor:grab;scrollbar-width:none;-webkit-overflow-scrolling:touch;
  overscroll-behavior-x:contain;
}
.big-cards__track::-webkit-scrollbar{display:none}
.big-cards__track.is-dragging{cursor:grabbing;scroll-snap-type:none;scroll-behavior:auto}
.big-card{
  flex:0 0 clamp(280px,38vw,520px);           /* ~2.5 cards visible on desktop */
  scroll-snap-align:start;
  min-height:clamp(360px,56vh,600px);
  border-radius:24px;border:1px solid var(--border);background:var(--bg-elevated,#fff);
  padding:clamp(24px,2.6vw,40px);
  display:flex;flex-direction:column;justify-content:space-between;gap:24px;
  position:relative;overflow:hidden;user-select:none;
  transition:transform .5s var(--ease-out),box-shadow .5s var(--ease-out);
}
.big-card:hover{transform:translateY(-4px);box-shadow:0 24px 60px -28px rgba(15,15,15,.28)}
.big-card__eyebrow{font-size:.72rem;letter-spacing:.14em;text-transform:uppercase;color:var(--text-muted);position:relative;z-index:1}
.big-card__body{position:relative;z-index:1}
.big-card__title{margin:0;font-family:var(--font-display);font-weight:300;
  font-size:clamp(1.7rem,2.6vw,2.6rem);letter-spacing:-.02em;line-height:1.04;color:var(--text-primary)}
.big-card__desc{margin:.7em 0 0;max-width:32ch;color:var(--text-muted);
  font-size:clamp(.95rem,1.1vw,1.08rem);line-height:1.5}
.big-card__num{position:absolute;right:-.06em;bottom:-.22em;z-index:0;pointer-events:none;
  font-family:var(--font-display);font-weight:200;font-size:clamp(7rem,15vw,13rem);line-height:.8;
  color:var(--text-primary);opacity:.045}
/* accent card */
.big-card--accent{background:var(--blue);border-color:transparent}
.big-card--accent .big-card__title{color:#fff}
.big-card--accent .big-card__eyebrow{color:rgba(255,255,255,.7)}
.big-card--accent .big-card__desc{color:rgba(255,255,255,.82)}
.big-card--accent .big-card__num{color:#fff;opacity:.12}
@media (max-width:760px){
  .big-card{flex-basis:min(82vw,420px);min-height:clamp(320px,52vh,480px)}
  .big-cards__track{scroll-snap-type:x proximity}
}

/* ===== big-cards: grid-aligned left gap on load, edge-to-edge on scroll ===== */
.big-cards__track{ padding-inline:0; scroll-snap-type:none; }   /* remove old padding/snap */
.big-card{ scroll-snap-align:none; }
.big-card:first-child{
  /* opens on your 1280 grid line (80px at 1440), min 24px gap on narrow.
     it's a margin, so it scrolls away and cards still reach the edge. */
  margin-inline-start:max(24px, calc((100vw - 1280px) / 2));
}

/* ===== image slot inside each card ===== */
.big-card__media{
  position:relative; z-index:1; flex:1 1 auto; min-height:clamp(120px,18vh,200px);
  border-radius:14px; overflow:hidden; border:1px solid var(--border);
  background:
    radial-gradient(130% 130% at 28% 18%, color-mix(in srgb, var(--blue) 10%, transparent), transparent 62%),
    var(--bg);
}
.big-card__img{
  position:absolute; inset:0; width:100%; height:100%; display:block; object-fit:cover;
  transition:transform .6s var(--ease-out);
}
@media (hover:hover) and (pointer:fine){ .big-card:hover .big-card__img{ transform:scale(1.06); } }
@media (prefers-reduced-motion:reduce){ .big-card__img{ transition:none; transform:none; } }
.big-card--accent .big-card__media{
  border-color:rgba(255,255,255,.24);
  background:
    radial-gradient(130% 130% at 28% 18%, rgba(255,255,255,.14), transparent 60%),
    rgba(255,255,255,.05);
}