/* Rekall website. Colours are the app's own (app/src/constants/theme.ts); the calendar blue is the top of
   the logo's calendar page (app/assets/images/logo.svg). No outside fonts: an old-style serif for headings
   and a humanist sans for reading, from what the device already has. */

:root {
  --navy: #14233f;
  --navy-soft: #22355a;
  --cream: #f6f0e1;
  --cream-deep: #ebe2cc;
  --paper: #fffdf7;
  --ink: #0b0b0c;
  --muted: #5c6270;
  --line: #d9cfb8;
  --calendar: #3a5687;
  --blue: #2f7fd1;
  --amber: #e8a012;
  --warn: #8a5a00;
  --warn-soft: #f6e7c4;

  --focus: var(--blue);
  --bar-h: 64px;
  --gutter: 16px;
  --radius: 18px;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", P052, Georgia, serif;
  --sans: Seravek, "Gill Sans Nova", Ubuntu, Calibri, "DejaVu Sans", source-sans-pro, sans-serif;

  color-scheme: light;
}

*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
}

p { margin: 0 0 1em; }

a { color: var(--calendar); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Anchored sections and parts land below the sticky bar, not under it. A section starts right at the bar
   (its own padding keeps the heading clear); a part inside one gets a little room above its heading.
   Without the script the bar is not sticky (it can wrap taller than --bar-h on a phone), so nothing to clear. */
.js section[id],
.js main[id] { scroll-margin-top: var(--bar-h); }
.js article[id] { scroll-margin-top: calc(var(--bar-h) + 12px); }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 30;
  background: var(--paper);
  color: var(--navy);
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 600;
}
.skip:focus { top: 10px; }

/* ------------------------------------------------------------ the bar */

/* Sticky only with the script, whose bar is always --bar-h tall. Without it the links wrap under the logo on a
   phone, and a taller sticky bar would cover the heading a link lands on: there it scrolls away instead. */
.bar {
  position: relative;
  z-index: 20;
  background: var(--navy);
  color: var(--cream);
  border-bottom: 1px solid rgba(246, 240, 225, 0.12);
  --focus: var(--cream);
}
.js .bar { position: sticky; top: 0; }

.bar-inner {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  min-height: var(--bar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--cream);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.brand img { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 0 0 1px rgba(246, 240, 225, 0.25); }

.menu-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px 0 12px;
  border: 1px solid rgba(246, 240, 225, 0.45);
  border-radius: 999px;
  background: transparent;
  color: var(--cream);
  font: 600 1rem/1 var(--sans);
  letter-spacing: 0.02em;
  cursor: pointer;
}
.menu-button:hover { background: rgba(246, 240, 225, 0.1); }
.menu-button[aria-expanded="true"] { background: var(--cream); color: var(--navy); border-color: var(--cream); }

.menu-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  transform-origin: 12px 12px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.menu-button[aria-expanded="true"] .menu-icon-top { transform: translateY(5px) rotate(45deg); }
.menu-button[aria-expanded="true"] .menu-icon-mid { opacity: 0; }
.menu-button[aria-expanded="true"] .menu-icon-bot { transform: translateY(-5px) rotate(-45deg); }

.menu ul { list-style: none; margin: 0; padding: 0; }

.menu a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-height: 44px;
  text-decoration: none;
}

