/* =========================================================================
   The Carry — Nikhil Kaul for Anthropic
   Refined minimal luxury · expedition palette
   ========================================================================= */

:root{
  /* palette */
  --paper:      #F5F2EA;   /* warm paper ground */
  --paper-deep: #ECE6D8;
  --ink:        #1A1916;   /* near-black */
  --ink-soft:   #4C473D;
  --olive:      #434B38;   /* expedition green */
  --accent:     #C8612A;   /* burnt orange (the compass-rose logo) */
  --accent-dim: #B0561F;
  --stone:      #9C968A;   /* muted captions */
  --hair:       rgba(26,25,22,.16);

  /* type */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body:    "Newsreader", Georgia, serif;

  /* metrics */
  --gutter: clamp(1.5rem, 5vw, 6rem);
  --col-max: 30rem;

  --ease: cubic-bezier(.22,.61,.36,1);
}

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

html{ scroll-behavior:auto; -webkit-text-size-adjust:100%; }

body{
  font-family:var(--body);
  background:var(--paper);
  color:var(--ink);
  font-weight:300;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  overflow-x:hidden;
}

::selection{ background:var(--accent); color:var(--paper); }

a{ color:inherit; }

/* =========================================================================
   LOADER
   ========================================================================= */
.loader{
  position:fixed; inset:0; z-index:1000;
  display:grid; place-items:center;
  background:var(--paper);
  transition:opacity 1.1s var(--ease), visibility 1.1s var(--ease);
}
.loader.is-done{ opacity:0; visibility:hidden; }
.loader__inner{ text-align:center; width:min(80vw,300px); }
.loader__mark{ color:var(--accent); margin-bottom:1.5rem; }
.loader__mark .burst{ transform-origin:50% 50%; animation:spin 9s linear infinite; }
@keyframes spin{ to{ transform:rotate(360deg); } }
.loader__label{
  font-family:var(--body);
  font-size:.72rem; letter-spacing:.42em; text-transform:uppercase;
  color:var(--ink-soft); margin-bottom:1.6rem; padding-left:.42em;
}
.loader__bar{
  height:1px; width:100%; background:var(--hair); position:relative; overflow:hidden;
}
.loader__bar span{
  position:absolute; inset:0 100% 0 0; background:var(--accent);
  transition:right .25s linear;
}
.loader__count{
  margin-top:1rem; font-family:var(--display); font-weight:300;
  font-size:.9rem; color:var(--ink-soft); font-variant-numeric:tabular-nums;
}
.loader__count-total{ color:var(--stone); }

/* =========================================================================
   FIXED SCENE
   ========================================================================= */
.scene{ position:fixed; inset:0; z-index:0; background:var(--paper); }
#scene{ display:block; width:100%; height:100%; }

.scene__fallback{ display:none; }

/* paper scrim — warms the white video plate from the left for text legibility */
.scene__scrim{
  position:absolute; inset:0; pointer-events:none;
  background:
    linear-gradient(90deg,
      var(--paper) 0%,
      rgba(245,242,234,.95) 20%,
      rgba(245,242,234,.72) 38%,
      rgba(245,242,234,.32) 52%,
      rgba(245,242,234,0) 64%),
    radial-gradient(120% 80% at 50% 42%, rgba(0,0,0,0) 58%, rgba(26,25,22,.10) 100%);
}

/* film grain */
.scene__grain{
  position:absolute; inset:-50%; pointer-events:none; opacity:.05; mix-blend-mode:multiply;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation:grain 6s steps(6) infinite;
}
@keyframes grain{
  0%{transform:translate(0,0)} 20%{transform:translate(-4%,3%)}
  40%{transform:translate(3%,-4%)} 60%{transform:translate(-3%,2%)}
  80%{transform:translate(4%,3%)} 100%{transform:translate(0,0)}
}

/* =========================================================================
   TOPBAR
   ========================================================================= */
.topbar{
  position:fixed; top:0; left:0; right:0; z-index:100;
  display:flex; align-items:center; justify-content:space-between;
  padding:1.5rem var(--gutter);
  mix-blend-mode:multiply;
}
.topbar__brand{ display:flex; align-items:center; gap:.6rem; text-decoration:none; }
.topbar__mark{ color:var(--accent); display:grid; place-items:center; }
.topbar__name{
  font-family:var(--display); font-weight:400; font-size:1.05rem; letter-spacing:.01em;
}
.topbar__role{
  font-size:.66rem; letter-spacing:.34em; text-transform:uppercase; color:var(--ink-soft);
}

