/* Workshop Stash — website styles, "Fresh Coat" theme.
   These tokens mirror the app's theme file. If a color or font changes
   in the app, change it here too (and the reverse). */

:root {
  color-scheme: light;

  /* Fresh Coat palette */
  --sky: #5AA9E0;          /* Clear sky: primary buttons, icon (slate text on it, never white) */
  --sky-tint: #E8F3FB;
  --deep-sky: #1F6A9A;     /* links, small accent text */
  --deep-sky-hover: #18557C;
  --denim: #48709F;        /* secondary buttons, location tags, "to buy" */
  --denim-tint: #EAEFF6;
  --denim-text: #34557A;
  --teal: #0F7C7C;         /* Valuables stash, supporting accent */
  --teal-tint: #E2F3F1;
  --teal-text: #0B5E5E;
  --leaf: #4E9A4E;         /* "own it", savings */
  --leaf-tint: #EAF5E3;
  --leaf-text: #2F6B2F;
  --sun: #F2B33D;          /* low stock only, slate text on it */
  --brick: #B5452F;        /* errors only */
  --slate: #1E2B37;
  --muted-c: #55636F;
  --cream: #FAF6EF;
  --warm-white: #FFFDF8;
  --line-c: #EAE2D3;
  --input-line: #E0D6C4;
  --grid-line: #E3EEF6;
  --closing-grid: #D6E8F6;

  /* Roles (dark mode swaps these) */
  --bg: var(--cream);
  --surface: var(--warm-white);
  --text: var(--slate);
  --text-muted: var(--muted-c);
  --border: var(--line-c);
  --input-border: var(--input-line);
  --primary: var(--sky);
  --primary-hover: #4A9AD3;
  --on-primary: var(--slate);
  --link: var(--deep-sky);
  --link-hover: var(--deep-sky-hover);
  --secondary: var(--denim);
  --own: var(--leaf-text);
  --buy: var(--denim-text);
  --grid: var(--grid-line);
  --tile-work-bg: var(--sky);      --tile-work-tx: var(--slate);
  --tile-store-bg: var(--denim);   --tile-store-tx: #FFFFFF;
  --tile-val-bg: var(--teal);      --tile-val-tx: #FFFFFF;

  --font-head: "Barlow Semi Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --max: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);

  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #12191F; --surface: #1B252D; --text: #E8EEF1; --text-muted: #A3B1BB;
    --border: #2A3640; --input-border: #34424D;
    --primary: #7CC0EC; --primary-hover: #95CCF0; --on-primary: #12191F;
    --link: #8FCBF0; --link-hover: #B3DCF5; --secondary: #8AA6CC;
    --own: #8CCB7E; --buy: #8AA6CC; --grid: #1C2731; --closing-grid: #24384A;
    --sky-tint: #1D2C38; --denim-tint: #1E2836; --teal-tint: #17292B; --leaf-tint: #1C2A1E;
    --denim-text: #8AA6CC; --teal-text: #4FB8B0; --leaf-text: #8CCB7E;
    --tile-work-bg: #7CC0EC; --tile-work-tx: #12191F;
    --tile-store-bg: #8AA6CC; --tile-store-tx: #12191F;
    --tile-val-bg: #4FB8B0;  --tile-val-tx: #12191F;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #12191F; --surface: #1B252D; --text: #E8EEF1; --text-muted: #A3B1BB;
  --border: #2A3640; --input-border: #34424D;
  --primary: #7CC0EC; --primary-hover: #95CCF0; --on-primary: #12191F;
  --link: #8FCBF0; --link-hover: #B3DCF5; --secondary: #8AA6CC;
  --own: #8CCB7E; --buy: #8AA6CC; --grid: #1C2731; --closing-grid: #24384A;
  --sky-tint: #1D2C38; --denim-tint: #1E2836; --teal-tint: #17292B; --leaf-tint: #1C2A1E;
  --denim-text: #8AA6CC; --teal-text: #4FB8B0; --leaf-text: #8CCB7E;
  --tile-work-bg: #7CC0EC; --tile-work-tx: #12191F;
  --tile-store-bg: #8AA6CC; --tile-store-tx: #12191F;
  --tile-val-bg: #4FB8B0;  --tile-val-tx: #12191F;
}

