/* ————————————————————————————————————————
   SOUSVIDE.SCIENCE — precision lab, water blue
   ———————————————————————————————————————— */

:root {
  --bg: #F4F7F9;
  --card: #FFFFFF;
  --line: #D8E2E9;
  --ink: #14232E;
  --muted: #5D7285;
  --blue: #1B7FBD;
  --blue-bright: #2593D6;
  --hot: #E2654E;
  --display: "Sora", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 5vw, 72px);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--blue); color: #fff; }

a { color: var(--blue); }

:focus-visible {
  outline: 2px solid var(--blue-bright);
  outline-offset: 3px;
  border-radius: 6px;
}

/* header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px var(--gutter);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: 19px;
  color: var(--ink);
  text-decoration: none;
}

.wordmark span { color: var(--blue); }

.header-right { display: flex; align-items: center; gap: clamp(12px, 2.5vw, 24px); }

.site-header nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.5vw, 24px);
  font-size: 13.5px;
  font-weight: 600;
}

.site-header nav a {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s;
}

.site-header nav a:hover { color: var(--ink); }

.unit-toggle {
  cursor: pointer;
  display: inline-flex;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  padding: 3px;
  gap: 2px;
}

.unit-toggle span {
  padding: 5px 11px;
  border-radius: 999px;
  color: var(--muted);
  transition: background 0.2s, color 0.2s;
}

.unit-toggle span.active {
  background: var(--blue);
  color: #fff;
}

/* hero */

.hero {
  position: relative;
  text-align: center;
  padding: clamp(72px, 12vh, 130px) var(--gutter) clamp(80px, 13vh, 140px);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.ripple {
  position: absolute;
  inset: auto 0 -40%;
  height: 90%;
  pointer-events: none;
  background:
    radial-gradient(60% 45% at 50% 100%, rgba(37, 147, 214, 0.18), transparent 65%),
    radial-gradient(90% 60% at 50% 118%, rgba(27, 127, 189, 0.12), transparent 70%);
}

.readout {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--ink);
  border-radius: 12px;
  padding: 10px 18px;
  margin-bottom: 30px;
  box-shadow: 0 14px 34px rgba(20, 35, 46, 0.18);
}

.readout-label {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: #7FD1A8;
}

.readout-temp {
  font-family: var(--mono);
  font-size: 21px;
  font-weight: 600;
  color: #E8F4FC;
  font-variant-numeric: tabular-nums;
}

.hero h1 {
  position: relative;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(44px, 8.6vw, 104px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.hero h1 em { font-style: normal; color: var(--blue); }

.lede {
  position: relative;
  max-width: 58ch;
  margin: 24px auto 0;
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--muted);
}

.hero-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 34px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  background: var(--blue);
  text-decoration: none;
  border-radius: 999px;
  padding: 15px 28px;
  box-shadow: 0 12px 30px rgba(27, 127, 189, 0.30);
  transition: transform 0.15s, background 0.2s;
}

.hero-cta:hover { background: var(--blue-bright); transform: translateY(-2px); }

/* sections */

.section {
  padding: clamp(64px, 10vh, 116px) var(--gutter);
  border-bottom: 1px solid var(--line);
}

.section-head { max-width: 820px; margin-bottom: clamp(28px, 4vh, 44px); }

.section-head h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(30px, 5vw, 52px);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-head p { color: var(--muted); max-width: 62ch; }

/* chips */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.chip {
  cursor: pointer;
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 18px;
  transition: border-color 0.2s, background 0.2s, color 0.2s, transform 0.15s;
}

.chip:hover { border-color: var(--blue); transform: translateY(-1px); }

.chip.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

/* doneness cards */

.doneness {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 16px;
}

.done-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 22px 20px;
  box-shadow: 0 2px 10px rgba(20, 35, 46, 0.04);
  animation: cardIn 0.35s ease both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.done-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 17.5px;
  margin-bottom: 12px;
}

.done-temp {
  font-family: var(--mono);
  font-weight: 600;
  font-size: clamp(28px, 3.4vw, 36px);
  color: var(--blue);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.done-time {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  margin-top: 6px;
}

.done-time::before { content: "⏱ "; }

.done-note { margin-top: 12px; font-size: 14px; color: var(--muted); }

.done-card.caution .done-temp { color: var(--hot); }

.caution-tag {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--hot);
  border: 1px solid color-mix(in srgb, var(--hot) 45%, transparent);
  border-radius: 999px;
  padding: 3px 10px;
}

/* science */

.science-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.sci {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--blue);
  border-radius: 16px;
  padding: 26px 24px;
}

.sci-no {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 13px;
  color: var(--blue);
}

.sci h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 10px 0 10px;
}

.sci p { color: var(--muted); font-size: 15px; }

/* rules */

.rules { list-style: none; max-width: 780px; }

.rules li {
  padding: 16px 4px;
  border-bottom: 1px dashed var(--line);
  color: var(--muted);
  font-size: 16px;
}

.rules li:first-child { border-top: 1px dashed var(--line); }

.rules strong { color: var(--ink); font-family: var(--display); font-weight: 700; }

.fine-print {
  max-width: 780px;
  margin-top: 22px;
  font-size: 13.5px;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
}

/* footer */

.site-footer {
  padding: 34px var(--gutter) 48px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* reveal */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .done-card { animation: none; }
  .hero-cta:hover, .chip:hover { transform: none; }
}

@media (max-width: 760px) {
  .site-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .header-right { width: 100%; justify-content: space-between; flex-wrap: wrap; row-gap: 8px; }
  .hero { text-align: left; }
  .lede { margin-left: 0; }
}