.menu-num {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

/* Without the script: the tabs sit in the bar as plain links, wrapping under the logo when narrow. */
.no-js .bar-inner { flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.no-js .menu ul { display: flex; flex-wrap: wrap; column-gap: 20px; }
.no-js .menu a { align-items: center; color: var(--cream); font-weight: 600; }
.no-js .menu-num { display: none; }

/* With the script: a fold-out panel under the bar, at the right. */
.js .menu:not(.is-open) { display: none; }
.js .menu {
  position: absolute;
  top: calc(100% + 8px);
  right: var(--gutter);
  width: min(320px, calc(100vw - 2 * var(--gutter)));
  background: var(--paper);
  color: var(--navy);
  border-radius: 16px;
  box-shadow: 0 24px 48px -16px rgba(11, 11, 12, 0.45), 0 0 0 1px rgba(20, 35, 63, 0.08);
  /* On a short screen (a phone on its side) the panel scrolls inside itself: it hangs from the sticky bar, so
     scrolling the page would not bring its last tabs into view. */
  max-height: calc(100vh - var(--bar-h) - 16px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  --focus: var(--blue);
}
.js .menu::before {
  content: "";
  display: block;
  height: 10px;
  background: var(--calendar);
}
.js .menu ul { padding: 8px; }
.js .menu li + li { border-top: 1px solid var(--line); }
.js .menu a {
  align-items: center;
  min-height: 56px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
}
.js .menu a:hover { background: var(--cream); }
.js .menu-num { color: var(--calendar); min-width: 1.6em; }

@media (prefers-reduced-motion: no-preference) {
  .js .menu.is-open { animation: fold 0.22s cubic-bezier(0.2, 0.8, 0.2, 1); transform-origin: top right; }
  @keyframes fold {
    from { opacity: 0; transform: translateY(-8px) scale(0.98); }
    to { opacity: 1; transform: none; }
  }
}

/* ------------------------------------------------------------ shared */

.section { padding: 64px 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--calendar);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
/* The logo's tick, small. */
.eyebrow::before {
  content: "";
  width: 11px;
  height: 6px;
  border-left: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  transform: rotate(-45deg) translate(1px, -2px);
}
.eyebrow-light { color: var(--cream-deep); }

h2 { font-size: clamp(2rem, 6vw, 3.1rem); margin-bottom: 16px; }
h3 { font-size: 1.35rem; margin-bottom: 8px; }

.lede { font-size: 1.15rem; color: var(--navy-soft); max-width: 40rem; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}
.button-cream { background: var(--cream); color: var(--navy); }
.button-cream:hover { background: var(--paper); }
.button-ghost { color: var(--cream); box-shadow: inset 0 0 0 1px rgba(246, 240, 225, 0.5); }
.button-ghost:hover { background: rgba(246, 240, 225, 0.1); }

figure { margin: 0; }

/* ------------------------------------------------------------ hero */

.hero {
  display: grid;
  background: var(--navy);
  color: var(--cream);
  --focus: var(--cream);
}
.hero-inner { padding: 48px var(--gutter) 40px; max-width: 1120px; width: 100%; margin: 0 auto; }
.hero h1 {
  color: var(--paper);
  font-size: clamp(2.6rem, 11vw, 4.6rem);
  line-height: 1.02;
  margin-bottom: 18px;
  max-width: 11ch;
}
.hero-line { font-size: 1.2rem; color: var(--cream); max-width: 32rem; margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.hero-photo {
  order: 2;
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: 74% 55%;
}

@media (min-width: 900px) {
  .hero {
    position: relative;
    min-height: min(680px, calc(100vh - var(--bar-h)));
    align-items: center;
    overflow: hidden;
  }
  .hero-photo {
    position: absolute;
    inset: 0;
    height: 100%;
    object-position: 70% 50%;
  }
  .hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--navy) 0%, rgba(20, 35, 63, 0.9) 34%, rgba(20, 35, 63, 0.35) 62%, rgba(20, 35, 63, 0) 80%);
  }
  .hero-inner { position: relative; z-index: 1; padding: 72px 24px; }
}

/* ------------------------------------------------------------ what we do */

.what { background: var(--cream); }

.year {
  list-style: none;
  margin: 40px 0 56px;
  padding: 0;
  display: grid;
  gap: 0;
  counter-reset: step;
}
.year li {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 0 0 22px 52px;
  counter-increment: step;
}
/* A small calendar page per step, with the logo's blue top. */
.year li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: end center;
  padding-bottom: 3px;
  background: linear-gradient(var(--calendar) 0 10px, var(--paper) 10px);
  border: 2px solid var(--navy);
  border-radius: 8px;
  color: var(--navy);
  font: 700 0.85rem/1 var(--sans);
}
.year li::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 38px;
  bottom: 4px;
  border-left: 2px dotted var(--line);
}
.year li:last-child { padding-bottom: 0; }
.year li:last-child::after { display: none; }
.year-when { color: var(--calendar); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.year-what { color: var(--navy); font-family: var(--serif); font-size: 1.2rem; line-height: 1.3; }

@media (min-width: 760px) {
  .year { grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .year li { padding: 52px 0 0; }
  .year li::after { left: 42px; right: -16px; top: 16px; bottom: auto; border-left: 0; border-top: 2px dotted var(--line); }
}

.split { display: grid; gap: 28px; margin-bottom: 56px; }
.split-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--cream-deep);
}
.split-photo-tall img { aspect-ratio: 4 / 3; object-position: 50% 48%; }