*, *::before, *::after { box-sizing: inherit; }
html { scroll-padding-top: env(safe-area-inset-top, 0px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.6;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { color: var(--link-hover); }
strong, b { font-weight: 600; }
:focus-visible { outline: 3px solid var(--deep-sky); outline-offset: 3px; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.005em;
  margin: 0;
}
h1 { font-size: clamp(2.875rem, 7vw, 5rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3rem); }
h3 { font-size: 1.5rem; }
p { margin: 0; }
.lede { font-size: 1.1875rem; color: var(--text-muted); max-width: 34em; }

/* Header */
.site-header { border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-head); font-weight: 500; font-size: 1.5rem;
  color: var(--text); text-decoration: none; white-space: nowrap;
}
.brand:hover { color: var(--text); }
.brand svg { width: 2rem; height: 2rem; flex: none; }
.site-nav { display: flex; gap: 1.5rem; font-weight: 500; font-size: 0.9375rem; }
.site-nav a { color: var(--text); text-decoration: none; white-space: nowrap; }
.site-nav a:hover { color: var(--link); }
@media (max-width: 40rem) { .site-nav .hide-sm { display: none; } }
@media (max-width: 30rem) { .brand { font-size: 1.25rem; } .brand svg { width: 1.75rem; height: 1.75rem; } }

/* Buttons and forms */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.25rem; padding: 0 1.75rem;
  border: 0; border-radius: 999px;
  background: var(--primary); color: var(--on-primary);
  font-family: var(--font-head); font-weight: 500; font-size: 1.25rem;
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--primary-hover); color: var(--on-primary); }
.btn-outline { background: transparent; color: var(--secondary); border: 2px solid var(--secondary); }
.btn-outline:hover { background: var(--denim-tint); color: var(--secondary); }

.waitlist { margin-top: 2rem; max-width: 34rem; }
.waitlist label { display: block; font-weight: 500; margin-bottom: 0.5rem; }
.waitlist .row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.waitlist input[type="email"] {
  flex: 1 1 15rem; min-height: 3.25rem; padding: 0 1.25rem;
  border: 1.5px solid var(--input-border); border-radius: 999px;
  background: var(--surface); color: var(--text); font: inherit;
}
.waitlist input[type="email"]:focus { border-color: var(--deep-sky); outline: none; box-shadow: 0 0 0 3px var(--sky-tint); }
.waitlist .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.waitlist .note { margin-top: 0.75rem; font-size: 0.875rem; color: var(--text-muted); }
.form-status { margin-top: 0.75rem; font-weight: 500; min-height: 1.6em; }
.form-status[data-state="ok"] { color: var(--own); }
.form-status[data-state="error"] { color: var(--brick); }

/* Hero */
.hero { padding: clamp(3rem, 8vw, 6rem) 0 clamp(3rem, 7vw, 5rem); }
.hero .wrap { display: grid; gap: clamp(2.5rem, 6vw, 4rem); grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; }
.hero h1 { max-width: 9.5em; }
.hero .lede { margin-top: 1.5rem; }
.platforms { margin-top: 1.25rem; font-size: 0.9375rem; color: var(--text-muted); }
@media (max-width: 56rem) { .hero .wrap { grid-template-columns: minmax(0, 1fr); } }

/* Graph paper: the signature texture */
.graph {
  background-color: var(--surface);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 20px 20px;
  border: 1px solid var(--border);
  border-radius: 1.5rem;
}

