/* Folio website: the app's brand (Paper, Ink, Folio Green, Harvest Gold; Outfit and Inter), light and dark. */

:root {
  --paper: #F6F1E7;
  --ink: #10221B;
  --green: #0E4D3A;
  --gold: #F2B33D;

  --bg: var(--paper);
  --surface: #FFFFFF;
  --text: var(--ink);
  --muted: #4A5A52;
  --subtle: #6B7A72;
  --line: #E6E0D4;
  --accent: var(--green);
  --on-accent: var(--paper);
  --frame: var(--ink);

  --heading: 'Outfit', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --body: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color-scheme: light dark;
}

/* Dark follows the system unless the toggle chose a theme (theme.js sets data-theme on <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1A14;
    --surface: #13261E;
    --text: var(--paper);
    --muted: #B8C2BC;
    --subtle: #8E9B94;
    --line: #2A3D34;
    --accent: #8FD9B6;
    --on-accent: var(--ink);
    --frame: #2F4A3E;
  }
}

:root[data-theme="dark"] {
  --bg: #0B1A14;
  --surface: #13261E;
  --text: var(--paper);
  --muted: #B8C2BC;
  --subtle: #8E9B94;
  --line: #2A3D34;
  --accent: #8FD9B6;
  --on-accent: var(--ink);
  --frame: #2F4A3E;
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
}

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }

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

.site-header { padding: 20px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 10px; display: block; }
.brand span { font-family: var(--heading); font-weight: 600; font-size: 26px; letter-spacing: -0.5px; }

.header-end { display: flex; align-items: center; gap: 20px; }
.site-nav { display: flex; gap: 20px; font-size: 15px; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }

/* ---------------------------------------------------------- theme toggle */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle svg { width: 20px; height: 20px; }
.no-js .theme-toggle { display: none; }

/* The icon shows the theme a click switches to: a moon while light, a sun while dark. */
.theme-toggle .sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: none; }
}
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }

/* ------------------------------------------------------------------ hero */

.hero { padding: 48px 0 56px; }
.hero h1 {
  font-family: var(--heading);
  font-weight: 600;
  font-size: clamp(36px, 6vw, 60px);
  line-height: 1.08;
  letter-spacing: -1px;
  margin: 0 0 20px;
  max-width: 18ch;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.lede { font-size: 20px; color: var(--muted); max-width: 36em; margin: 0 0 32px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: 15px;
}
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }

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

.screens { padding: 0 0 64px; }
.screens h2 { font-family: var(--heading); font-weight: 600; font-size: 28px; margin: 0 0 20px; }
.shots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.shot { margin: 0; }
.shot .frame {
  aspect-ratio: 360 / 760;
  overflow: hidden;
  border: 6px solid var(--frame);
  border-radius: 32px;
  background: var(--frame);
  box-shadow: 0 1px 2px rgba(16, 34, 27, .08), 0 16px 40px rgba(16, 34, 27, .14);
}
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 26px; }

/* Each screen has a light and a dark design; show the one for the current theme. */
.shot .on-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .shot .on-dark { display: block; }
  :root:not([data-theme="light"]) .shot .on-light { display: none; }
}
:root[data-theme="dark"] .shot .on-dark { display: block; }
:root[data-theme="dark"] .shot .on-light { display: none; }

/* -------------------------------------------------------------- features */

.features { padding: 8px 0 72px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
}
.card .mark {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--gold);
  margin-bottom: 16px;
}
.card h2 { font-family: var(--heading); font-weight: 600; font-size: 20px; line-height: 1.3; margin: 0 0 8px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }

/* ---------------------------------------------------------- legal pages */

.legal { padding: 24px 0 72px; }
.legal h1 { font-family: var(--heading); font-weight: 600; font-size: clamp(32px, 5vw, 44px); line-height: 1.15; margin: 0 0 8px; }
.legal .updated { color: var(--subtle); font-size: 15px; margin: 0 0 28px; }
.legal h2 { font-family: var(--heading); font-weight: 600; font-size: 22px; margin: 40px 0 8px; }
.legal p, .legal li { color: var(--muted); }
.legal strong { color: var(--text); }
.legal ul { padding-left: 1.2em; }
.legal li { margin: 4px 0; }

.summary {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 0 0 8px;
}
.summary p { margin: 0; color: var(--text); }

.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 12px 0; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--text); }
td { color: var(--muted); }

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

.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 14px; color: var(--subtle); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }

/* Narrower screens: the phones become a strip that scrolls sideways inside its own box. */
@media (max-width: 860px) {
  .shots {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(200px, 44%);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px 4px 24px;
    margin: 0 -4px;
  }
  .shot { scroll-snap-align: start; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .header-end { gap: 14px; }
  .shots { grid-auto-columns: 62%; }
  .site-nav { gap: 14px; font-size: 14px; }
  .hero { padding: 24px 0 40px; }
  .hero p.lede { font-size: 18px; }
}