.features { display: grid; gap: 0; }
.feature { padding: 22px 0; border-top: 1px solid var(--line); }
.feature:last-child { border-bottom: 1px solid var(--line); }
.feature p:last-child { margin-bottom: 0; }
.feature-num {
  display: inline-block;
  margin: 0 0 10px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--calendar);
  color: var(--paper);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 900px) {
  .split { grid-template-columns: 5fr 7fr; gap: 56px; align-items: start; }
  .split-flip { grid-template-columns: 7fr 5fr; }
  .split-flip .split-photo { order: 2; }
  .split-photo { position: sticky; top: calc(var(--bar-h) + 24px); }
  .split-photo-tall img { aspect-ratio: 4 / 5; }
}

.offline {
  display: grid;
  gap: 16px;
  padding: 28px 24px;
  border-radius: var(--radius);
  background: var(--navy);
  color: var(--cream);
  --focus: var(--cream);
}
.offline h3 { color: var(--paper); }
.offline p { margin: 0; max-width: 44rem; }
.offline-icon path { fill: none; stroke: var(--cream); stroke-width: 3; stroke-linecap: round; }
.offline-icon .offline-slash { stroke: var(--amber); }

@media (min-width: 760px) {
  .offline { grid-template-columns: auto 1fr; align-items: center; gap: 28px; padding: 36px 40px; }
}

/* ------------------------------------------------------------ about us */

.about { background: var(--cream-deep); }
.about-grid { display: grid; gap: 32px; }
.about-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
.contact-line { font-weight: 600; color: var(--navy); }

@media (min-width: 900px) {
  .about-grid { grid-template-columns: 6fr 5fr; gap: 56px; align-items: center; }
  .about-photo img { aspect-ratio: 4 / 5; object-position: 40% 50%; }
}

/* ------------------------------------------------------------ terms & privacy */

.legal { background: var(--paper); }
.legal .wrap { max-width: 800px; }

.draft-note {
  margin: 8px 0 16px;
  padding: 14px 16px;
  border-left: 4px solid var(--amber);
  border-radius: 0 10px 10px 0;
  background: var(--warn-soft);
  color: #5a3b00;
}
.draft-note strong { color: var(--warn); }

.legal-meta { color: var(--muted); font-size: 0.95rem; }

.legal-toc { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 32px; }
.legal-toc a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--cream);
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
}
.legal-toc a:hover { border-color: var(--calendar); }

.doc { padding: 32px 0 8px; border-top: 2px solid var(--navy); }
.doc + .doc { margin-top: 40px; }
.doc h3 { font-size: clamp(1.6rem, 4.5vw, 2.1rem); margin-bottom: 20px; }
.doc h4 {
  margin: 28px 0 8px;
  color: var(--navy);
  font-size: 1.05rem;
  font-weight: 700;
}
.doc p,
.doc li { color: #24272e; }
.doc ul { margin: 0 0 1em; padding-left: 1.25em; }
.doc li { margin-bottom: 0.5em; }
.doc li::marker { color: var(--calendar); }

/* ------------------------------------------------------------ the app, launch list and other pages */

.tag {
  display: inline-block;
  margin: 0 6px 4px 0;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--warn-soft);
  color: #5a3b00;
  font-size: 0.82rem;
  font-weight: 700;
}
.tag-big { margin: 0 0 18px; padding: 5px 14px; font-size: 0.95rem; }

.app-info { background: var(--paper); }
.facts { display: grid; margin: 32px 0 0; }
.fact { padding: 18px 0; border-top: 1px solid var(--line); }
.fact:last-child { border-bottom: 1px solid var(--line); }
.fact dt { margin-bottom: 4px; color: var(--navy); font-family: var(--serif); font-size: 1.2rem; font-weight: 600; }
.fact dd { margin: 0; }
@media (min-width: 760px) {
  .facts { grid-template-columns: 1fr 1fr; column-gap: 56px; }
  .fact:nth-last-child(2) { border-bottom: 1px solid var(--line); }
}