/* Hero: the app's stashes home, on graph paper */
.stash-board { padding: clamp(1.25rem, 3vw, 2rem); }
.stash-board .label { font-size: 0.875rem; font-weight: 500; color: var(--text-muted); margin-bottom: 0.75rem; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.tile {
  min-height: 9rem; padding: 1rem; border-radius: 1.125rem;
  display: flex; flex-direction: column; justify-content: space-between; gap: 1rem;
}
.tile svg { width: 1.75rem; height: 1.75rem; }
.tile .t-name { font-family: var(--font-head); font-weight: 500; font-size: 1.5rem; line-height: 1.05; }
.tile .t-meta { font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.tile.work { background: var(--tile-work-bg); color: var(--tile-work-tx); }
.tile.store { background: var(--tile-store-bg); color: var(--tile-store-tx); }
.tile.val { background: var(--tile-val-bg); color: var(--tile-val-tx); }
.tile.hol { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.tile.hol .t-meta { color: var(--text-muted); }
.tile .top { display: flex; justify-content: space-between; align-items: flex-start; }
.swatches { display: flex; gap: 3px; }
.swatches span { width: 8px; height: 26px; border-radius: 4px; }
.upcoming {
  margin-top: 0.75rem; display: flex; align-items: center; gap: 0.875rem;
  padding: 0.875rem 1rem; border-radius: 1rem; background: var(--surface); border: 1px solid var(--border);
}
.upcoming .bar { width: 8px; align-self: stretch; border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; }
.upcoming .bar span { flex: 1; }
.upcoming .u-title { font-family: var(--font-head); font-weight: 500; font-size: 1.3125rem; line-height: 1.15; }
.upcoming .u-meta { font-size: 0.8125rem; color: var(--text-muted); }

@media (prefers-reduced-motion: no-preference) {
  .tile, .upcoming { animation: lay 0.7s cubic-bezier(.2,.7,.25,1) both; }
  .tile:nth-child(2) { animation-delay: .07s; }
  .tile:nth-child(3) { animation-delay: .14s; }
  .tile:nth-child(4) { animation-delay: .21s; }
  .upcoming { animation-delay: .32s; }
  @keyframes lay { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}

/* Sections */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; border-top: 1px solid var(--border); }
.section-head { max-width: 40rem; margin-bottom: clamp(2rem, 5vw, 3rem); }
.section-head p { margin-top: 1rem; color: var(--text-muted); font-size: 1.125rem; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2rem; grid-template-columns: repeat(3, minmax(0, 1fr)); counter-reset: step; }
.steps li { counter-increment: step; border-top: 2px solid var(--primary); padding-top: 1rem; }
.steps li::before {
  content: counter(step); display: block; font-family: var(--font-head); font-weight: 500;
  font-size: 3rem; line-height: 1; color: var(--link); margin-bottom: 0.75rem;
}
.steps h3 { margin-bottom: 0.5rem; }
.steps p { color: var(--text-muted); }
@media (max-width: 48rem) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* Stash types */
.stash-types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 48rem) { .stash-types { grid-template-columns: minmax(0, 1fr); } }
.stype { padding: 1.5rem; border-radius: 1.25rem; background: var(--surface); border: 1px solid var(--border); }
.stype .head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.stype .dot { width: 2.25rem; height: 2.25rem; border-radius: 0.75rem; display: grid; place-items: center; flex: none; }
.stype .dot svg { width: 1.25rem; height: 1.25rem; }
.stype p { color: var(--text-muted); }
.stype.work .dot { background: var(--tile-work-bg); color: var(--tile-work-tx); }
.stype.hol .dot { background: var(--sky-tint); color: var(--text); }
.stype.store .dot { background: var(--tile-store-bg); color: var(--tile-store-tx); }
.stype.val .dot { background: var(--tile-val-bg); color: var(--tile-val-tx); }
.holidays { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; padding: 0; list-style: none; }
.holidays li { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0.8rem 0.3rem 0.45rem; border-radius: 999px; border: 1px solid var(--border); font-size: 0.875rem; font-weight: 500; }
.holidays .mini { display: inline-flex; gap: 2px; }
.holidays .mini span { width: 6px; height: 16px; border-radius: 3px; }
.lumber { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 1rem; border: 1px solid var(--border); border-radius: 0.875rem; overflow: hidden; background: var(--sky-tint); }
.lumber > div { padding: 0.75rem 0.875rem; font-variant-numeric: tabular-nums; }
.lumber > div:nth-child(odd) { border-right: 1px solid var(--border); }
.lumber > div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
.lumber .k { font-size: 0.75rem; color: var(--text-muted); }
.lumber .v { font-family: var(--font-head); font-weight: 500; font-size: 1.25rem; }

/* Project planner */
.planner { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: start; }
@media (max-width: 52rem) { .planner { grid-template-columns: minmax(0, 1fr); } }
.planner .points { display: grid; gap: 1.25rem; margin-top: 2rem; }
.planner .points h3 { font-size: 1.25rem; margin-bottom: 0.25rem; }
.planner .points p { color: var(--text-muted); }
.plan-card { padding: 1.5rem; font-variant-numeric: tabular-nums; }
.plan-card h3 { font-size: 1.5rem; }
.plan-card .sub { color: var(--text-muted); font-size: 0.875rem; margin: 0.25rem 0 1rem; }
.summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; margin-bottom: 1rem; }
.summary div { border-radius: 0.875rem; padding: 0.75rem; }
.summary .k { font-size: 0.75rem; }
.summary .v { font-family: var(--font-head); font-weight: 500; font-size: 1.5rem; }
.summary .own { background: var(--leaf-tint); color: var(--leaf-text); }
.summary .buy { background: var(--denim-tint); color: var(--denim-text); }
.summary .save { background: var(--teal-tint); color: var(--teal-text); }
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.rows li { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 0.875rem; border-radius: 0.875rem; background: var(--surface); border: 1px solid var(--border); }
.rows .ic { width: 1.75rem; height: 1.75rem; border-radius: 50%; display: grid; place-items: center; flex: none; }
.rows .ic svg { width: 0.9rem; height: 0.9rem; }
.rows .ic.own { background: var(--leaf); color: #fff; }
.rows .ic.buy { border: 2px solid var(--buy); color: var(--buy); }
.rows .what { flex: 1; min-width: 0; }
.rows .name { font-weight: 500; font-size: 0.9375rem; }
.rows .detail { font-size: 0.8125rem; color: var(--text-muted); }
.rows .amt { font-weight: 600; font-size: 0.9375rem; }
.rows .amt.own { color: var(--own); }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; align-items: stretch; }
@media (max-width: 64rem) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 36rem) { .plans { grid-template-columns: minmax(0, 1fr); } }
.plan { padding: 1.5rem; border-radius: 1.25rem; border: 1px solid var(--border); display: flex; flex-direction: column; }
.plan.featured { background: var(--surface); border: 2px solid var(--primary); }
.plan h3 { font-size: 1.75rem; }
.plan .price { margin: 0.75rem 0 0.25rem; font-family: var(--font-head); font-weight: 500; font-size: 2.75rem; line-height: 1; font-variant-numeric: tabular-nums; }
.plan .price small { font-family: var(--font-body); font-weight: 400; font-size: 1rem; color: var(--text-muted); }
.plan .annual { font-size: 0.875rem; color: var(--text-muted); min-height: 1.4em; }
.plan ul { margin: 1.25rem 0 0; padding: 0 0 0 1.1rem; display: grid; gap: 0.4rem; }
.plan .badge { align-self: flex-start; margin-bottom: 0.75rem; padding: 0.15rem 0.75rem; border-radius: 999px; background: var(--sky-tint); color: var(--link); font-size: 0.8125rem; font-weight: 600; }
.fineprint { margin-top: 1.5rem; font-size: 0.875rem; color: var(--text-muted); }

