/* ==========================================================================
   Larimar homepage in the visual language of sites.research.google/languages:
   white canvas, Google Sans Flex, grey panels/cards, one accent (Larimar blue)
   used for highlighted lead phrases, pill buttons, centered title screens.
   ========================================================================== */
:root {
  --c-ink: #202124;
  --c-ink-2: #3c4043;
  --c-muted: #5f6368;
  --c-faint: #80868b;
  --c-line: #dadce0;
  --c-panel: #f1f3f4;
  --c-card: #f8f9fa;
  --c-bg: #ffffff;
  --c-accent: #1b6fa8;       /* Larimar blue, AA on white */
  --c-accent-2: #53badd;     /* larimar stone, from the live theme */
  --c-dark: #000000;

  --font-display: "Google Sans Flex", "Google Sans", system-ui, sans-serif;
  --font-body: "Google Sans Flex", "Google Sans", system-ui, sans-serif;
  --radius-l: 28px;
  --radius-m: 16px;
  --header-h: 64px;
}

body { font-size: 16px; font-weight: 400; color: var(--c-ink); }
.hl { color: var(--c-accent); }
.title-xl { font: 400 clamp(44px, 5.4vw, 80px)/1.08 var(--font-display); letter-spacing: -.02em; margin: 0; }
.title-l  { font: 400 clamp(34px, 3.9vw, 56px)/1.12 var(--font-display); letter-spacing: -.015em; margin: 0; }
.title-m  { font: 400 clamp(26px, 2.4vw, 36px)/1.2 var(--font-display); margin: 0; }
.lead     { font: 400 clamp(20px, 1.9vw, 28px)/1.45 var(--font-display); color: var(--c-muted); margin: 0; }
.label    { font: 500 12px/1.3 var(--font-body); letter-spacing: .8px; text-transform: uppercase; color: var(--c-faint); margin: 0; }
.body     { font-size: 15px; line-height: 1.6; color: var(--c-muted); margin: 0; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 22px; border-radius: 999px; border: 0;
  font: 500 14px/1 var(--font-body); text-decoration: none; cursor: pointer;
  background: var(--c-accent); color: #fff;
  transition: background-color .3s ease, color .3s ease, box-shadow .3s ease;
}
.pill:hover { background: #155a89; box-shadow: 0 1px 3px #3c404355; }
.pill.grey { background: var(--c-panel); color: var(--c-ink-2); }
.pill.grey:hover { background: #e8eaed; }
.link { color: var(--c-accent); text-decoration: none; font-size: 14px; font-weight: 500; }
.link:hover { text-decoration: underline; }

/* ---------- Header (white; dark over dark sections) ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 100; height: var(--header-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 24px; background: #fff; border-bottom: 1px solid #0000000f;
  transition: background-color .5s ease, border-color .5s ease;
}
.site-header .brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--c-muted); font-size: 18px; }
.site-header .brand img { height: 34px; width: auto; }
.site-header .brand .logo-light { display: none; }
.site-header .brand span { padding-left: 14px; border-left: 1px solid var(--c-line); white-space: nowrap; }
.site-header nav { display: flex; height: 100%; }
.site-header nav a {
  position: relative; display: grid; place-items: center; padding: 0 18px;
  color: var(--c-ink-2); font-size: 14px; font-weight: 500; text-decoration: none;
}
.site-header nav a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px;
  background: var(--c-accent); transform: scaleX(0); transition: transform .4s var(--base-ease);
}
.site-header nav a.active::after { transform: scaleX(1); }
.site-header nav a:hover { color: var(--c-ink); }
.site-header .actions { justify-self: end; }
.site-header[data-theme="dark"] { background: #000; border-color: #ffffff1a; }
.site-header[data-theme="dark"] .brand { color: #bdc1c6; }
.site-header[data-theme="dark"] .brand span { border-color: #ffffff33; }
.site-header[data-theme="dark"] .brand .logo-dark { display: none; }
.site-header[data-theme="dark"] .brand .logo-light { display: block; }
.site-header[data-theme="dark"] nav a { color: #e8eaed; }
.site-header[data-theme="dark"] .pill.grey { background: #3c4043; color: #fff; }
@media (width < 900px) {
  .site-header { grid-template-columns: 1fr auto; }
  .site-header nav { display: none; }
  .site-header .brand span { display: none; }
}

/* ---------- Loader ---------- */
fx-preloader { background: #fff; }
fx-preloader .bar { background: var(--c-ink); }
fx-preloader .stack img { border-radius: 12px; }

/* ---------- Hero ---------- */
.hero { position: relative; height: 100svh; min-height: 640px; overflow: hidden; background: #000; color: #fff; display: grid; place-items: center; text-align: center; }
.hero video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, #0008 0%, #0004 55%, #0006 100%); }
.hero .copy { position: relative; z-index: 1; padding: 0 20px; max-width: 900px; }
.hero .title-xl { font-weight: 400; }
.hero p { margin: 22px auto 30px; max-width: 460px; font-size: 16px; line-height: 1.5; color: #e8eaed; }
.hero .thumbs-wrap { position: absolute; z-index: 1; left: 0; right: 0; bottom: 28px; }
.hero .thumbs { display: flex; justify-content: center; gap: 6px; align-items: end; }
.hero .thumbs a { display: block; width: 92px; aspect-ratio: 16 / 10; border-radius: 6px; overflow: hidden; opacity: .8; transition: opacity .3s, translate .4s var(--base-ease); }
.hero .thumbs a:hover { opacity: 1; translate: 0 -4px; }
.hero .thumbs img { width: 100%; height: 100%; object-fit: cover; }
.hero .scroll-cue { position: absolute; z-index: 1; right: 28px; bottom: 22px; }
.hero .scroll-cue fx-rive { width: 48px; height: 48px; }
@media (width < 700px) { .hero .thumbs a { width: 58px; } .hero .thumbs a:nth-child(n+6) { display: none; } .hero .scroll-cue { display: none; } }

/* ---------- Intro panel (grey rounded, collage + statement) ---------- */
.intro { padding: 24px 24px 0; }
.intro .panel {
  background: var(--c-panel); border-radius: var(--radius-l);
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center;
  padding: clamp(40px, 6vw, 88px) clamp(24px, 6vw, 96px); min-height: 64vh;
}
.collage { position: relative; aspect-ratio: 1.15; }
.collage fx-tilt { position: absolute; }
.collage fx-tilt > .inner { border-radius: 18px; height: 100%; }
.collage fx-tilt img { width: 100%; height: 100%; object-fit: cover; display: block; }
.collage .c1 { left: 4%;  top: 24%; width: 36%; aspect-ratio: 1 / 1.1; }
.collage .c2 { left: 48%; top: 2%;  width: 30%; aspect-ratio: 1; }
.collage .c2 .inner { border-radius: 50%; }
.collage .c3 { left: 44%; top: 56%; width: 50%; aspect-ratio: 1.6; }
.intro .lead { color: var(--c-muted); }
@media (width < 900px) { .intro .panel { grid-template-columns: 1fr; } }

/* ---------- Floating photos between sections ---------- */
.floaters { position: relative; height: 62vh; overflow: hidden; }
.floaters fx-float { position: absolute; display: block; }
.floaters img { width: 100%; display: block; border-radius: 6px; object-fit: cover; }
.floaters .f1 { left: 12%; top: 16%; width: 11%; }
.floaters .f2 { left: 33%; top: 22%; width: 22%; }
.floaters .f3 { left: 50%; top: 40%; width: 14%; }
.floaters .f4 { left: 6%;  top: 56%; width: 15%; }
.floaters .f5 { left: 70%; top: 10%; width: 14%; }
.floaters .f6 { left: 79%; top: 52%; width: 12%; }
@media (width < 700px) { .floaters { height: 60vh; } .floaters fx-float { width: 26% !important; } }

/* ---------- Title screens ---------- */
.title-screen { min-height: 42vh; display: grid; place-items: center; text-align: center; padding: 56px 20px; }
.title-screen .title-xl { max-width: 22ch; }
.title-screen.lines { gap: 28px; }
.title-screen.lines::before, .title-screen.lines::after { content: ""; width: 1px; height: 56px; background: var(--c-accent); }
.title-screen.dark { background: #000; color: #fff; min-height: 42vh; }

/* ---------- How it works: expanding card carousel ---------- */
.how fx-scroll-progress { height: 440vh; --active: 0; }
.how .sticky { display: grid; grid-template-columns: 1fr; grid-template-rows: auto 1fr; gap: 0; padding: calc(var(--header-h) + clamp(24px, 4vh, 48px)) 0 0; }
.how-head { display: grid; gap: 10px; justify-items: center; text-align: center; padding: 0 20px; }
.how .viewport { position: relative; min-height: 0; overflow: hidden; align-self: stretch; }
.how .track {
  --cw: 172px; --aw: 460px; --gap: 16px;
  position: absolute; left: 50%; top: 50%; margin: 0; padding: 0; list-style: none;
  display: flex; align-items: center; gap: var(--gap);
  transform: translate(calc(-1 * (var(--active) * (var(--cw) + var(--gap)) + var(--aw) / 2)), -50%);
  transition: transform 1s var(--base-ease);
}
.how .step {
  position: relative; opacity: 1; inset: auto;
  flex: 0 0 var(--cw); height: min(400px, 48vh); border-radius: 20px; background: var(--c-card);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 24px; overflow: hidden; cursor: pointer;
  transition: flex-basis 1s var(--base-ease), height 1s var(--base-ease), background-color .4s;
  transform: none;
}
.how .step:hover { background: #f1f3f4; }
.how .step .icon { font-family: "Material Symbols Outlined"; font-size: 26px; color: var(--c-faint); line-height: 1; margin-bottom: 14px; font-variation-settings: "wght" 300; }
.how .step .label { color: var(--c-faint); }
.how .step .art, .how .step .more { opacity: 0; transition: opacity .5s ease; }
.how .step .art { position: absolute; left: 50%; top: 24px; width: 300px; height: 300px; translate: -50%; }
.how .step .art fx-rive { width: 100%; height: 100%; }
.how .step .more { max-height: 0; }
.how .step .more h3 { font: 400 34px/1.15 var(--font-display); color: var(--c-accent); margin: 12px 0 14px; }
.how .step.active { flex-basis: var(--aw); height: min(600px, 66vh); background: var(--c-card); cursor: default; padding: 32px; }
.how .step.active .icon { display: none; }
.how .step.active .art, .how .step.active .more { opacity: 1; transition-delay: .35s; }
.how .step.active .more { max-height: 400px; }
.how .step.active .art { width: min(300px, 34vh); height: min(300px, 34vh); top: 32px; }
@media (width < 700px) {
  .how .track { --cw: 64px; --aw: calc(100vw - 120px); --gap: 10px; }
  .how .step { height: min(320px, 44vh); padding: 18px 12px; }
  .how .step .label { writing-mode: vertical-rl; rotate: 180deg; }
  .how .step.active { padding: 24px; height: min(560px, 64vh); }
  .how .step.active .label { writing-mode: horizontal-tb; rotate: none; }
  .how .step.active .art { width: min(220px, 28vh); height: min(220px, 28vh); }
  .how .step .more h3 { font-size: 26px; }
}

/* ---------- Dark globe section (Google's globe slot): pinned, scroll draws the routes ---------- */
.lane-pin { background: #000; }
.lane-pin fx-scroll-progress { height: 240vh; }
.lane-pin .sticky {
  display: grid; grid-template-columns: 5fr 7fr; align-items: center; gap: 24px;
  padding: var(--header-h) clamp(24px, 6vw, 96px) 0; background: #000; color: #fff;
}
.lane-pin .lead { color: #e8eaed; font-size: clamp(22px, 2.1vw, 30px); margin-bottom: 28px; }
.lane-pin .fine { color: #9aa0a6; font-size: 14px; line-height: 1.6; margin: 28px 0 0; max-width: 460px; }
.lane-pin .fine.asia { margin-top: 10px; color: #80868b; font-style: italic; }
.globe { position: relative; aspect-ratio: 1; width: min(100%, calc(100vh - var(--header-h) - 24px)); justify-self: center; }
.globe fx-rive { position: absolute; inset: 0; }
.globe .tag {
  position: absolute; left: var(--x); top: var(--y); margin: 0; white-space: nowrap;
  font-size: 14px; font-weight: 500; color: #fff; line-height: 1.25;
  transform: translate(16px, -50%);
  opacity: clamp(0, (var(--progress) - var(--at)) * 14, 1);
  pointer-events: none;
}
.globe .tag.left { transform: translate(calc(-100% - 16px), -50%); text-align: right; }
.globe .tag small { display: block; font-size: 12px; font-weight: 400; color: #9aa0a6; }
@media (width < 900px) {
  .lane-pin .sticky { grid-template-columns: 1fr; align-content: center; gap: 8px; }
  .lane-pin .globe { order: -1; width: min(100%, 50vh); }
  .lane-pin .lead { font-size: 18px; margin-bottom: 16px; }
  .lane-pin .fine { display: none; }
  .globe .tag { font-size: 12px; }
  .globe .tag.origin small { display: none; }
}

/* ---------- Stories: fanned photo stacks ---------- */
.stories { overflow-x: clip; display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px 6vw; padding: 24px clamp(24px, 6vw, 120px) 96px; }
.story { text-align: center; text-decoration: none; color: inherit; }
.story:nth-child(odd) { margin-top: 120px; }
.story .fan { position: relative; width: min(380px, 80%); aspect-ratio: .82; margin: 0 auto 36px; }
.story .fan fx-parallax { position: absolute; inset: 0; --radius: 6px; box-shadow: 0 2px 12px #0000001f; transition: rotate .8s var(--base-ease), translate .8s var(--base-ease); }
.story .fan fx-parallax:nth-child(1) { rotate: -7deg; translate: -14% 2%; }
.story .fan fx-parallax:nth-child(2) { rotate: 6deg; translate: 14% -4%; }
.story .fan fx-parallax:nth-child(3) { rotate: 0deg; }
.story:hover .fan fx-parallax:nth-child(1) { rotate: -10deg; translate: -20% 2%; }
.story:hover .fan fx-parallax:nth-child(2) { rotate: 9deg; translate: 20% -4%; }
.story h3 { font: 400 clamp(36px, 3.4vw, 52px)/1.1 var(--font-display); margin: 0 0 8px; }
.story .sub { font-size: 20px; color: var(--c-ink-2); margin: 0 0 10px; }
.story .body { max-width: 340px; margin: 0 auto 14px; }
@media (width < 800px) { .stories { grid-template-columns: 1fr; } .story:nth-child(odd) { margin-top: 0; } }

/* ---------- Quote ---------- */
.quote { padding: 88px 20px; display: grid; place-items: center; }
.quote blockquote { margin: 0; max-width: 980px; text-align: center; font: 400 clamp(22px, 2.3vw, 32px)/1.45 var(--font-display); color: var(--c-muted); }
.quote .chip { display: inline-flex; align-items: center; gap: 10px; margin-top: 36px; padding: 6px 16px 6px 6px; border-radius: 999px; background: var(--c-card); }
.quote .chip img { width: 30px; height: 30px; border-radius: 50%; background: #fff; padding: 5px; }
.quote .chip span { font-size: 12px; line-height: 1.3; color: var(--c-faint); text-align: left; }
.quote .chip b { display: block; font-weight: 500; letter-spacing: .6px; color: var(--c-muted); text-transform: uppercase; }

/* ---------- Media banner ---------- */
.banner { padding: 0 24px; }
.banner .frame { position: relative; border-radius: var(--radius-l); overflow: hidden; height: min(80vh, 760px); display: grid; place-items: center; text-align: center; color: #fff; }
.banner fx-parallax { position: absolute; inset: 0; --radius: 0; }
.banner .frame::after { content: ""; position: absolute; inset: 0; background: #0005; }
.banner .copy { position: relative; z-index: 1; padding: 20px; }
.banner .copy p { margin: 18px 0 0; color: #e8eaed; font-size: 16px; }

/* ---------- Services grid ("Our research" slot) ---------- */
.services { padding: 88px 24px 32px; }
.services h2 { font: 400 28px/1.2 var(--font-display); margin: 0 0 28px; }
.services .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.service {
  position: relative; min-height: 150px; padding: 22px 24px 56px; border-radius: var(--radius-m);
  background: var(--c-panel); color: var(--c-ink-2); text-decoration: none; font-size: 15px; line-height: 1.45;
  transition: background-color .3s ease;
}
.service b { display: block; font-weight: 500; color: var(--c-ink); margin-bottom: 6px; }
.service:hover { background: #e8eaed; }
.service::after { content: "arrow_forward"; font-family: "Material Symbols Outlined"; position: absolute; right: 20px; bottom: 16px; font-size: 22px; color: var(--c-accent); transition: translate .4s var(--base-ease); }
.service:hover::after { translate: 4px 0; }
@media (width < 900px) { .services .grid3 { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { padding: 72px 20px 88px; max-width: 1000px; margin: 0 auto; }
.faq h2 { text-align: center; margin-bottom: 36px; }
.faq details { border-bottom: 1px solid var(--c-line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 30px 0; font: 400 20px/1.35 var(--font-display); color: var(--c-ink-2); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "expand_more"; font-family: "Material Symbols Outlined"; font-size: 24px; color: var(--c-muted); transition: rotate .5s var(--base-ease); }
.faq details[open] summary::after { rotate: 180deg; }
.faq details p { margin: -10px 0 30px; max-width: 760px; color: var(--c-muted); line-height: 1.65; }

/* ---------- Footer ---------- */
.site-footer { background: var(--c-card); padding: 28px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; font-size: 13px; color: var(--c-muted); }
.site-footer img { height: 28px; width: auto; margin-right: 12px; }
.site-footer a { color: var(--c-muted); text-decoration: none; }
.site-footer a:hover { color: var(--c-ink); }
.site-footer .right { margin-left: auto; }

/* ---------- Category galleries ---------- */
fx-story-modal { background: #fff; }
fx-story-modal .close { background: var(--c-ink); }
fx-story-modal .panel.media { width: auto; aspect-ratio: 4 / 5; }
fx-story-modal .panel.media.wide { aspect-ratio: 4 / 3; }
fx-story-modal .panel.media img { width: 100%; height: 100%; object-fit: cover; border-radius: 18px; }
fx-story-modal .panel.text .title-l { margin: 12px 0 18px; }
fx-story-modal .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
fx-story-modal .tags span { background: var(--c-panel); border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--c-ink-2); }
@media (width <= 599.98px) { fx-story-modal .panel.media { height: auto; } }

/* Rive elements must be block-level so width/height apply (the template rule lived in the removed demo CSS) */
fx-rive { display: block; }


/* ---------- Category index: type rows + one photo frame (replaces the fanned stories) ---------- */
.cat-index { padding: clamp(72px, 12vh, 140px) clamp(20px, 6vw, 120px) clamp(72px, 12vh, 140px); display: grid; gap: clamp(32px, 5vh, 56px); max-width: 1440px; margin: 0 auto; }
.ci-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.ci-list { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--c-line); }
.ci-list li { border-top: 1px solid var(--c-line); }
.ci-row { display: grid; grid-template-columns: 44px 1fr auto; align-items: baseline; column-gap: 12px; padding: clamp(16px, 2.4vh, 24px) 0; text-decoration: none; color: var(--c-faint); }
.ci-num { font: 500 12px var(--font-mono, monospace); letter-spacing: .08em; color: var(--c-faint); transition: color .4s; }
.ci-name { font: 400 clamp(30px, 3.6vw, 52px)/1.05 var(--font-display); letter-spacing: -.01em; transition: color .4s, translate .6s var(--base-ease); }
.ci-arrow { font-family: "Material Symbols Outlined"; font-size: 28px; line-height: 1; color: var(--c-accent); opacity: 0; translate: -8px 8px; transition: opacity .4s, translate .5s var(--base-ease); }
.ci-detail { grid-column: 2 / -1; display: grid; grid-template-rows: 0fr; transition: grid-template-rows .6s var(--base-ease); }
.ci-inner { min-height: 0; overflow: hidden; display: grid; gap: 6px; }
.ci-inner .sub { margin-top: 14px; font-weight: 600; color: var(--c-ink); }
.ci-inner .body { color: var(--c-muted); line-height: 1.55; max-width: 46ch; }
.ci-inner .link { margin-top: 6px; }
.ci-list li.active .ci-row { color: var(--c-ink); }
.ci-list li.active .ci-num { color: var(--c-accent); }
.ci-list li.active .ci-name { translate: 6px 0; }
.ci-list li.active .ci-arrow { opacity: 1; translate: 0 0; }
.ci-list li.active .ci-detail { grid-template-rows: 1fr; }
.ci-row:hover .ci-name { color: var(--c-ink); }
.ci-row:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 4px; border-radius: 6px; }

/* the frame: white, 4:5; model photos fill it, cutouts sit whole on white */
.ci-stage { position: relative; aspect-ratio: 4 / 5; max-height: 76vh; justify-self: end; width: 100%; border-radius: var(--radius-l); overflow: hidden; background: #fff; box-shadow: inset 0 0 0 1px var(--c-line); }
.ci-stage figure { position: absolute; inset: 0; margin: 0; clip-path: inset(100% 0 0 0 round var(--radius-l)); transition: clip-path 0s .9s; z-index: 0; }
.ci-stage figure.active { clip-path: inset(0 0 0 0 round var(--radius-l)); transition: clip-path .9s var(--base-ease); z-index: 1; }
/* each photo is an opaque white layer; the incoming one wipes up over the outgoing one (no crossfade ghosting) */
.ci-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 12%; background: #fff;
  clip-path: inset(100% 0 0 0); scale: 1.05; z-index: 0; transition: none; }
.ci-stage img[data-fit="cover"] { object-fit: cover; padding: 0; }
.ci-stage img.on { clip-path: inset(0); scale: 1; z-index: 2; transition: clip-path .9s var(--base-ease), scale 3.2s ease-out; }
.ci-stage img.was { clip-path: inset(0); scale: 1; z-index: 1; }
.ci-stage img.instant { transition: none; }
.ci-tick { position: absolute; left: 24px; right: 24px; bottom: 20px; height: 2px; border-radius: 2px; background: #002E3914; z-index: 2; overflow: hidden; }
.ci-tick::after { content: ""; position: absolute; inset: 0; background: var(--c-accent); transform-origin: left; scale: var(--t, 0) 1; }
@media (width < 900px) {
  .ci-body { grid-template-columns: 1fr; }
  .ci-stage { order: -1; aspect-ratio: 4 / 3.4; max-height: none; justify-self: stretch; }
  .ci-row { grid-template-columns: 34px 1fr auto; }
}
@media (prefers-reduced-motion: reduce) {
  .ci-stage figure, .ci-stage figure.active, .ci-stage img, .ci-stage img.on { transition: none; }
  .ci-tick { display: none; }
}
