/* OtterTap website. Built from the Design canvas "OtterTap Website Design" and general/brand/brand.md.
   Change colours, fonts and radii in the tokens below; the whole site follows. */

/* ---------- Fonts (self-hosted, latin subset, variable weight; SIL Open Font License, see /fonts/LICENSE.txt) ---------- */
@font-face {
  font-family: "Fredoka";
  src: url("/fonts/fredoka-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/fonts/nunito-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Colour */
  --bg: #fbf6ee;             /* ivory */
  --surface: #ffffff;
  --sand: #f4ebdd;
  --border: #e8dccb;
  --ink: #2f2219;
  --ink-muted: #5c4a3b;      /* 7.8:1 on ivory */
  --teal: #1b7f75;           /* buttons, links: white on it is 4.8:1 */
  --teal-dark: #0f4a44;
  --teal-bright: #2a9d8f;    /* graphics only */
  --teal-tint: #dff1ee;
  --teal-light: #7fd4c9;     /* on dark */
  --brown: #8c5a3a;
  --dark: #2f2219;
  --dark-card: #3b2d22;
  --dark-border: #4a392c;
  --dark-muted: #e4d6c3;
  --amber: #f2b84b;
  --warn-bg: #fff6e3;
  --warn-ink: #6f5117;
  --danger: #b3261e;
  --ok: #2e7d4f;

  /* Type */
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Fredoka", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", Consolas, monospace;

  /* Shape and space */
  --radius-card: 24px;
  --radius-small: 12px;
  --section-space: clamp(56px, 8vw, 96px);
  --content-width: 1200px;
  --prose-width: 760px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
}
img, svg { max-width: 100%; }
img { height: auto; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--teal-dark); }
:focus-visible { outline: 3px solid var(--teal-bright); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -0.015em; line-height: 1.05; }
h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
li { margin-bottom: .35em; }
strong { font-weight: 800; }

.container { width: 100%; max-width: var(--content-width); margin: 0 auto; padding: 0 24px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: relative; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { flex: none; }
.wordmark { font-family: var(--font-display); font-weight: 600; font-size: 26px; letter-spacing: -0.01em; color: var(--ink); }
.wordmark span { color: var(--teal); }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a:not(.btn) { color: var(--ink); text-decoration: none; padding: 10px 14px; border-radius: 999px; font-weight: 700; font-size: 16px; }
.site-nav a:not(.btn):hover { background: var(--sand); }
.site-nav a.active:not(.btn) { color: var(--teal-dark); background: var(--teal-tint); }
.site-nav .btn { margin-left: 6px; }
.site-nav .btn.is-current { background: var(--teal-dark); }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 10px; padding: 12px; cursor: pointer; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 22px; height: 2px; background: var(--ink); content: ""; }
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before { position: absolute; top: -7px; }
.nav-toggle-bars::after { position: absolute; top: 7px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 28px; border-radius: 999px; border: 2px solid transparent; font: inherit; font-weight: 800; font-size: 17px; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--teal); color: var(--teal-dark); }
.btn-light { background: #fff; color: #145f57; }
.btn-light:hover { background: var(--teal-tint); color: var(--teal-dark); }
.btn-small { padding: 10px 22px; font-size: 16px; }
.btn-large { padding: 16px 32px; font-size: 18px; }
.btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }

/* ---------- Sections ---------- */
.section { padding: var(--section-space) 0; }
.section-white { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-sand { background: var(--sand); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-dark { background: var(--dark); color: var(--dark-muted); }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark a { color: var(--teal-light); }
.section-head { max-width: 42em; margin-bottom: 40px; }
.section-head h2 { margin-bottom: 14px; }
.section-head p { color: var(--ink-muted); font-size: 1.15rem; margin: 0; }
.section-dark .section-head p { color: var(--dark-muted); }
.eyebrow { margin: 0 0 10px; font-weight: 800; font-size: .8rem; letter-spacing: .09em; text-transform: uppercase; color: var(--teal); }
.section-dark .eyebrow { color: var(--teal-light); }
.eyebrow a { color: inherit; }

.ripple { position: absolute; pointer-events: none; right: -260px; top: -180px; max-width: none; }
.page-hero { position: relative; overflow: hidden; }
.page-hero .ripple { width: 700px; height: 700px; right: -220px; top: -300px; }
.page-hero-inner { position: relative; padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(24px, 4vw, 48px); }
.page-hero h1 { max-width: 14em; margin-bottom: 18px; font-size: clamp(2.2rem, 5vw, 3.6rem); }
.page-hero p.lead, .lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--ink-muted); max-width: 34em; }