/* =========================================================================
   STORY / PANELS
   ========================================================================= */
.story{ position:relative; z-index:10; }

.panel{
  min-height:100vh;
  display:flex; align-items:center;
  padding:7.5rem var(--gutter) 5rem;
}
.panel__col{
  max-width:var(--col-max);
  opacity:0; transform:translateY(26px);
  transition:opacity 1s var(--ease), transform 1.1s var(--ease);
  will-change:opacity, transform;
}
.panel__col--wide{ max-width:40rem; }
.panel.is-active .panel__col{ opacity:1; transform:none; }

/* shared type */
.eyebrow,.section-no{
  font-size:.7rem; letter-spacing:.36em; text-transform:uppercase;
  color:var(--accent); margin-bottom:1.4rem; padding-left:.36em;
}
.section-no{ color:var(--ink-soft); }
.section-no::before{
  content:""; display:inline-block; width:1.6rem; height:1px; background:var(--accent);
  vertical-align:middle; margin-right:.9rem; margin-left:-.36em;
}

.display{
  font-family:var(--display);
  font-weight:300; font-optical-sizing:auto;
  font-size:clamp(3.4rem, 11vw, 8.5rem);
  line-height:.92; letter-spacing:-.02em;
  margin-bottom:1.6rem;
}
.display--sm{ font-size:clamp(2.6rem,7vw,4.6rem); }

.head{
  font-family:var(--display);
  font-weight:300; font-optical-sizing:auto;
  font-size:clamp(1.8rem, 4.4vw, 3rem);
  line-height:1.08; letter-spacing:-.015em;
  margin-bottom:1.5rem; max-width:18ch;
}

.lede{
  font-family:var(--display); font-style:italic; font-weight:300;
  font-size:clamp(1.15rem,2.4vw,1.5rem); color:var(--olive);
  line-height:1.35; margin-bottom:1.1rem; max-width:26ch;
}
.hero__sub{
  font-size:1.02rem; color:var(--ink-soft); max-width:30ch; margin-bottom:3rem;
}
.hero__note{
  font-size:.78rem; line-height:1.6; color:var(--stone);
  max-width:46ch; margin:1.5rem 0 0; padding-left:1rem;
  border-left:1px solid var(--hair);
}
.body{
  font-size:clamp(1rem,1.5vw,1.18rem); color:var(--ink-soft);
  margin-bottom:1.1rem; max-width:42ch;
}
.body em{ font-style:italic; color:var(--ink); }

/* scroll cue */
.scrollcue{ display:flex; align-items:center; gap:.9rem; color:var(--ink-soft); }
.scrollcue span{ font-size:.68rem; letter-spacing:.3em; text-transform:uppercase; }
.scrollcue i{
  position:relative; width:1px; height:42px; background:var(--hair); overflow:hidden;
}
.scrollcue i::after{
  content:""; position:absolute; left:0; top:-50%; width:1px; height:50%;
  background:var(--accent); animation:drop 2.1s var(--ease) infinite;
}
@keyframes drop{ 0%{top:-50%} 60%,100%{top:100%} }

/* =========================================================================
   GEAR LIST (achievements)
   ========================================================================= */
.gear{ list-style:none; display:grid; gap:0; border-top:1px solid var(--hair); }
.gear__item{
  display:grid;
  grid-template-columns:1fr;
  gap:.45rem;
  padding:1.5rem 0; border-bottom:1px solid var(--hair);
}
.gear__tag{
  font-size:.66rem; letter-spacing:.26em; text-transform:uppercase; color:var(--accent);
}
.gear__stat{
  font-family:var(--display); font-weight:300; font-size:clamp(2.2rem,5vw,3.2rem);
  line-height:1; letter-spacing:-.02em; font-variant-numeric:tabular-nums;
}
.gear__desc{ font-size:.98rem; color:var(--ink-soft); max-width:46ch; }
@media (min-width:760px){
  .gear__item{
    grid-template-columns:14rem 1fr; align-items:baseline; column-gap:2.5rem; row-gap:.3rem;
  }
  .gear__tag{ grid-row:1; }
  .gear__stat{ grid-column:1; grid-row:2; }
  .gear__desc{ grid-column:2; grid-row:1 / span 2; align-self:center; }
}

