/* RenewalSuite — informational site.
   Hand-written CSS on purpose: a static marketing page does not justify a build
   step or a framework, and Cloudflare can serve this directly with no
   configuration. Mobile-first, matching the conventions in the root README. */

/* Taken from the exported brand assets, not sampled by eye. Every SVG in
   assets/ uses exactly these two values, so the page and the logo sitting on
   it match rather than nearly matching. */
:root {
  --navy: #0b2233;
  --navy-soft: #17384f;
  --orange: #f4a340;
  /* The orange as small text on white or --bg: --orange there is 2:1, this 4.7:1. */
  --orange-ink: #a15d09;
  --ink: #0b2233;
  --muted: #5a6b7a;
  --line: #dfe5e9;
  --bg: #f4f6f5;
  --white: #fff;
  --wrap: 1120px;
  --radius: 12px;
}

* { box-sizing: border-box; }

/* Inter 4.1 (SIL OFL, assets/fonts/LICENSE-Inter.txt), the same cut the app
   serves, from here rather than a font service: no third party sees a page load. */
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-4.1.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; }

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

/* ---- header ------------------------------------------------------------ */

/* Not sticky on a phone, where screen height is the scarce thing. It becomes
   sticky from 720px up, where it is a single ~71px row.

   Eight nav items and the brand cannot share a 350px content box: they would
   wrap onto three visual rows — a 165px bar, a fifth of a phone screen spent
   before any content. So the nav collapses into a disclosure instead, which
   makes the bar a single 71px row at 390px — the same height it is on desktop,
   measured rather than estimated. */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  z-index: 10;
}

/* One row, and deliberately no `flex-wrap`: nothing falling onto a second line
   is the entire point. */
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 12px 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand { display: flex; align-items: center; flex: 0 0 auto; }
/* Deliberately does not set `display`. `.brand img` is specificity (0,1,1) and
   would beat the (0,1,0) `.brand-lockup` / `.brand-icon` rules below, silently
   showing both marks at once. Display belongs to the toggles alone. */
.brand img { height: 34px; width: auto; }

/* The full lockup is 191px wide at this height — half the width of a 390px
   phone, which would push the nav onto a second row and the header to 165px tall.
   The tile-only mark says the same thing in 34px. */
.brand-lockup { display: none; }
.brand-icon { display: block; }

/* `margin-left: auto` lives on `.menu`, since that is what sits in the bar
   on a phone. */
.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 22px;
}

.menu {
  position: relative;
  margin-left: auto;
  flex: 0 0 auto;
}

.menu > summary {
  cursor: pointer;
  /* Both lines remove the default disclosure triangle — `list-style` for
     Firefox and current Chrome, the pseudo-element for Safari. */
  list-style: none;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.94rem;
  color: var(--ink);
  white-space: nowrap;
}
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary:hover { border-color: var(--navy); }
.menu[open] > summary { border-color: var(--navy); }

/* `.nav` above sets `display: flex`, which overrides the browser's own hiding of
   a closed `<details>`'s contents — so the closed nav has to be hidden
   explicitly or it renders anyway: at 390px, a 68px-wide, 381px-tall column
   sitting over the hero while the menu is shut.
   The same override is what makes the nav visible on desktop, so it cannot
   simply be dropped. */
.menu:not([open]) > .nav { display: none; }

/* The open menu floats over the page rather than sitting in the bar, so opening
   it does not shove the hero down the screen. */
.menu[open] > .nav {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 20;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  min-width: 210px;
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgb(11 34 51 / 12%);
}

/* The plain links only: the two buttons in the row keep their own padding and
   colour (`.nav a` outranked `.btn-sm`, which left them with no side padding and
   grey text on navy). */
.nav a:not(.btn) {
  text-decoration: none;
  font-size: 0.94rem;
  color: var(--muted);
  padding: 8px 0;
  white-space: nowrap;
}
.nav a:not(.btn):hover { color: var(--ink); }