/* FAQ */
.faq { max-width: 46rem; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; list-style: none; padding: 1.1rem 2rem 1.1rem 0; position: relative; font-weight: 500; font-size: 1.125rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.25rem; top: 0.8rem; font-size: 1.5rem; font-weight: 300; color: var(--link); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 1.25rem; color: var(--text-muted); max-width: 40em; }

/* Closing band */
.closing { padding: clamp(3.5rem, 8vw, 5.5rem) 0; border-top: 1px solid var(--border);
  background-color: var(--sky-tint);
  background-image: linear-gradient(var(--closing-grid) 1px, transparent 1px), linear-gradient(90deg, var(--closing-grid) 1px, transparent 1px);
  background-size: 20px 20px; }
.closing h2 { max-width: 14em; }
.closing .lede { margin-top: 1rem; }

/* Footer */
.site-footer { padding: 2.5rem 0 3rem; font-size: 0.9375rem; color: var(--text-muted); border-top: 1px solid var(--border); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; }
.site-footer a { color: var(--text-muted); }

/* Document pages */
.doc { padding: clamp(2.5rem, 6vw, 4.5rem) 0 4rem; }
.doc .wrap { max-width: 46rem; }
.doc h1 { font-size: clamp(2.5rem, 6vw, 3.75rem); }
.doc .updated { margin-top: 0.75rem; color: var(--text-muted); }
.doc h2 { font-size: 1.75rem; margin: 2.5rem 0 0.75rem; }
.doc h3 { font-size: 1.25rem; margin: 1.75rem 0 0.5rem; }
.doc p, .doc ul, .doc ol { margin: 0 0 1rem; }
.doc li { margin-bottom: 0.35rem; }
.callout { padding: 1.25rem 1.5rem; border-radius: 1rem; background: var(--sky-tint); border: 1px solid var(--border); margin: 1.5rem 0; }