/* =========================================================================
   CONTACT
   ========================================================================= */
.panel--contact .panel__col{ max-width:36rem; }
.contact__actions{ margin-top:2.2rem; display:flex; flex-direction:column; gap:1.8rem; }
.btn{
  align-self:flex-start;
  display:inline-block; text-decoration:none;
  font-family:var(--body); font-size:.78rem; letter-spacing:.22em; text-transform:uppercase;
  color:var(--paper); background:var(--ink);
  padding:1.05rem 2.1rem;
  transition:background .4s var(--ease), transform .4s var(--ease);
}
.btn:hover{ background:var(--accent); transform:translateY(-2px); }
.contact__links{ list-style:none; display:flex; flex-wrap:wrap; gap:1.4rem 2rem; }
.contact__links a{
  text-decoration:none; font-size:.95rem; color:var(--ink-soft);
  border-bottom:1px solid var(--hair); padding-bottom:.2rem;
  transition:color .3s var(--ease), border-color .3s var(--ease);
}
.contact__links a:hover{ color:var(--accent); border-color:var(--accent); }
.colophon{
  margin-top:3.5rem; padding-top:1.5rem; border-top:1px solid var(--hair);
  font-size:.78rem; line-height:1.6; color:var(--stone); max-width:52ch;
}

/* =========================================================================
   SCROLL PROGRESS
   ========================================================================= */
.progress{
  position:fixed; left:0; right:0; bottom:0; z-index:100; height:2px;
  background:var(--hair); mix-blend-mode:multiply;
}
.progress span{ display:block; height:100%; width:0; background:var(--accent); }

/* =========================================================================
   FROSTED PLATES (content over the pack) + body emphasis
   ========================================================================= */
.body strong{ color:var(--ink); font-weight:500; }
.body--center{ margin-left:auto; margin-right:auto; text-align:center; max-width:50ch; }

.panel--center{ justify-content:center; }
.plate{
  width:100%; max-width:46rem;
  background:rgba(245,242,234,.55);
  -webkit-backdrop-filter:blur(12px) saturate(1.05);
  backdrop-filter:blur(12px) saturate(1.05);
  border:1px solid rgba(26,25,22,.06);
  border-radius:12px;
  padding:clamp(2rem, 4vw, 3.5rem);
  box-shadow:0 20px 60px rgba(26,25,22,.06);
  opacity:0; transform:translateY(40px);
  transition:opacity 1s var(--ease), transform 1.1s var(--ease);
  will-change:opacity, transform;
}
.plate--wide{ max-width:62rem; }
/* bare = no backing; the cards inside carry the frosting so the pack shows through/between them */
.plate--bare{
  background:transparent; -webkit-backdrop-filter:none; backdrop-filter:none;
  border:none; box-shadow:none; padding:clamp(1rem,2vw,1.5rem) 0;
}
.panel.is-active .plate{ opacity:1; transform:none; }
.plate__head{ text-align:center; max-width:46rem; margin:0 auto 2.6rem; }
.plate__head .section-no::before{ display:none; }
/* in bare sections the heading gets its own frosted "title card" so it stays
   legible over the pack — same glass as the cards, keeping everything cohesive */
.plate--bare .plate__head{
  max-width:38rem; margin:0 auto 2.4rem; padding:1.6rem 2.4rem;
  background:rgba(245,242,234,.62);
  -webkit-backdrop-filter:blur(12px) saturate(1.05);
  backdrop-filter:blur(12px) saturate(1.05);
  border:1px solid rgba(26,25,22,.06); border-radius:16px;
  box-shadow:0 14px 38px rgba(26,25,22,.06);
}
.plate--bare .plate__head .head,
.plate--bare .plate__head .body{ max-width:100%; }
.plate--bare .plate__head .body{ margin-bottom:0; }

/* ── metrics (separated frosted tiles; pack shows in the gaps) ── */
.metrics{
  display:grid; grid-template-columns:repeat(3,1fr); gap:1.1rem; margin-top:1.8rem;
}
.metric{
  padding:1.8rem 1rem; text-align:center;
  background:rgba(245,242,234,.55);
  -webkit-backdrop-filter:blur(10px) saturate(1.05);
  backdrop-filter:blur(10px) saturate(1.05);
  border:1px solid rgba(26,25,22,.06);
  border-radius:12px;
  box-shadow:0 12px 34px rgba(26,25,22,.05);
}
.metric__value{
  font-family:var(--display); font-weight:300;
  font-size:clamp(2.3rem,4.4vw,3.3rem); line-height:1; letter-spacing:-.02em;
  color:var(--ink); font-variant-numeric:tabular-nums;
}
.metric__unit{ font-size:.5em; color:var(--accent); margin-left:.04em; }
.metric__label{ font-size:.82rem; color:var(--ink-soft); margin-top:.85rem; line-height:1.42; }

