/* FreezeDry HQ marketing site.
 *
 * Deliberately hand-written CSS with no build step. The site is three static
 * pages of copy, and a toolchain that has to be installed, updated and
 * remembered before a price can be corrected is a tax paid on every edit for a
 * benefit this size of site never collects.
 *
 * Colours are dark navy against the app's light UI. That is a real seam a
 * visitor crosses at signup, and it is the owner's chosen aesthetic, so the
 * accent and the brand mark are kept identical on both sides to carry it.
 */

:root {
  --bg: #0a0e1c;
  --bg-soft: #0f1428;
  --panel: #131a2e;
  --panel-2: #0c1120;
  --border: rgba(255, 255, 255, 0.1);
  --border-soft: rgba(255, 255, 255, 0.06);
  --text: #f2f5fb;
  /* Both greys clear AA (4.5:1) on --bg. The draft's #5B6788 measured 3.9:1 and
   * was carrying real content in the hero caption, so it was lifted rather than
   * kept for contrast alone. */
  --text-soft: #a8b6d4;
  --text-dim: #8494b8;
  --accent: #6fb1ee;
  --accent-hover: #8bc0f0;
  --green: #34d399;
  --maxw: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    'IBM Plex Sans',
    system-ui,
    -apple-system,
    sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Headings set their own line-height here rather than each rule remembering to.
 * The body's 1.55 is right for a paragraph and far too loose for a 30px display
 * heading, and the draft left several headings inheriting it.
 *
 * text-wrap: balance evens the lines out instead of leaving a one-word orphan on
 * the last line. It is what the draft was reaching for with max-width in `ch`,
 * except it measures the actual text rather than guessing from the width of a
 * zero, and it cannot force a break narrower than the longest word. */
h1,
h2,
h3 {
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.015em;
  line-height: 1.15;
  text-wrap: balance;
}

a {
  color: inherit;
}

/* Keyboard focus has to stay visible everywhere. The draft reset link colour to
 * inherit without replacing the outline it suppressed on some browsers. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 640px) {
  .wrap {
    padding: 0 20px;
  }
}

/* Visible only once tabbed to, so a keyboard user can pass the nav. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--bg);
  padding: 10px 18px;
  font-weight: 600;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  left: 8px;
  top: 8px;
}

/* ---------- NAV ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 14, 28, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-soft);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand {
  font-size: 19px;
  white-space: nowrap;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.brand .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18);
  flex: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 14px;
}

/* Named by class rather than as `.nav-links a`. A bare descendant selector here
 * outranks the .btn-nav component class, so the primary call to action rendered
 * in muted grey on its own light blue background: the least readable text on the
 * page was the button the whole site exists to get clicked. Styling the two text
 * links directly leaves the button's own rule to win. */
.nav-links .section-link,
.nav-links .signin {
  text-decoration: none;
}

.nav-links .section-link {
  color: var(--text-soft);
}

.nav-links .signin {
  color: var(--text);
}

.nav-links .section-link:hover,
.nav-links .signin:hover {
  color: var(--accent);
}

/* On a phone the bar has room for the brand and one button. The section links
 * and "Sign in" go, not least because "Sign in" points at the same place the
 * button does: at this width they were wrapping onto two lines each and pushing
 * the brand into a stack of its own. */
@media (max-width: 720px) {
  .nav-links .section-link {
    display: none;
  }
}

@media (max-width: 560px) {
  .nav-links .signin {
    display: none;
  }
}

.btn-primary,
.btn-secondary,
.btn-nav {
  border-radius: 3px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  padding: 13px 24px;
  font-size: 15px;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  padding: 13px 22px;
  font-size: 15px;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-nav {
  background: var(--accent);
  color: var(--bg);
  padding: 9px 18px;
  font-size: 14px;
}

.btn-nav:hover {
  background: var(--accent-hover);
}

/* ---------- HERO ---------- */

.hero {
  padding: 84px 0 88px;
  border-bottom: 1px solid var(--border-soft);
  background: radial-gradient(circle at 18% 0%, rgba(111, 177, 238, 0.1), transparent 55%);
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}

@media (max-width: 900px) {
  .hero .wrap {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero {
    padding: 56px 0 64px;
  }
}

/* No max-width. The hero already sits in a grid column that decides how wide it
 * can be, and the draft's `max-width: 11.5ch` measured the width of a zero in a
 * bold display face, which came out narrower than the word "spreadsheet" at this
 * size: every line broke after a word or two and the long words spilled out of
 * the box anyway. The column governs the width, balance governs the breaks. */
.hero h1 {
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.06;
}

.hero .sub {
  margin-top: 22px;
  font-size: 18px;
  max-width: 40ch;
  color: var(--text-soft);
}

.hero .ctas {
  margin-top: 32px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero .reassure {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-dim);
}

/* Hero visual: the workbook on the left, the record it becomes on the right. */
.morph {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.morph-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 620px) {
  .morph-row {
    grid-template-columns: 1fr;
  }

  .ledger {
    border-right: none;
    border-bottom: 1px dashed var(--border);
  }
}

.ledger,
.record {
  padding: 18px 16px;
}

.ledger {
  border-right: 1px dashed var(--border);
}

/* The rules go behind the rows only. Painted behind the whole panel they start
 * at the panel's top edge, which is a title's height above the first row, so
 * every rule sat a fraction of a line off from the text it belongs under. */
.ledger-lines {
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 27px,
    var(--border-soft) 27px,
    var(--border-soft) 28px
  );
}

.ledger-line {
  height: 28px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--text-soft);
  overflow: hidden;
}

.ledger-line span:first-child {
  color: var(--text);
  opacity: 0.55;
}

.ledger-title,
.record-title {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.03em;
  color: var(--text-dim);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 8px;
}

.record {
  background: var(--panel-2);
}

.record-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.record-card:last-child {
  margin-bottom: 0;
}

.record-card .rk {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--text-soft);
  margin-bottom: 3px;
}

