/* Anvil EFB — marketing site.
 * Colors and type follow the app's day theme (ios/Anvil/DesignSystem):
 * warm paper, graphite ink, mono labels, restrained corners.
 */

:root {
  --paper: #F1EEE7;        /* dayCard */
  --paper-2: #E8E4DC;      /* daySurface */
  --paper-3: #DDD8CE;      /* daySurfaceRecessed */
  --ink: #1A1A1A;
  --ink-2: #4A4A47;
  --ink-3: #6E6B66;        /* a shade under dayTextTertiary, for contrast at small sizes */
  --line: #C8C2B5;
  --line-2: #B5AE9E;
  --amber: #E8A53D;
  --green: #4FA373;
  --cyan: #5E9CA8;
  --magenta: #A5648A;

  --sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --wrap: 1160px;
  --gutter: 24px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; text-wrap: balance; }
ul, dl, dd, figure { margin: 0; padding: 0; }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper); padding: 10px 16px; z-index: 100;
}
.skip:focus { left: 0; }

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

/* ── Texture ─────────────────────────────────────────────────────────── */

.topo { background-image: url('assets/topo.svg'); background-size: 1440px 960px; }
.topo-ink { background-image: url('assets/topo-ink.svg'); background-size: 1440px 960px; }

/* ── Atoms ───────────────────────────────────────────────────────────── */

.label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.label .num { color: var(--ink); margin-right: 10px; }

.wordmark {
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--ink);
}

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  background: var(--ink); color: var(--paper);
  font-weight: 600; font-size: 15px; letter-spacing: 0.02em;
  text-decoration: none; border-radius: 4px;
  transition: background 0.15s;
}
.button:hover { background: #33332F; }
.button-small { min-height: 40px; padding: 0 16px; font-size: 14px; }

.text-link {
  font-weight: 600; font-size: 15px;
  text-decoration: underline; text-decoration-color: var(--line-2);
  text-underline-offset: 5px; text-decoration-thickness: 1.5px;
}
.text-link:hover { text-decoration-color: var(--ink); }

.store-note {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 18px;
  border: 1.5px solid var(--ink); border-radius: 4px;
  background: var(--paper);
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.store-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }

.points { list-style: none; display: grid; gap: 10px; }
.points li {
  position: relative; padding-left: 22px;
  font-size: 16px; color: var(--ink-2);
}
.points li::before {
  content: ''; position: absolute; left: 0; top: 0.72em;
  width: 10px; height: 1.5px; background: var(--ink);
}

/* ── Top bar ─────────────────────────────────────────────────────────── */

.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(241, 238, 231, 0.92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top-row { display: flex; align-items: center; gap: 32px; height: 64px; }
.top-nav { display: flex; gap: 28px; margin-left: auto; }
.top-nav a {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none; color: var(--ink-2);
  padding: 8px 0;
}
.top-nav a:hover { color: var(--ink); }

/* ── Hero ────────────────────────────────────────────────────────────── */

.hero { padding: 88px 0 0; border-bottom: 1px solid var(--line); overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 64px; align-items: center;
}
.hero h1 {
  font-size: clamp(42px, 6.2vw, 76px);
  font-weight: 700; line-height: 1.02; letter-spacing: -0.025em;
  margin: 20px 0 24px;
}
.lede { font-size: 20px; line-height: 1.5; color: var(--ink-2); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; margin-top: 36px; }

/* The iPad: a graphite bezel around a real screenshot. */
.device {
  background: var(--ink);
  padding: 2.6%;
  border-radius: 5.2% / 3.9%;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 30px 60px -20px rgba(26, 26, 26, 0.35), 0 8px 18px rgba(26, 26, 26, 0.12);
}
.device img { width: 100%; border-radius: 2.8% / 2.1%; background: var(--paper-2); }
.hero-device { max-width: 440px; justify-self: end; width: 100%; }

.readout {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin-top: 88px;
  background: var(--paper);
  border: 1px solid var(--line-2); border-bottom: 0;
}
.readout > div { padding: 20px 24px; border-left: 1px solid var(--line); }
.readout > div:first-child { border-left: 0; }
.readout dt {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3);
}
.readout dd { font-family: var(--mono); font-size: 16px; font-weight: 600; margin-top: 6px; }

/* ── Sections ────────────────────────────────────────────────────────── */

.section { padding: 112px 0; border-bottom: 1px solid var(--line); }
.section-recessed { background-color: var(--paper-2); }
.section-title {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08; letter-spacing: -0.02em;
  margin-top: 16px; max-width: 18em;
}
.section-lede { font-size: 19px; color: var(--ink-2); max-width: 38em; margin-top: 24px; }

.feature {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: 80px; align-items: center;
  padding-top: 96px;
}
.feature + .feature { margin-top: 96px; border-top: 1px solid var(--line); }
.feature-flip .feature-copy { order: 2; }
.feature-flip { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); }
.feature h3 {
  font-size: clamp(26px, 3vw, 36px); line-height: 1.12; letter-spacing: -0.015em;
  margin: 14px 0 18px;
}
.feature-copy > p:not(.label) { color: var(--ink-2); max-width: 32em; margin-bottom: 28px; }

.grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin-top: 56px;
  border-top: 1px solid var(--line-2); border-left: 1px solid var(--line-2);
}
.cell {
  padding: 28px 24px 32px;
  background: var(--paper);
  border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
}
.cell h4 { font-size: 19px; line-height: 1.25; margin: 12px 0 10px; }
.cell p:not(.label) { font-size: 15px; line-height: 1.5; color: var(--ink-2); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: start; }
.split .section-title { max-width: 14em; }
.split-body { padding-top: 34px; }
.split-body > p { font-size: 19px; color: var(--ink-2); margin-bottom: 32px; }

.section-ink { background-color: var(--ink); color: var(--paper); border-bottom-color: var(--ink); }
.section-ink .label { color: #9A978E; }
.section-ink .split-body > p { color: #C9C5BB; }
.points-ink li { color: #C9C5BB; }
.points-ink li::before { background: var(--amber); }

.spec { border-top: 1px solid var(--line-2); background: var(--paper); border: 1px solid var(--line-2); }
.spec > div { display: flex; gap: 24px; padding: 16px 20px; border-top: 1px solid var(--line); }
.spec > div:first-child { border-top: 0; }
.spec dt {
  flex: 0 0 96px;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3);
  padding-top: 4px;
}
.spec dd { font-family: var(--mono); font-size: 15px; font-weight: 500; }

/* ── Themes ──────────────────────────────────────────────────────────── */

.themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 56px; }
.theme { padding: 28px; border-radius: 8px; border: 1px solid; min-height: 220px; display: flex; flex-direction: column; }
.theme-name {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
}
.theme-readout { font-size: 52px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; margin: auto 0 14px; font-variant-numeric: tabular-nums; }
.theme-readout span { font-family: var(--mono); font-size: 14px; font-weight: 500; letter-spacing: 0.12em; }
.theme-note { font-size: 15px; }

/* The app's three palettes, as they are in AnvilColors. */
.theme-day { background: #E8E4DC; border-color: #B5AE9E; color: #1A1A1A; }
.theme-day .theme-name, .theme-day .theme-readout span { color: #6E6B66; }
.theme-day .theme-note { color: #4A4A47; }
.theme-night { background: #0D0F11; border-color: #3A3F45; color: #E8E6E0; }
.theme-night .theme-name, .theme-night .theme-readout span { color: #9A978E; }
.theme-night .theme-note { color: #9A978E; }
.theme-dusk { background: #0A0606; border-color: #3D1414; color: #FF6B5C; }
.theme-dusk .theme-name, .theme-dusk .theme-readout span { color: #B84A3E; }
.theme-dusk .theme-note { color: #B84A3E; }

/* ── Pricing ─────────────────────────────────────────────────────────── */

.plan {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin-top: 56px;
  border: 1.5px solid var(--ink); border-radius: 8px; overflow: hidden;
  background: var(--paper);
}
.plan-main { padding: 40px; border-right: 1px solid var(--line-2); }
.plan-name {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3);
}
.plan-trial { font-size: 52px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.05; margin: 12px 0 16px; }
.plan-main > p:not(.plan-name):not(.plan-trial) { color: var(--ink-2); margin-bottom: 28px; max-width: 26em; }
.prices { border: 1px solid var(--line-2); margin-bottom: 14px; }
.prices > div { display: flex; align-items: baseline; gap: 20px; padding: 16px 20px; border-top: 1px solid var(--line); }
.prices > div:first-child { border-top: 0; }
.prices dt {
  flex: 0 0 84px;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3);
}
.prices dd { font-size: 26px; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.prices dd span { font-family: var(--mono); font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--ink-2); display: block; margin-top: 2px; }
.plan-main > p.price-note { font-size: 13px; color: var(--ink-3); }
.plan-points { padding: 40px; align-content: center; background: var(--paper-2); gap: 14px; }

/* ── Footer ──────────────────────────────────────────────────────────── */

.footer { background-color: var(--paper-2); padding: 72px 0 32px; }
.footer-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 64px; align-items: start; }
.footer .wordmark { font-size: 30px; }
.footer-by { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-top: 6px; }
.footer-note { font-size: 14px; line-height: 1.6; color: var(--ink-2); max-width: 44em; }
.footer-base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line-2);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3);
}

/* ── Narrow screens ──────────────────────────────────────────────────── */

@media (max-width: 960px) {
  .hero { padding-top: 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-device { justify-self: center; max-width: 400px; }
  .readout { grid-template-columns: repeat(2, 1fr); margin-top: 56px; }
  .readout > div:nth-child(3) { border-left: 0; }
  .readout > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .section { padding: 80px 0; }
  .feature, .feature-flip { grid-template-columns: 1fr; gap: 40px; padding-top: 64px; }
  .feature + .feature { margin-top: 64px; }
  .feature-flip .feature-copy { order: 0; }
  .feature .device { max-width: 400px; width: 100%; justify-self: center; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 0; }
  .split-body { padding-top: 28px; }
  .plan { grid-template-columns: 1fr; }
  .plan-main { border-right: 0; border-bottom: 1px solid var(--line-2); }
  .footer-row { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 640px) {
  :root { --gutter: 20px; }
  body { font-size: 16px; }
  .top-nav { display: none; }
  .top-row { justify-content: space-between; }
  .lede { font-size: 18px; }
  .hero-actions { gap: 18px; }
  .store-note { font-size: 12px; padding: 0 14px; }
  .grid { grid-template-columns: 1fr; }
  .themes { grid-template-columns: 1fr; }
  .theme { min-height: 170px; }
  .plan-main, .plan-points { padding: 28px 24px; }
  .plan-trial { font-size: 44px; }
  .readout > div { padding: 16px; }
  .readout dd { font-size: 14px; }
}

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