/* ── kit / gear cards (separated frosted cards; pack shows in the gaps) ── */
.kit{ display:grid; grid-template-columns:1fr 1fr; gap:1.3rem; }
.kit__item{
  padding:1.6rem 1.5rem;
  background:rgba(245,242,234,.55);
  -webkit-backdrop-filter:blur(10px) saturate(1.05);
  backdrop-filter:blur(10px) saturate(1.05);
  border:1px solid rgba(26,25,22,.06);
  border-radius:14px;
  box-shadow:0 12px 34px rgba(26,25,22,.05);
}
.kit__name{
  font-family:var(--display); font-style:italic; font-weight:400;
  font-size:1.2rem; color:var(--olive); margin-bottom:.55rem;
}
.kit__desc{ font-size:.95rem; color:var(--ink-soft); line-height:1.65; }
.kit__desc strong{ color:var(--ink); font-weight:500; }

/* ── why reasons ── */
.reasons{ margin-top:.5rem; }
.reason{ padding:1.6rem 0; border-top:1px solid var(--hair); }
.reason:first-child{ border-top:none; padding-top:.5rem; }
.reason__no{
  font-family:var(--display); font-style:italic; font-size:.98rem;
  color:var(--accent); margin-bottom:.6rem;
}
.reason .body{ margin-bottom:0; max-width:54ch; }

/* ── beyond-work facts (separated frosted cards; pack shows in the gaps) ── */
.facts{ list-style:none; display:grid; grid-template-columns:repeat(3,1fr); gap:1.3rem; }
.fact{
  padding:1.6rem 1.5rem;
  background:rgba(245,242,234,.55);
  -webkit-backdrop-filter:blur(10px) saturate(1.05);
  backdrop-filter:blur(10px) saturate(1.05);
  border:1px solid rgba(26,25,22,.06); border-radius:14px;
  box-shadow:0 12px 34px rgba(26,25,22,.05);
}
.fact__text{ font-size:.98rem; color:var(--ink-soft); line-height:1.65; }
.fact__text strong{ color:var(--ink); font-weight:500; }
.fact__text a{
  color:var(--accent); text-decoration:none;
  border-bottom:1px solid rgba(200,97,42,.4); transition:border-color .3s var(--ease);
}
.fact__text a:hover{ border-color:var(--accent); }

/* ── AI competency cards ── */
.aicards{ display:grid; grid-template-columns:1fr 1fr; gap:1.2rem; }
.aicard{
  background:rgba(245,242,234,.5); border:1px solid var(--hair);
  border-radius:5px; padding:1.7rem 1.5rem;
}
.aicard__title{
  font-family:var(--display); font-weight:400; font-size:1.12rem;
  color:var(--ink); line-height:1.2; margin-bottom:.55rem;
}
.aicard__desc{ font-size:.88rem; color:var(--ink-soft); line-height:1.6; }
.aicard__tag{
  display:inline-block; margin-top:1.1rem;
  font-size:.62rem; letter-spacing:.18em; text-transform:uppercase;
  padding:.32rem .72rem; border-radius:3px;
}
.tag--claude{ background:rgba(200,97,42,.12); color:var(--accent-dim); }
.tag--collab{ background:rgba(67,75,56,.13); color:var(--olive); }
.tag--point{ background:var(--ink); color:var(--paper); letter-spacing:.2em; }

/* ── build process (section 06) — frosted cards; pack shows in the gaps ── */
.process{ list-style:none; display:grid; grid-template-columns:repeat(3,1fr); gap:1.3rem; }
.step{
  padding:1.6rem 1.5rem;
  background:rgba(245,242,234,.55);
  -webkit-backdrop-filter:blur(10px) saturate(1.05);
  backdrop-filter:blur(10px) saturate(1.05);
  border:1px solid rgba(26,25,22,.06); border-radius:14px;
  box-shadow:0 12px 34px rgba(26,25,22,.05);
}
.step__no{
  display:block; margin-bottom:.7rem;
  font-family:var(--display); font-style:italic; font-weight:400;
  font-size:1.2rem; color:var(--accent);
}
.step__text{ font-size:.98rem; color:var(--ink-soft); line-height:1.65; }

