/* Amaete Chem Lab home page. One shape runs it: a drop of indicator (the #drop clip and the #d symbol).
   It frames every live scene, cuts the buttons, marks the lists and builds the footer's tubes. */
:root {
  --bg: #10151d; --surface: #18202b; --surface2: #222c3a; --ink: #eef2f6; --muted: #a3adba; --accent: #ffb020; --accent-ink: #10151d;
  --white: #f6f8fa; --zobo: #b3123f; --lime: #5fd18a; --sky: #6fb6ff; --gold: #f5c84c;
  --font: Futura, "Futura PT", Jost, "Century Gothic", "Avenir Next", "Trebuchet MS", system-ui, sans-serif;
  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-hero: clamp(3.4rem, 6.4vw, 6.4rem);
  --m: clamp(16px, 3.4vw, 48px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f3f4f1; --surface: #e6e9e4; --surface2: #d6dcd4; --ink: #10151d; --muted: #4a5462; --accent: #f2a100; --accent-ink: #10151d;
  --white: #1a2039; color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: var(--step-body); line-height: 1.5; -webkit-font-smoothing: antialiased; }
main { overflow-x: clip; }
body { overflow-x: hidden; transition: background-color .5s, color .5s; }
a { color: inherit; }
h1, h2 { font-weight: 700; text-transform: uppercase; letter-spacing: -.03em; line-height: .9; margin: 0; }
h1 span, h2 span { display: inline-block; }
p { margin: 0; }
.clip { position: absolute; inset: 0; clip-path: url(#drop); -webkit-clip-path: url(#drop); background: var(--accent); }
.clip canvas { width: 100%; height: 100%; display: block; }

/* bar */
.bar { position: fixed; z-index: 20; inset: 0 0 auto; display: flex; align-items: center; gap: 28px; padding: 18px var(--m); background: var(--bg); transition: transform .5s var(--ease), background-color .5s; }
.bar.hide { transform: translateY(-100%); }
.mark { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 26px; letter-spacing: -.02em; text-decoration: none; text-transform: uppercase; }
.mark svg { width: 20px; height: 26px; fill: var(--accent); transition: transform .6s var(--ease); }
.mark:hover svg { transform: translateY(-4px) rotate(-8deg); }
.bar nav { display: flex; gap: 26px; margin-left: auto; font-weight: 500; }
.bar nav a, .txt, .foot-links nav a { text-decoration: underline 2px transparent; text-underline-offset: 6px; transition: text-decoration-color .3s, text-underline-offset .3s var(--ease); }
.bar nav a:hover, .txt:hover, .txt:focus-visible, .foot-links nav a:hover { text-decoration-color: currentColor; text-underline-offset: 3px; }
.theme { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--surface); color: var(--ink); cursor: pointer; display: grid; place-items: center; transition: transform .4s var(--ease), background-color .3s; }
.theme:hover { transform: rotate(180deg); }
.theme svg { width: 22px; height: 22px; } .theme circle { fill: none; stroke: currentColor; stroke-width: 2; } .theme .half { fill: currentColor; }

/* the button, cut like a drop lying on its side */
.go { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; border-radius: 0 999px 999px 999px; background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none; letter-spacing: .01em; transition: transform .35s var(--ease), border-radius .45s var(--ease), background-color .3s; }
.go:hover, .go:focus-visible { border-radius: 999px 999px 999px 0; transform: translateY(-2px); }
.go:active { transform: scale(.96); }
.go.inv { background: var(--accent-ink); color: var(--accent); }
.go.small { min-height: 40px; padding: 0 18px; font-size: var(--step-small); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* entrances: each part rises on its own */
.js [data-rv] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--dl, 0s); }
.js [data-rv].in { opacity: 1; transform: none; }
.js h1[data-rv] span, .js h2[data-rv] span { transform: translateY(105%); transition: transform 1s var(--ease); transition-delay: calc(var(--dl, 0s) + var(--i, 0) * 90ms); }
.js h1[data-rv], .js h2[data-rv] { overflow: hidden; padding-bottom: .06em; transform: none; }
.js h1[data-rv].in span, .js h2[data-rv].in span { transform: none; }

/* hero */
.hero { position: relative; min-height: 100svh; display: grid; grid-template-columns: repeat(12, 1fr); align-items: center; padding: 120px var(--m) 60px; overflow: hidden; }
.hero-text { grid-column: 1 / 7; position: relative; z-index: 2; }
.hero h1 { font-size: var(--step-hero); margin-bottom: 30px; }
.hero h1 span { display: block; }
.lede { font-size: var(--step-lead); line-height: 1.4; max-width: 27em; color: var(--ink); margin-bottom: 34px; }
.acts { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; margin-bottom: 44px; }
.txt { font-weight: 500; }
.now { font-size: var(--step-small); color: var(--muted); min-height: 2.8em; transition: opacity .3s; }
.now b { color: var(--ink); font-weight: 700; margin-right: 6px; }
.hero-drop { position: absolute; z-index: 1; height: 104vh; width: calc(104vh / 1.3); left: 74%; top: 7vh; transform: translateX(-50%); }
.hero-drop .clip { clip-path: url(#drop); }
.hero-drop { clip-path: inset(100% 0 0 0); transition: clip-path 1.2s var(--ease); }
.hero-drop.open { clip-path: inset(0 0 0 0); }
.hero-drop canvas { transform: scale(1.12); transition: transform 1.6s var(--ease); }
.hero-drop.open canvas { transform: none; }

/* showcase: one practical on the drop */
.show { position: relative; min-height: 100svh; display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: 1fr auto; padding: 120px var(--m) 80px; column-gap: 24px; }
.show-drop { position: relative; grid-column: 6 / 11; grid-row: 1 / 3; align-self: center; justify-self: center; height: 78vh; width: calc(78vh / 1.3); }
.show-drop .clip { transition: background-color .6s var(--ease); }
.show-list { grid-column: 1 / 6; grid-row: 2; align-self: end; }
.show-list h2, .show-list li { font-size: clamp(28px, 2.9vw, 44px); line-height: 1.15; letter-spacing: -.02em; }
.show-list h2 { color: var(--muted); }
.show-list ul { list-style: none; margin: 0; padding: 0; }
.show-list li button { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 14px; text-transform: uppercase; font-weight: 700; color: var(--muted); transition: color .3s, transform .4s var(--ease); }
.show-list li button svg { width: .5em; height: .65em; fill: currentColor; transform: scale(.6); opacity: 0; transition: transform .45s var(--ease), opacity .3s; }
.show-list li button:hover { color: var(--ink); transform: translateX(6px); }
.show-list li button[aria-pressed="true"] { color: var(--ink); }
.show-list li button[aria-pressed="true"] svg { transform: scale(1); opacity: 1; fill: var(--accent); }
.show-fact { grid-column: 11 / 13; grid-row: 2; align-self: end; display: flex; flex-direction: column; gap: 16px; font-size: 17px; }
.show-fact p { transition: opacity .3s; }

/* many into one */
.flow { padding: 140px var(--m) 120px; background: var(--surface); transition: background-color .5s; }
.flow-head { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: end; margin-bottom: 30px; }
.flow-head h2 { grid-column: 1 / 6; font-size: clamp(36px, 4vw, 60px); }
.flow-head p { grid-column: 7 / 12; font-size: var(--step-body); }
#flowCv { width: 100%; aspect-ratio: 4.5; display: block; }
.flow-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 18px; }
.flow-cols b { display: block; font-size: 20px; text-transform: uppercase; margin-bottom: 4px; }
.flow-cols p { font-size: 16px; color: var(--muted); max-width: 26em; }

/* the cutaway, pinned while you scroll */
.inside { position: relative; height: 270vh; }
.inside .pin { position: sticky; top: 0; height: 100svh; display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; overflow: hidden; background: var(--bg); }
.inside canvas { width: 100%; height: 100%; display: block; }
.cut-copy { padding: 0 var(--m) 0 2vw; max-width: 600px; }
.cut-steps { position: relative; min-height: 260px; }
.cs { position: absolute; inset: 0 0 auto; opacity: 0; visibility: hidden; transform: translateY(30px); transition: opacity .6s var(--ease), transform .6s var(--ease), visibility 0s .6s; }
.cs.on { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.cs h2 { font-size: clamp(36px, 4vw, 60px); margin-bottom: 18px; }
.cs p { font-size: 22px; line-height: 1.4; }
.cut-level { height: 8px; background: var(--surface); border-radius: 0 8px 8px 8px; margin-top: 26px; max-width: 320px; overflow: hidden; }
.cut-level i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--accent); border-radius: inherit; }

/* the menu of all twelve */
.all { padding: 160px var(--m) 120px; }
.all h2 { font-size: var(--step-head); }
.all-lede { font-size: var(--step-lead); line-height: 1.4; max-width: 30em; margin-top: 24px; }
.cat { margin-top: 96px; }
.cat-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: 40px; }
.cat-head h3 { font-size: clamp(30px, 3.2vw, 48px); text-transform: uppercase; letter-spacing: -.02em; line-height: 1; margin: 0; }
.cat-head span { font-size: 16px; color: var(--muted); }
.items { display: grid; grid-template-columns: 1fr 1fr; column-gap: 64px; row-gap: 36px; }
.item { display: grid; grid-template-columns: 52px 1fr; gap: 20px; text-decoration: none; opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.cat.in .item { opacity: 1; transform: none; }
.no-js .item, html:not(.js) .item { opacity: 1; transform: none; }
.item svg { width: 40px; height: 52px; fill: var(--hue); transform-origin: 50% 100%; transition: transform .5s var(--ease); animation: wob 5s ease-in-out infinite; animation-delay: var(--wd); }
@keyframes wob { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.06, .94); } }
.item:hover svg { animation: none; transform: translateY(-6px) scale(1.08); }
.item .t { display: flex; justify-content: space-between; gap: 16px; font-weight: 700; font-size: 18px; line-height: 1.3; }
.item .t em { font-style: normal; font-weight: 500; color: var(--muted); white-space: nowrap; }
.item .t b { transition: color .3s; }
.item:hover .t b { color: var(--accent); }
.item p { font-size: 16px; color: var(--muted); max-width: 40ch; margin-top: 4px; }
.item .n { color: var(--ink); font-size: 15px; margin-top: 4px; }