.launch { background: var(--navy); color: var(--cream); --focus: var(--cream); }
.launch h2 { color: var(--paper); }
.launch-grid { display: grid; gap: 28px; }
.launch-line { margin: 0; font-size: 1.15rem; max-width: 34rem; }
.launch-form {
  display: grid;
  gap: 10px;
  padding: 24px 20px;
  border-top: 10px solid var(--calendar);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  --focus: var(--blue);
}
.launch-form > label { color: var(--navy); font-weight: 700; }
.launch-form > input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 2px solid var(--calendar);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: 1.0625rem/1.2 var(--sans);
}
/* The spam trap: people never see it, and Netlify drops a sign-up that fills it in. */
.form-trap { display: none; }
.button-navy { border: 0; background: var(--navy); color: var(--paper); font: 700 1.0625rem/1 var(--sans); cursor: pointer; }
.button-navy:hover { background: var(--navy-soft); }
.form-note { margin: 4px 0 0; color: var(--muted); font-size: 0.95rem; }
@media (min-width: 900px) {
  .launch-grid { grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
  .launch-form { padding: 28px 32px; }
}

.page-top { padding: 56px 0; background: var(--navy); color: var(--cream); --focus: var(--cream); }
.page-top h1 { margin-bottom: 18px; color: var(--paper); font-size: clamp(2.5rem, 9vw, 4.2rem); line-height: 1.04; }
.page-top .hero-line a { color: var(--paper); }
.page-top-grid { display: grid; gap: 36px; }
.page-thanks { min-height: 60vh; display: grid; align-items: center; }
.page-end { margin: 32px 0 0; font-size: 1.1rem; }
.desk-art { display: block; width: 100%; max-width: 520px; height: auto; }
.desk-frame { fill: var(--paper); stroke: var(--cream-deep); stroke-width: 6; }
.desk-rail { fill: var(--navy-soft); }
.desk-lines rect { fill: rgba(246, 240, 225, 0.45); }
.desk-lines .desk-on { fill: var(--cream); }
.desk-top, .desk-booked { fill: var(--calendar); }
.desk-days rect { fill: var(--cream-deep); }
.desk-tick { fill: none; stroke: var(--paper); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.desk-stand { fill: var(--cream-deep); }
@media (min-width: 900px) {
  .page-top { padding: 88px 0; }
  .page-top-grid { grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
}

.contact-cards { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 20px; }
.contact-card {
  display: inline-flex;
  align-items: center;
  min-height: 56px;
  padding: 0 22px;
  border-radius: 14px;
  background: var(--paper);
  color: var(--navy);
  font-size: 1.15rem;
  font-weight: 700;
}
.urgent { margin: 0; color: var(--cream-deep); }
.support-grid { display: grid; gap: 36px; }
.ticks { margin: 0 0 20px; padding-left: 1.25em; }
.ticks li { margin-bottom: 0.5em; }
.ticks li::marker { color: var(--calendar); }
.keep-safe { padding: 14px 16px; border-left: 4px solid var(--amber); border-radius: 0 10px 10px 0; background: var(--warn-soft); color: #5a3b00; }
@media (min-width: 900px) {
  .support-grid { grid-template-columns: 5fr 7fr; gap: 56px; align-items: start; }
}

.js .menu a[aria-current="page"] { background: var(--cream); }
.no-js .menu a[aria-current="page"] { text-decoration: underline; }

/* ------------------------------------------------------------ footer */

.foot {
  background: var(--navy);
  color: var(--cream);
  padding: 40px 0 48px;
  --focus: var(--cream);
}
.foot a { color: var(--cream); }
.foot-inner { display: grid; gap: 16px; }
.foot-brand { display: flex; align-items: center; gap: 10px; margin: 0; font-family: var(--serif); font-size: 1.1rem; }
.foot-brand img { border-radius: 7px; }
.foot-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; column-gap: 20px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; }
.foot-mail { margin: 0; }
.foot-mail a { display: inline-flex; align-items: center; min-height: 44px; }

@media (min-width: 760px) {
  .foot-inner { grid-template-columns: auto 1fr auto; align-items: center; gap: 32px; }
  .foot-links { justify-content: center; }
}

@media (min-width: 760px) {
  :root { --gutter: 24px; }
  .section { padding: 96px 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