/* contact links spacing in the new layout */
.panel--contact .contact__links{ margin-top:2.2rem; }

/* =========================================================================
   LIVELINESS — soft idle float + gentle hover on the cards
   ========================================================================= */
@keyframes floaty{ 0%,100%{ translate:0 0 } 50%{ translate:0 -5px } }

.kit__item, .metric, .fact, .step{
  animation:floaty 7s ease-in-out infinite;
  transition:scale .45s var(--ease), box-shadow .45s var(--ease);
  will-change:translate;
}
.kit__item:hover, .metric:hover, .fact:hover, .step:hover{
  scale:1.025;
  box-shadow:0 20px 46px rgba(26,25,22,.13);
  animation-play-state:paused;
}
/* stagger the float so the cards drift out of sync (more organic) */
.metric:nth-child(2){ animation-delay:-.9s }
.metric:nth-child(3){ animation-delay:-1.8s }
.metric:nth-child(4){ animation-delay:-2.7s }
.metric:nth-child(5){ animation-delay:-3.6s }
.metric:nth-child(6){ animation-delay:-4.5s }
.kit__item:nth-child(2){ animation-delay:-1.1s }
.kit__item:nth-child(3){ animation-delay:-2.2s }
.kit__item:nth-child(4){ animation-delay:-3.3s }
.kit__item:nth-child(5){ animation-delay:-4.4s }
.kit__item:nth-child(6){ animation-delay:-5.5s }
.fact:nth-child(2), .step:nth-child(2){ animation-delay:-1.6s }
.fact:nth-child(3), .step:nth-child(3){ animation-delay:-3.2s }

/* =========================================================================
   RESPONSIVE / FALLBACK
   ========================================================================= */
/* On small screens or reduced-motion, drop the canvas scrub for a static hero. */
body.is-static .scene #scene{ display:none; }
body.is-static .scene__fallback{
  display:block; position:absolute; inset:0; width:100%; height:100%;
  object-fit:contain; object-position:center 88%; padding:0 6vw 4vh;
}
body.is-static .scene__scrim{
  background:linear-gradient(180deg, var(--paper) 0%, rgba(245,242,234,.55) 46%, rgba(245,242,234,.82) 74%, rgba(245,242,234,.45) 100%);
}
body.is-static .panel{ min-height:auto; padding-top:4rem; padding-bottom:4rem; }
body.is-static .panel__col,
body.is-static .plate{ opacity:1; transform:none; }
/* over the fixed fallback image, firm the cards up for legibility and stop the float */
body.is-static .plate,
body.is-static .plate--bare .plate__head,
body.is-static .metric,
body.is-static .kit__item,
body.is-static .fact,
body.is-static .step{ background:rgba(245,242,234,.92); }
body.is-static .metric,
body.is-static .kit__item,
body.is-static .fact,
body.is-static .step{ animation:none; }
body.is-static .panel--hero{
  padding-top:7rem; min-height:100vh; align-items:flex-start;
}

@media (prefers-reduced-motion:reduce){
  .loader__mark .burst,.scrollcue i::after,.scene__grain,
  .kit__item,.metric,.fact,.step{ animation:none; }
  .panel__col{ transition:none; }
}

@media (max-width:760px){
  .kit, .aicards, .facts, .process{ grid-template-columns:1fr; }
  .plate{ background:rgba(245,242,234,.9); }
  .plate--bare .plate__head{ background:rgba(245,242,234,.92); }
  /* keep hero text at the top so the pack (lower in frame) stays clear,
     whether the scrub is running or we fell back to the static image */
  .panel--hero{ align-items:flex-start; padding-top:7rem; }
}

@media (max-width:600px){
  :root{ --col-max:100%; }
  .topbar__role{ display:none; }
  .scene__scrim{
    background:linear-gradient(180deg, rgba(245,242,234,.88) 0%, rgba(245,242,234,.58) 42%, rgba(245,242,234,.86) 72%, var(--paper) 100%);
  }
  .metrics{ grid-template-columns:1fr 1fr; gap:.8rem; }
  .plate__head{ margin-bottom:1.8rem; }
}