.hero { position: relative; overflow: hidden; }
.hero-grid { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 56px; align-items: center; padding-top: clamp(40px, 6vw, 88px); padding-bottom: clamp(56px, 7vw, 104px); }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.25rem); margin: 20px 0 22px; }
.hero h1 span { color: var(--teal); }
.hero .lead { margin-bottom: 30px; max-width: 30em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.hero-note { margin: 0; font-size: .92rem; color: var(--ink-muted); }
.chip { display: inline-block; margin: 0; background: var(--teal-tint); color: var(--teal-dark); font-weight: 800; font-size: .92rem; padding: 7px 16px; border-radius: 999px; }
.hero-art { position: relative; justify-self: center; width: 100%; max-width: 500px; padding-top: 18px; }
.hero-badge { position: absolute; top: -16px; right: -26px; transform: rotate(9deg); filter: drop-shadow(0 10px 14px rgba(47, 34, 25, .3)); }

/* Screenshots */
.shot { margin: 0; }
.shot img { display: block; width: 100%; border-radius: 14px; box-shadow: 0 36px 60px -24px rgba(47, 34, 25, .4), 0 0 0 1px var(--border); background: var(--surface); }
.shot figcaption { font-size: .92rem; color: var(--ink-muted); margin-top: 10px; }
.blob { position: relative; justify-self: center; width: 100%; max-width: 440px; }
.blob::before { content: ""; position: absolute; inset: -24px -24px -24px 40px; background: var(--teal-tint); border-radius: 32px; z-index: 0; }
.blob > * { position: relative; z-index: 1; }
.blob-left::before { inset: -22px 36px -22px -22px; }
.blob-right::before { inset: -22px -22px -22px 36px; }
.blob-sand::before { background: var(--sand); }
.section-sand .blob::before { background: var(--teal-tint); }

/* ---------- Cards and grids ---------- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); }
.grid-stretch { align-items: stretch; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 30px; }
.section-white .card { background: var(--bg); }
.card h3 { margin-bottom: .35em; }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--ink-muted); }
.card-dark { background: var(--dark-card); border: 0; border-radius: 20px; padding: 28px; }
.card-dark h3 { font-size: 1.5rem; }
.card-dark p { color: var(--dark-muted); }
.card-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--teal-tint); display: grid; place-items: center; margin-bottom: 20px; color: var(--teal); }
.card-icon svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card-line { padding: 22px 24px; border-radius: 20px; }
.card-line h3 { font-size: 1.4rem; margin-bottom: .25em; }

.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 30px; margin: 0; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--teal); color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; margin-bottom: 16px; }
.steps h3 { font-size: 1.5rem; margin-bottom: .3em; }
.steps p { margin: 0; color: var(--ink-muted); }
.section-sand .steps li { background: var(--surface); }
.steps-small li { padding: 26px; border-radius: 22px; border: 0; }
.steps-small li::before { width: 40px; height: 40px; font-size: 1.25rem; margin-bottom: 12px; }
.steps-small h3 { font-size: 1.4rem; }
.steps-small p { font-size: 1rem; }

/* Feature rows */
.feature-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 56px; align-items: center; padding-top: clamp(32px, 5vw, 56px); padding-bottom: clamp(32px, 5vw, 56px); }
.feature-text h2 { font-size: clamp(1.8rem, 3.6vw, 2.4rem); margin-bottom: 10px; }
.feature-text .intro { margin: 0 0 18px; color: var(--ink-muted); font-size: 1.15rem; }
.feature-text > a { font-weight: 800; font-size: 1.05rem; }
.feature-row .blob { max-width: 420px; }
.checklist { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 11px; }
.checklist li { margin: 0; padding-left: 34px; position: relative; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .32em; width: 22px; height: 22px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B7F75' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") no-repeat center / contain; }

/* Randomness timeline (home) */
.timeline { background: var(--dark-card); border-radius: var(--radius-card); padding: clamp(20px, 3vw, 36px); margin-bottom: 28px; display: grid; gap: 18px; }
.timeline-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.timeline-label { margin: 0; width: 130px; font-weight: 800; color: var(--dark-muted); }
.timeline-row.is-otter .timeline-label { color: #fff; }
.track { position: relative; flex: 1; min-width: 220px; height: 36px; }
.track::before { content: ""; position: absolute; left: 0; right: 0; top: 17px; height: 2px; background: #5a4838; }
.dot { position: absolute; top: 7px; width: 22px; height: 22px; border-radius: 50%; background: #a99683; }
.is-otter .dot { background: var(--teal-bright); }
.fineprint { margin: 28px 0 0; font-size: 1rem; max-width: 46em; color: var(--dark-muted); }

/* Emergency-stop keycap (home) */
.keycap-wrap { text-align: center; justify-self: center; }
.keycap { display: inline-grid; place-items: center; width: 190px; height: 170px; background: var(--surface); border: 2px solid var(--border); border-bottom-width: 12px; border-radius: 30px; font-family: var(--font-display); font-weight: 600; font-size: 84px; line-height: 1; color: var(--ink); box-shadow: 0 20px 30px -18px rgba(47, 34, 25, .35); }
.keycap-caption { margin: 18px 0 0; font-weight: 800; color: var(--teal); }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 56px; align-items: center; }
.stack { display: grid; gap: 18px; }

/* CTA band */
.cta-band { background: var(--teal); color: #fff; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; padding-top: clamp(40px, 6vw, 64px); padding-bottom: clamp(40px, 6vw, 64px); }
.cta-copy { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.cta-copy h2 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 6px; }
.cta-copy p { margin: 0; color: #e6f6f3; }

.callout { background: var(--warn-bg); color: var(--warn-ink); border-radius: 18px; padding: 18px 22px; margin: 0 0 1.2em; font-size: 1.05rem; }
.callout a { color: #5a4210; font-weight: 800; }
.callout-info { background: var(--teal-tint); color: #17564d; }

/* ---------- Prose (guides, legal, FAQ) ---------- */
.prose { max-width: var(--prose-width); }
/* A reading column inside the page container: keep it left-aligned with the rest of the page. */
.container.prose { max-width: var(--content-width); }
.container.prose > * { max-width: var(--prose-width); }
.prose h2 { font-size: clamp(1.6rem, 3vw, 1.9rem); margin-top: 1.8em; }
.prose h3 { font-size: 1.3rem; margin-top: 1.4em; }
.prose figure.shot { max-width: 420px; margin-bottom: 1.2em; }
.prose figure.shot img { box-shadow: 0 24px 40px -22px rgba(47, 34, 25, .4), 0 0 0 1px var(--border); }
kbd { font-family: var(--font-mono); font-size: .85em; background: var(--surface); border: 1px solid var(--border); border-bottom-width: 3px; border-radius: 7px; padding: 1px 8px; white-space: nowrap; }
code { font-family: var(--font-mono); font-size: .9em; background: var(--sand); padding: 1px 7px; border-radius: 6px; }
table { width: 100%; margin: 0 0 1.4em; font-size: 1rem; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
th, td { text-align: left; padding: 13px 16px; vertical-align: top; }
th { background: var(--sand); font-weight: 800; }
td { border-top: 1px solid var(--border); color: #4a3b2f; }
td:first-child { font-weight: 800; color: var(--ink); }

.doc-layout { display: flex; flex-wrap: wrap; gap: 40px 56px; align-items: flex-start; padding-top: clamp(28px, 4vw, 48px); padding-bottom: clamp(56px, 7vw, 88px); }
.doc-side { flex: 1 1 240px; max-width: 300px; min-width: min(240px, 100%); }
.doc-side-title { margin: 0 0 12px; font-weight: 800; font-size: .8rem; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-muted); }
.doc-side nav { display: grid; gap: 4px; }
.doc-side a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1rem; padding: 10px 14px; border-radius: 12px; }
.doc-side a:hover { background: var(--sand); }
.doc-side a.active { color: var(--teal-dark); background: var(--teal-tint); font-weight: 800; }
.doc-article { flex: 999 1 560px; min-width: 0; max-width: var(--prose-width); }
.doc-article h1 { font-size: clamp(2.1rem, 4.6vw, 3.1rem); margin-bottom: 14px; }
.doc-article .lead { margin-bottom: 28px; max-width: none; }
.doc-crumb { margin: 0 0 8px; font-size: .95rem; color: var(--ink-muted); }
.doc-crumb a { font-weight: 700; }
.doc-list { list-style: none; padding: 0; display: grid; gap: 14px; margin: 0; }
.doc-list li { margin: 0; }
.doc-list a { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 20px 24px; text-decoration: none; color: var(--ink); }
.doc-list a:hover { border-color: var(--teal-bright); }
.doc-list strong { display: block; color: var(--teal); font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; }
.doc-list span { color: var(--ink-muted); }
.doc-nav { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--border); }
.doc-nav a { font-weight: 800; }

details { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 0 22px; margin-bottom: 12px; }
summary { cursor: pointer; font-weight: 800; padding: 18px 0; list-style-position: outside; }
details[open] summary { color: var(--teal); }
details p:last-child { padding-bottom: 6px; }

/* ---------- Download and pricing ---------- */
.plan-tag { display: inline-block; align-self: flex-start; background: var(--teal-tint); color: var(--teal-dark); border-radius: 999px; padding: 5px 14px; font-size: .85rem; font-weight: 800; margin-bottom: 10px; }
.plan-tag.is-soon { background: #fff1cc; color: var(--warn-ink); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 28px; padding: clamp(24px, 3vw, 36px); }
.panel.is-featured { border: 2px solid var(--teal); display: flex; flex-direction: column; gap: 14px; }
.panel h2 { font-size: clamp(1.7rem, 3.4vw, 2.2rem); margin-bottom: .4em; }
.panel p { color: var(--ink-muted); }
.plan { display: flex; flex-direction: column; }
.plan .price { font-family: var(--font-display); font-weight: 600; font-size: 2.8rem; line-height: 1; margin: .3em 0 .5em; }
.plan .price small { font-family: var(--font-body); font-size: 1rem; font-weight: 700; color: var(--ink-muted); }
.plan ul { flex: 1; color: var(--ink-muted); }

/* ---------- Forms ---------- */
label { display: block; font-weight: 800; margin: 16px 0 6px; }
input[type="text"], input[type="email"], textarea { width: 100%; padding: 12px 14px; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid #d9cdbb; border-radius: 10px; }
textarea { min-height: 150px; resize: vertical; }
.form-result { margin-top: 12px; font-weight: 800; }
.form-result.ok { color: var(--ok); }
.form-result.error { color: var(--danger); }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: var(--dark-muted); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 36px 48px; padding-top: 56px; padding-bottom: 28px; }
.footer-brand { flex: 1 1 280px; }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-logo .wordmark { font-size: 24px; color: #fff; }
.footer-logo .wordmark span { color: var(--teal-light); }
.footer-brand p { margin: 0; max-width: 22em; font-size: 1rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 36px 48px; }
.footer-links > div { flex: 0 1 150px; }
.footer-heading { font-family: var(--font-body); font-weight: 800; font-size: .8rem; letter-spacing: .09em; text-transform: uppercase; color: #fff; margin: 0 0 12px; }
.footer-links a { display: block; color: var(--dark-muted); text-decoration: none; padding: 4px 0; font-size: 1rem; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-legal { padding-bottom: 40px; }
.footer-legal p { margin: 0; border-top: 1px solid var(--dark-border); padding-top: 22px; font-size: .88rem; color: #cdbba5; max-width: 62em; }

.not-found { text-align: center; padding: 96px 0; }

/* ---------- Small screens ---------- */
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--border); flex-direction: column; align-items: stretch; padding: 12px 24px 20px; gap: 4px; }
  .site-nav.open { display: flex; }
  .site-nav .btn { margin: 8px 0 0; }
  .hero-badge { right: -8px; width: 92px; height: 92px; }
  .feature-row { gap: 32px; }
}
@media (max-width: 520px) {
  body { font-size: 17px; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
