/* SmartWeek website. The page is a sheet from the planner: dotted ruled lines, black bars with white
   capitals, white date circles, monochrome, with amber kept for today. It reads as one week, one
   section per day. Tokens match the app, so dark mode inverts the bars the same way. */

:root {
  --page: #ffffff;
  --surface: #f6f6f4;
  --ink: #111111;
  --muted: #5f5f5f;
  --rule: #c9c9c9;
  --divider: #dcdcdc;
  --bar: #111111;
  --bar-text: #ffffff;
  --amber: #f5a623;
  --amber-text: #9a5b00;
  --amber-on-bar: #f5a623;
  --amber-tint: rgba(245, 166, 35, 0.1);
  --row: 30px;
  --display: 'Archivo', system-ui, sans-serif;
  --body: 'Figtree', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --hand: 'Caveat', 'Segoe Script', cursive;
  --gutter: clamp(16px, 5vw, 48px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #141414;
    --surface: #1c1c1c;
    --ink: #ececec;
    --muted: #a3a3a3;
    --rule: #3d3d3d;
    --divider: #2f2f2f;
    --bar: #ececec;
    --bar-text: #141414;
    --amber-text: #f5a623;
    --amber-on-bar: #8a5200;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 1.0625rem/1.6 var(--body); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 3px; }

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

.skip { position: absolute; left: 8px; top: -60px; padding: 10px 14px; background: var(--ink); color: var(--page); z-index: 10; }
.skip:focus { top: 8px; }

/* Header ---------------------------------------------------------------- */

.site-header { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 1.3rem/1 var(--display); font-stretch: 112%; letter-spacing: -0.01em; }
.site-nav { display: flex; gap: 20px; font-weight: 600; font-size: 0.95rem; }
.site-nav a { text-decoration: none; padding: 4px 0; }
.site-nav a:hover { text-decoration: underline; }

/* Hero ------------------------------------------------------------------ */

.hero { padding: clamp(24px, 6vw, 64px) 0 clamp(40px, 7vw, 80px); }
.label { margin: 0; font: 500 0.78rem/1.3 var(--mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
h1 { margin: 12px 0 18px; max-width: 13ch; font: 900 clamp(2.7rem, 8vw, 5.4rem)/0.98 var(--display); font-stretch: 118%; letter-spacing: -0.025em; }
.lede { margin: 0 0 26px; max-width: 34rem; font-size: 1.2rem; color: var(--muted); }
.cta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin: 0; }
.cta-note { color: var(--muted); font-size: 0.95rem; }
.stores { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 18px 0 0; }
.store-badge { display: inline-block; line-height: 0; border-radius: 9px; }
.store-badge img { height: 48px; width: auto; }
/* Google's badge artwork includes its own clear space, so it is drawn taller to match Apple's. */
.store-badge.google img { height: 62px; margin: -7px -8px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.button { display: inline-block; padding: 14px 24px; background: var(--bar); color: var(--bar-text); font: 800 0.95rem/1.2 var(--display); font-stretch: 112%; letter-spacing: 0.02em; text-decoration: none; }
.button:hover { background: var(--amber); color: #111; }

/* Planner parts, shared by the hero and the demos ------------------------- */

.ruled {
  background-image: radial-gradient(circle at 2px calc(var(--row) - 1px), var(--rule) 0.8px, transparent 1.2px);
  background-size: 4px var(--row);
}
.bar { display: flex; align-items: center; justify-content: center; height: 28px; padding: 0 8px; background: var(--bar); color: var(--bar-text); font: 700 0.72rem/1 var(--display); font-stretch: 112%; letter-spacing: 0.12em; white-space: nowrap; overflow: hidden; }
.circle { display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--bar-text); color: var(--bar); font: 800 0.75rem/1 var(--display); letter-spacing: 0; }
.is-today .circle { background: var(--amber); color: #111; }
.is-today > span, .col-head.is-today { color: var(--amber-on-bar); }

.rows { list-style: none; margin: 0; padding: 0 6px; font-size: 0.82rem; min-height: var(--row); }
.rows li { display: flex; align-items: center; gap: 6px; height: var(--row); white-space: nowrap; overflow: hidden; }
.rows li > i { display: inline-grid; place-items: center; width: 12px; flex: none; font-style: normal; color: var(--muted); font-weight: 700; font-size: 0.75rem; }
.rows li > i:empty::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }
.rows li > i.check { width: 13px; height: 13px; border: 1.5px solid var(--ink); border-radius: 50%; }
.rows li > i.check::before { display: none; }
.rows li > i.check.on { background: var(--ink); }
.rows li.done { color: var(--muted); text-decoration: line-through; }
.rows li.moved { color: var(--muted); }
.rows li.hint { color: var(--muted); padding-left: 19px; }
.rows em { margin-left: auto; font-style: normal; font-size: 0.75em; color: var(--muted); text-decoration: none; }
.rows.big { font-size: 1rem; --row: 38px; padding: 0 12px; }
.rows.big li { height: 38px; gap: 10px; }

.hand { font-family: var(--hand); font-weight: 600; line-height: var(--row); }

/* The hero planner ------------------------------------------------------- */

.planner { margin-top: clamp(32px, 6vw, 56px); border: 1px solid var(--divider); background: var(--page); box-shadow: 0 1px 0 var(--divider), 0 24px 60px -30px rgba(0, 0, 0, 0.35); padding: 0 14px 14px; }
.planner-nav { display: flex; justify-content: center; gap: 18px; padding: 10px; font-size: 0.9rem; }
.planner-band { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.review-note { margin: 0; padding: 0 10px; min-height: calc(var(--row) * 3); font-size: 1.3rem; }
.planner-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.col + .col { border-left: 1px solid var(--divider); }
.col.is-today { background: var(--amber-tint); }
.col.is-today .rows li > i:empty::before { background: var(--amber-text); }
.col-head { display: flex; align-items: center; gap: 7px; height: 30px; padding: 0 8px; background: var(--bar); color: var(--bar-text); font: 700 0.72rem/1 var(--display); font-stretch: 112%; letter-spacing: 0.08em; }
.col-head.is-today { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.col .rows { min-height: calc(var(--row) * 4); }
.ink { height: calc(var(--row) * 3); border-top: 1px dashed var(--rule); padding: 0 8px; font-size: 1.15rem; }
.ink .hand { display: block; }
.ink svg { width: 100%; height: 100%; }

.draw { fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.draw.amber { stroke: var(--amber); stroke-width: 3.4; }
.js .draw { stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s ease-out 0.15s; }
.js .drawn .draw { stroke-dashoffset: 0; }

/* The week --------------------------------------------------------------- */

.day { padding: 0 0 clamp(56px, 9vw, 104px); }
.day-bar { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px; background: var(--bar); color: var(--bar-text); font: 800 0.85rem/1 var(--display); font-stretch: 118%; letter-spacing: 0.12em; }
.day-bar.is-today::after { content: 'TODAY'; margin-left: auto; color: var(--amber-on-bar); font-size: 0.72rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 6vw, 72px); align-items: start; margin-top: clamp(24px, 4vw, 40px); }
.split.flip > :first-child { order: 2; }
h1, h2 { text-wrap: balance; }
h2 { margin: 0 0 14px; font: 900 clamp(1.9rem, 4.2vw, 2.9rem)/1.04 var(--display); font-stretch: 114%; letter-spacing: -0.02em; }
.day p { margin: 0 0 14px; }
.split p, .narrow { color: var(--muted); }
.points { margin: 16px 0 0; padding: 0; list-style: none; }
.points li { padding: 7px 0; border-bottom: 1px dotted var(--rule); }
.try { font: 600 1.5rem/1.2 var(--hand); color: var(--amber-text) !important; }

.sheet { border: 1px solid var(--divider); background: var(--page); box-shadow: 0 18px 40px -28px rgba(0, 0, 0, 0.4); }
.paper { --row: 38px; position: relative; padding: 0 16px; height: calc(var(--row) * 5); }
.paper .hand { margin: 0; font-size: 1.75rem; color: var(--ink); }
.paper .second { position: absolute; left: 134px; top: 74px; font-size: 1.6rem; }
.paper svg { position: absolute; left: 12px; top: 28px; width: calc(100% - 24px); max-width: 340px; }
.tools { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--divider); font-size: 0.85rem; color: var(--muted); flex-wrap: wrap; }
.tools .on { color: var(--ink); font-weight: 700; text-decoration: underline; }
.swatch { width: 15px; height: 15px; border-radius: 50%; }
.s1 { background: var(--ink); margin-left: auto; }
.s2 { background: #2b6cb0; }
.s3 { background: #c0392b; }

.live button.dot { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border: 0; padding: 0; background: none; color: var(--muted); cursor: pointer; }
.live button.dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.live li.sub { padding-left: 24px; }
.live li.sub button.dot::before { background: none; border: 1.5px solid var(--muted); }
.live button.dot[aria-pressed='true']::before { content: '✓'; width: auto; height: auto; background: none; border: 0; font-weight: 700; font-size: 0.85rem; }
.live li.is-done span { text-decoration: line-through; color: var(--muted); }
.live li[aria-hidden] > i { width: 24px; }

.banner { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; background: var(--surface); border-bottom: 1px solid var(--divider); font-size: 0.88rem; }
.banner strong { white-space: nowrap; }
.two { display: grid; grid-template-columns: 1fr 1fr; }
.two > div + div { border-left: 1px solid var(--divider); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); padding: 16px 8px; text-align: center; font-size: 0.8rem; color: var(--muted); }
.stats b { display: block; color: var(--ink); font: 900 1.9rem/1.1 var(--display); font-stretch: 112%; }

.devices { position: relative; padding-bottom: 32px; }
.laptop { width: 86%; }
.laptop .rows, .phone .rows { font-size: 0.9rem; min-height: calc(var(--row) * 5); }
.phone { position: absolute; right: 0; bottom: 0; width: 42%; border: 5px solid var(--ink); border-radius: 18px; overflow: hidden; }

/* Sunday: the bars invert, as in the app's dark mode ---------------------- */

.inverted {
  --page: #141414; --surface: #1c1c1c; --ink: #ececec; --muted: #a9a9a9; --rule: #3d3d3d; --divider: #333333;
  --bar: #ececec; --bar-text: #141414; --amber-on-bar: #8a5200;
  background: var(--page); color: var(--ink); padding-top: clamp(40px, 6vw, 64px);
}
@media (prefers-color-scheme: dark) {
  .inverted {
    --page: #ffffff; --surface: #f6f6f4; --ink: #111111; --muted: #5f5f5f; --rule: #c9c9c9; --divider: #dcdcdc;
    --bar: #111111; --bar-text: #ffffff; --amber-on-bar: #f5a623;
  }
}
.inverted h2 { margin-top: clamp(24px, 4vw, 40px); }
.narrow { max-width: 40rem; font-size: 1.15rem; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(28px, 6vw, 72px); margin: 28px 0; }
.facts > div { padding: 16px 0; border-top: 1px dotted var(--rule); }
.facts h3 { margin: 0 0 4px; font: 800 1.05rem/1.3 var(--display); font-stretch: 108%; }
.facts p { margin: 0; color: var(--muted); }

.site-footer { padding: 22px 0; border-top: 1px solid var(--divider); font-size: 0.92rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Privacy page ----------------------------------------------------------- */

.policy { padding: clamp(24px, 5vw, 56px) 0 72px; }
.policy .wrap { max-width: 760px; }
.policy h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); max-width: none; }
.policy h2 { margin: 36px 0 10px; font-size: 1.5rem; }
.policy p, .policy li { color: var(--ink); }
.policy table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.policy th, .policy td { padding: 9px 10px 9px 0; border-bottom: 1px dotted var(--rule); text-align: left; vertical-align: top; }

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

@media (max-width: 760px) {
  .split, .facts { grid-template-columns: 1fr; }
  .split.flip > :first-child { order: 0; }
  .planner-band { grid-template-columns: 1fr; }
  .planner-days { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .planner-days .col { display: none; }
  .planner-days .col.show { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .draw { stroke-dashoffset: 0; transition: none; }
}