.record-card .rk b {
  font-weight: 600;
  color: var(--text);
}

.record-card .bar {
  height: 4px;
  background: var(--border-soft);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}

.record-card .bar i {
  display: block;
  height: 100%;
  background: var(--accent);
}

.morph-caption {
  padding: 12px 16px;
  font-size: 12px;
  color: var(--text-soft);
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: var(--panel);
}

/* ---------- SHARED SECTION FURNITURE ---------- */

section {
  padding: 76px 0;
}

.section-border {
  border-bottom: 1px solid var(--border-soft);
}

.kicker {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12.5px;
  color: var(--accent);
  margin-bottom: 14px;
}

.section-head {
  max-width: 640px;
  margin-bottom: 44px;
}

.section-head h2 {
  font-size: clamp(26px, 3vw, 34px);
}

.section-head p {
  margin-top: 14px;
  font-size: 17px;
  color: var(--text-soft);
  max-width: 52ch;
}

/* ---------- ORIGIN ---------- */

.origin {
  background: var(--bg-soft);
}

.origin .wrap {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
}

@media (max-width: 900px) {
  .origin .wrap {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* The heading column is a third the height of the prose beside it, which left a
 * tall empty panel doing nothing. Sticking it to the top means it stays with the
 * paragraphs it titles as they scroll, and the space is doing a job. */
.origin-head {
  position: sticky;
  top: 96px;
  align-self: start;
}

.origin h2 {
  font-size: clamp(24px, 3vw, 30px);
}

.origin-body p {
  font-size: 17px;
  margin: 0 0 18px;
  color: var(--text-soft);
  max-width: 56ch;
}

.origin-body p:last-of-type {
  margin-bottom: 0;
}

.origin-signoff {
  margin-top: 24px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 13px;
  color: var(--accent);
  border-top: 1px solid var(--border-soft);
  padding-top: 16px;
}

/* ---------- FEATURES ---------- */

.feature-row {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  padding: 36px 0;
  border-top: 1px solid var(--border-soft);
}

@media (max-width: 800px) {
  .feature-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

.feature-tag {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 13px;
  color: var(--accent);
}

.feature-row h3 {
  font-size: 21px;
  margin-top: 6px;
  font-weight: 600;
}

.feature-body p {
  margin: 0 0 14px;
  color: var(--text-soft);
  max-width: 56ch;
}

.feature-body ul {
  margin: 14px 0 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

.feature-body ul li {
  font-size: 14.5px;
  color: var(--text-soft);
  padding-left: 18px;
  position: relative;
}

.feature-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 1px;
  background: var(--accent);
}

.plan-tag {
  display: inline-block;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 2px;
  padding: 1px 6px;
  margin-left: 8px;
  vertical-align: 2px;
}

/* ---------- WHO IT IS FOR ---------- */

/* A ul, so the three tiers are a list to a screen reader rather than three
 * unrelated divs. That means clearing the markers and the 40px indent the
 * browser adds by default, which grid does not do on its own: the li children
 * stay display: list-item and keep their bullets. */
.tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (max-width: 800px) {
  .tiers {
    grid-template-columns: 1fr;
  }
}

.tier {
  background: var(--bg);
  padding: 32px 28px;
}

.tier .scale-mark {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 18px;
}

.tier h3 {
  font-size: 19px;
  margin-bottom: 10px;
  font-weight: 600;
}

.tier p {
  font-size: 14.5px;
  color: var(--text-soft);
  margin: 0;
}

.machines {
  display: flex;
  gap: 5px;
  margin-top: 20px;
}

.machines i {
  width: 14px;
  height: 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 1px;
  display: block;
}

.machines i.on {
  background: var(--accent);
  border-color: var(--accent);
}

/* ---------- PRICING ---------- */

.plans {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: start;
}

@media (max-width: 980px) {
  .plans {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .plans {
    grid-template-columns: 1fr;
  }
}

.plan {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.plan.featured {
  border-color: var(--accent);
}

.plan-name {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.plan-name h3 {
  font-size: 18px;
  font-weight: 600;
}

.plan-popular {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.plan-price {
  margin-top: 14px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.plan-price.plan-price-quoted {
  font-size: 21px;
  letter-spacing: -0.01em;
}

.plan-price span {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-dim);
}

.plan-annual {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-dim);
  min-height: 20px;
}

.plan ul {
  margin: 20px 0 24px;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: var(--text-soft);
}

.plan ul li {
  padding-left: 18px;
  position: relative;
}

.plan ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 1px;
  background: var(--accent);
}

.plan .plan-cta {
  margin-top: auto;
  text-align: center;
  display: block;
  padding: 11px 16px;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--text);
}

.plan .plan-cta:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.plan.featured .plan-cta {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.plan.featured .plan-cta:hover {
  background: var(--accent-hover);
  color: var(--bg);
}

.pricing-note {
  margin-top: 26px;
  font-size: 14px;
  color: var(--text-dim);
  max-width: 68ch;
}

/* ---------- FINAL CTA ---------- */

.final {
  background: var(--bg-soft);
  border-top: 1px solid var(--border-soft);
}

.final .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.final h2 {
  font-size: clamp(24px, 3.2vw, 32px);
  max-width: 30rem;
}

/* ---------- FOOTER ---------- */

footer {
  padding: 28px 0 40px;
  font-size: 13px;
  color: var(--text-dim);
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

footer nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

footer a {
  color: var(--text-dim);
  text-decoration: none;
}

footer a:hover {
  color: var(--text);
}

/* ---------- PROSE PAGES (terms, privacy) ---------- */

.prose {
  max-width: 70ch;
  padding: 64px 0 88px;
}

.prose h1 {
  font-size: clamp(28px, 3.4vw, 38px);
  margin-bottom: 10px;
}

.prose .updated {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 13px;
  color: var(--text-dim);
  margin: 0 0 36px;
}

.prose h2 {
  font-size: 20px;
  margin: 36px 0 12px;
}

.prose p,
.prose li {
  color: var(--text-soft);
  font-size: 16.5px;
}

.prose ol,
.prose ul {
  padding-left: 20px;
  display: grid;
  gap: 12px;
}

.prose a {
  color: var(--accent);
}