.btn {
  display: inline-block;
  border-radius: 8px;
  padding: 11px 18px;
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--orange); color: var(--navy); }
.btn-primary:hover { filter: brightness(0.95); }
.btn-dark { background: var(--navy); color: var(--white); }
.btn-dark:hover { background: var(--navy-soft); }
.btn-outline { border-color: var(--line); background: var(--white); color: var(--ink); }
.btn-outline:hover { background: var(--bg); }
.btn-sm { padding: 9px 14px; }

/* ---- sections ---------------------------------------------------------- */

section { padding: 64px 0; }
.section-dark { background: var(--navy); color: var(--white); }
.section-white { background: var(--white); }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--orange-ink);
  margin-bottom: 10px;
}
.section-dark .eyebrow { color: var(--orange); }
.lede { color: var(--muted); font-size: 1.05rem; margin-top: 14px; max-width: 62ch; }
.section-dark .lede { color: #b9c7d3; }

.hero h1 { font-size: 2.1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.hero-grid { display: grid; gap: 36px; }

.mock {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 12px 30px rgba(15, 36, 55, 0.08);
}
.mock-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
}
.mock-row:last-child { border-bottom: 0; }
.pill {
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}
.pill-due { background: #fdecd8; color: #8a5316; }
.pill-open { background: #e4ecf2; color: #33536b; }
.pill-done { background: #ddf0e4; color: #1f6b3d; }

.grid { display: grid; gap: 18px; }
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.card h3 { font-size: 1rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.92rem; }
.section-dark .card { background: var(--navy-soft); border-color: #2c4c68; }
.section-dark .card p { color: #b9c7d3; }

.band { text-align: center; }
.band h2 { font-size: 1.6rem; }

/* ---- pricing ----------------------------------------------------------- */

/* `.card .price`: plain `.price` lost to `.card p`, so prices showed at body size. */
.card .price { font-size: 2rem; font-weight: 700; color: var(--navy); margin: 4px 0 0; }
.card .price span { font-size: 0.9rem; font-weight: 400; color: var(--muted); }
.plan-featured { border-color: var(--orange); border-width: 2px; }
/* Navy on the orange is 7.9:1. `.card .plan-badge`, so `.card p`'s grey cannot win. */
.card .plan-badge {
  display: inline-block; margin: 0 0 8px; padding: 2px 10px; border-radius: 999px;
  background: var(--orange); color: var(--navy);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.plan ul { list-style: none; padding: 0; margin: 16px 0 0; }
.plan li { font-size: 0.9rem; color: var(--muted); padding: 5px 0 5px 22px; position: relative; }
.plan li::before {
  content: "";
  position: absolute; left: 4px; top: 12px;
  width: 9px; height: 5px;
  border-left: 2px solid var(--orange);
  border-bottom: 2px solid var(--orange);
  transform: rotate(-45deg);
}

/* ---- footer ------------------------------------------------------------ */

.site-footer { background: var(--navy); color: #b9c7d3; padding: 44px 0 30px; }
.site-footer a { color: #b9c7d3; text-decoration: none; }
.site-footer a:hover { color: var(--white); }
.footer-grid { display: grid; gap: 26px; }
.footer-grid h4 { color: var(--white); font-size: 0.86rem; margin: 0 0 10px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; font-size: 0.9rem; }
.footer-grid li { padding: 4px 0; }
.footer-bottom {
  border-top: 1px solid #2c4c68;
  margin-top: 30px;
  padding-top: 18px;
  font-size: 0.82rem;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  justify-content: space-between;
}

/* ---- wider screens ----------------------------------------------------- */

@media (min-width: 720px) {
  .site-header { position: sticky; top: 0; }
  .brand-lockup { display: block; }
  .brand-icon { display: none; }

  section { padding: 84px 0; }
  .hero h1 { font-size: 3rem; }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 980px) {
  /* Brand, Product, Use cases, Company, Account: the brand's column a little wider. */
  .footer-grid { grid-template-columns: 1.4fr repeat(4, 1fr); }
  /* The disclosure stops being one here, and not at 720px, because this is
     where the nav actually fits: it measures 660px, the brand lockup another
     191px, and with the gutters that needs ~915px. Switching at 720px put a
     660px nav next to a 191px brand in an 820px window with no `flex-wrap` to
     save it, and the page scrolled sideways by 75px — measured, after being
     missed by reading the CSS.

     Both open and shut are named explicitly because each outranks a plain
     `.menu > .nav` and would otherwise keep its narrow-screen styling: the
     closed one staying hidden, the open one keeping the floating panel for
     anyone who opened the menu and then widened the window. Equal specificity
     to the base rules, so these win on source order.

     `::details-content` covers engines that hide a closed `<details>`'s contents
     with `content-visibility` rather than with `display` on the children. */
  .menu > summary { display: none; }
  .menu::details-content { content-visibility: visible; block-size: auto; }
  .menu:not([open]) > .nav,
  .menu[open] > .nav {
    display: flex;
    position: static;
    flex-direction: row;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }

  .hero-grid { grid-template-columns: 1.05fr 0.95fr; align-items: center; }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---- legal pages (terms.html, privacy.html) ---------------------------- */
.legal { background: var(--white); padding: 56px 0 72px; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); margin-top: 6px; }
.legal h2 { font-size: 1.2rem; margin: 36px 0 10px; }
.legal p, .legal li { color: var(--ink); line-height: 1.65; }
.legal ul { padding-left: 1.25rem; }
.legal li + li { margin-top: 6px; }
.legal a { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }
.legal code { font-size: 0.9em; background: var(--bg); padding: 1px 5px; border-radius: 4px; }
.legal-meta { color: var(--muted); margin-top: 8px; }
/* Unfilled draft text: impossible to miss, so nothing goes live with one left. */
.placeholder { background: #fff3cd; outline: 1px dashed #c58b00; padding: 0 3px; border-radius: 3px; }
.footer-links a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ---- help pages (help/*.html), on the legal pages' column ---------------- */
.legal ol { padding-left: 1.25rem; }
.legal ol li + li { margin-top: 6px; }
.legal .eyebrow a { color: inherit; text-decoration: none; }
.help .lede-sm { color: var(--muted); font-size: 1.05rem; margin-top: 10px; }
.help .toc {
  display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 22px 0 8px; padding: 14px 16px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); font-size: 0.92rem;
}
.help .toc a { text-decoration: none; }
.help .toc a:hover { text-decoration: underline; }
.help h2 { scroll-margin-top: 80px; }
.help dl.terms dt { font-weight: 700; margin-top: 14px; }
.help dl.terms dd { margin: 4px 0 0; line-height: 1.65; }
.help-cards { list-style: none; padding: 0 !important; display: grid; gap: 12px; margin: 26px 0 8px; }
@media (min-width: 640px) { .help-cards { grid-template-columns: 1fr 1fr; } }
.help-cards li + li { margin-top: 0 !important; }
.help-cards a {
  display: block; height: 100%; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none !important; color: var(--ink) !important; background: var(--white);
}
.help-cards a:hover { border-color: var(--navy); }
.help-cards strong { display: block; font-size: 1.05rem; }
.help-cards span { display: block; color: var(--muted); margin-top: 4px; font-size: 0.94rem; }
.help .table-wrap, .legal .table-wrap, .compare .table-wrap { overflow-x: auto; margin: 14px 0; }
.help table, .legal table, .compare table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 0.94rem; }
.help th, .help td, .legal th, .legal td, .compare th, .compare td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.help thead th, .legal thead th, .compare thead th { background: var(--bg); }
/* The comparison on /renewalsuite-vs-spreadsheet sits on a white section, and
   its first column names the row. */
.compare table { background: #fff; margin-top: 8px; }
.compare tbody th { width: 22%; }
.help-back { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); }
.help p + p, .help ul + p, .help ol + p, .help dl + p, .help .table-wrap + p { margin-top: 12px; }