/* shape-marked small points */
.more { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: center; padding: 120px var(--m) 140px 0; background: var(--surface); overflow: hidden; transition: background-color .5s; }
.more-drop { position: relative; grid-column: 1 / 6; height: 82vh; width: calc(82vh / 1.3); margin-left: -12%; justify-self: start; }
.more-text { grid-column: 7 / 13; }
.more h2 { font-size: clamp(40px, 3.4vw, 52px); margin-bottom: 56px; }
.points { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 40px; row-gap: 44px; }
.points li { font-size: 16px; color: var(--muted); }
.points b { display: flex; align-items: center; gap: 10px; font-size: 17px; color: var(--ink); font-weight: 500; text-transform: none; margin-bottom: 4px; }
.points b::before { content: ""; width: .6em; height: .78em; flex: none; background: var(--c, var(--accent)); clip-path: url(#drop); -webkit-clip-path: url(#drop); }
.points li:nth-child(3n+1) { --c: var(--accent); } .points li:nth-child(3n+2) { --c: var(--lime); } .points li:nth-child(3n) { --c: var(--sky); }
.points a { text-decoration: underline 2px; text-underline-offset: 4px; }

/* the close: a row of tiles cropped from a longer one */
.close { display: grid; grid-template-columns: 1.3fr 6fr 1.3fr; gap: 12px; padding: 140px 0; margin: 0 -8vw; }
.tile { height: 380px; border-radius: 0 40px 40px 40px; overflow: hidden; }
.tile canvas { width: 100%; height: 100%; display: block; }
.tile.side.a { background: #2a9b8f; } .tile.side.b { background: var(--surface2); }
.tile.main { background: var(--accent); color: var(--accent-ink); padding: 48px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 18px; }
.tile.main h2 { font-size: clamp(40px, 4.6vw, 72px); }
.tile.main p { font-size: var(--step-lead); line-height: 1.35; max-width: 26em; }

/* footer: the name built from tubes */
.foot { padding: 0 var(--m) 28px; background: var(--bg); }
.blocks { width: 100%; height: auto; aspect-ratio: 10 / 3; display: block; }
.foot-links { display: grid; grid-template-columns: repeat(3, 1fr) 2fr; gap: 24px; margin-top: 56px; font-size: 15px; }
.foot-links nav { display: flex; flex-direction: column; gap: 10px; }
.foot-links nav a { width: fit-content; }
.foot-links p { color: var(--muted); max-width: 26em; }
.foot-last { display: flex; justify-content: space-between; align-items: center; margin-top: 56px; font-size: 15px; font-weight: 700; text-transform: uppercase; }

/* big desktop monitors: the content sits in a centred column (colour fields stay full width) and the type grows */
@media (min-width: 1800px) {
  :root {
    --m: max(48px, calc((100vw - 2000px) / 2));
    --step-body: clamp(1.1875rem, .5rem + .6vw, 1.5rem);
    --step-lead: clamp(1.625rem, .6rem + 1vw, 2.25rem);
    --step-hero: clamp(6.4rem, 5.2vw, 10rem);
    --step-head: clamp(4rem, 3.4vw, 7rem);
  }
  .item p, .flow-cols p { font-size: clamp(16px, .4rem + .5vw, 22px); }
  .show-list h2, .show-list li { font-size: clamp(44px, 2.3vw, 72px); }
  .flow-head h2, .cs h2 { font-size: clamp(60px, 3.2vw, 96px); }
  .cat-head h3 { font-size: clamp(48px, 2.6vw, 80px); }
  .more h2 { font-size: clamp(52px, 2.8vw, 84px); }
  .tile.main h2 { font-size: clamp(72px, 3.8vw, 112px); }
  .show-fact { font-size: clamp(17px, .5rem + .55vw, 24px); grid-column: 10 / 13; }
  .item .t, .points b { font-size: clamp(18px, .5rem + .6vw, 26px); }
  .points li, .cat-head span, .item .n { font-size: clamp(16px, .4rem + .5vw, 21px); }
  .mark { font-size: 32px; } .mark svg { width: 24px; height: 32px; }
  .bar nav { font-size: 1.1em; }
  .go { min-height: 64px; padding: 0 36px; }
}

@media (max-width: 900px) {
  .bar { padding: 14px 16px; gap: 14px; } .mark { font-size: 21px; } .bar nav { gap: 14px; font-size: 15px; } .bar nav a:nth-child(1) { display: none; }
  .hero { display: block; padding: 0 16px; min-height: 100svh; }
  .hero-text { padding-top: 92px; }
  .hero h1 { font-size: 12.4vw; margin-bottom: 18px; }
  .lede { font-size: 17px; margin-bottom: 22px; }
  .acts { gap: 18px; margin-bottom: 0; }
  .now { display: none; }
  .hero-drop { height: calc(104vw * 1.3); width: 104vw; top: max(50svh, 440px); left: 50%; }
  .show { display: flex; flex-direction: column; padding: 100px 16px 70px; gap: 28px; min-height: 0; }
  .show-drop { height: calc(86vw * 1.3); width: 86vw; max-height: 70svh; max-width: calc(70svh / 1.3); align-self: center; }
  .show-list { width: 100%; }
  .show-list h2 { font-size: 26px; margin-bottom: 8px; }
  .show-list ul { display: flex; gap: 24px; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; scroll-snap-type: x proximity; }
  .show-list li { font-size: 26px; white-space: nowrap; scroll-snap-align: start; }
  .show-fact { font-size: 16px; }
  .flow { padding: 100px 16px 90px; }
  .flow-head { display: block; } .flow-head h2 { font-size: 40px; margin-bottom: 16px; }
  #flowCv { aspect-ratio: .75; width: 58%; float: left; margin-right: 4%; }
  .flow-cols { grid-template-columns: 1fr; width: 38%; margin-left: 62%; gap: 0; }
  .flow-cols > div { min-height: calc(58vw * 1.333 / 3); padding-top: 8px; }
  .flow-cols p { font-size: 15px; }
  .flow::after { content: ""; display: block; clear: both; }
  .inside { height: 260vh; }
  .inside .pin { grid-template-columns: 1fr; grid-template-rows: 55% 45%; align-items: start; }
  .cut-copy { padding: 0 16px; width: 100%; }
  .cs h2 { font-size: 34px; margin-bottom: 10px; } .cs p { font-size: 16px; }
  .cut-steps { min-height: 190px; }
  .all { padding: 110px 16px 80px; } .all h2 { font-size: 12vw; } .all-lede { font-size: 17px; }
  .cat { margin-top: 64px; } .cat-head { margin-bottom: 26px; } .cat-head h3 { font-size: 8.5vw; }
  .items { grid-template-columns: 1fr; row-gap: 28px; }
  .item { grid-template-columns: 40px 1fr; gap: 14px; } .item svg { width: 32px; height: 42px; }
  .item p { font-size: 15px; }
  .more { display: block; padding: 90px 16px 90px 0; }
  .more-drop { width: 82vw; height: calc(82vw * 1.3); max-height: 60svh; max-width: calc(60svh / 1.3); margin-left: -6vw; }
  .more-text { padding-left: 16px; margin-top: 40px; } .more h2 { font-size: 30px; margin-bottom: 30px; }
  .points { grid-template-columns: 1fr; row-gap: 26px; padding-left: 22px; }
  .points b { margin-left: -22px; }
  .close { grid-template-columns: 1fr 1fr; padding: 90px 16px; margin: 0; }
  .tile.main { grid-column: 1 / -1; order: -1; height: auto; min-height: 300px; padding: 30px; }
  .tile.main h2 { font-size: 30px; } .tile.main p { font-size: 17px; }
  .tile.side { height: 120px; }
  .foot-links { grid-template-columns: 1fr 1fr; } .foot-links p { grid-column: 1 / -1; }
  /* headings centred on phones: the hero, the list's head, the closing tile */
  .hero-text, .all > h2, .all-lede, .tile.main { text-align: center; }
  .lede, .all-lede { margin-left: auto; margin-right: auto; }
  .acts { display: flex; flex-direction: column; align-items: center; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .hero { display: grid; padding-top: 70px; } .hero-text { padding-top: 0; grid-column: 1 / 8; }
  .hero h1 { font-size: 7vw; } .now { display: none; }
  .hero-drop { width: calc(128vh / 1.3); height: 128vh; top: 16vh; bottom: auto; left: 78%; }
  .inside .pin { grid-template-columns: 1.1fr 1fr; grid-template-rows: none; align-items: center; }
  .cs h2 { font-size: 28px; } .cs p { font-size: 15px; } .cut-steps { min-height: 150px; }
  .show-drop { height: 70svh; width: calc(70svh / 1.3); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-rv], .js [data-rv] span, .item { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero-drop { clip-path: none; transition: none; } .hero-drop canvas { transform: none; transition: none; }
  .item svg { animation: none; }
}
