/* ============================================================
   Cipio — editorial follow-through
   Display: Fraunces · Body: Hanken Grotesk · Meta: JetBrains Mono
   ============================================================ */

:root {
  /* warm paper palette */
  --paper:    #f3efe6;
  --paper-2:  #ece6d9;
  --ink:      #17150e;
  --ink-soft: #6a6454;
  --ink-faint:#9b9484;
  --line:     #ded6c5;
  --card:     #fffdf7;

  /* accents */
  --marker:   #d6ec9c;   /* highlighter */
  --marker-2: #c4e283;
  --done:     #2c5638;   /* follow-through green */
  --done-bg:  #e7efd9;
  --buy:      #1c1a13;

  --display: "Fraunces", Georgia, serif;
  --sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(40,33,18,.05);
  --shadow: 0 2px 6px rgba(40,33,18,.05), 0 18px 40px -18px rgba(40,33,18,.22);
  --maxw: 1140px;
  --ease: cubic-bezier(.22,1,.36,1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
  overflow-x: hidden;
}

/* atmosphere: warm light pooling + cool counter-tone */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(120% 80% at 12% -10%, rgba(214,236,156,.30), transparent 55%),
    radial-gradient(100% 70% at 100% 0%, rgba(180,200,220,.16), transparent 50%),
    radial-gradient(120% 120% at 50% 120%, rgba(44,86,56,.06), transparent 60%);
}
/* fine grain */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.045'/%3E%3C/svg%3E");
}

a { color: inherit; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* ---------- nav ---------- */
nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px 0 18px;
}
.brand {
  display: inline-flex; align-items: baseline; gap: 9px; text-decoration: none;
  font-family: var(--display); font-weight: 600; font-size: 22px; letter-spacing: -0.02em;
  font-optical-sizing: auto;
}
.brand .mark { font-size: 17px; transform: translateY(-1px); color: var(--done); }
.nav-links { display: flex; gap: 30px; font-family: var(--mono); font-size: 12.5px; letter-spacing: .02em; text-transform: uppercase; }
.nav-links a { color: var(--ink-soft); text-decoration: none; transition: color .2s; }
.nav-links a:hover { color: var(--ink); }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.04fr 0.96fr; gap: 64px;
  align-items: center; padding: 56px 0 96px;
}
.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft); margin: 0 0 26px; display: inline-flex; align-items: center; gap: 9px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--ink-faint); }

h1 {
  font-family: var(--display); font-optical-sizing: auto;
  font-weight: 340; font-size: clamp(46px, 6.6vw, 80px); line-height: .98;
  letter-spacing: -0.035em; margin: 0 0 26px;
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 1;
}
h1 .l { display: block; }
h1 em {
  font-style: italic; font-weight: 420; position: relative; white-space: nowrap;
  font-variation-settings: "opsz" 144, "SOFT" 60, "WONK" 1;
}
/* highlighter sweep behind the promise */
h1 em .hl {
  position: absolute; left: -.06em; right: -.06em; bottom: .07em; height: .46em; z-index: -1;
  background: linear-gradient(100deg, var(--marker), var(--marker-2));
  border-radius: 2px 8px 5px 9px / 9px 4px 8px 3px;
  transform: scaleX(0); transform-origin: left center;
  animation: sweep .7s var(--ease) 1.05s forwards;
}
.lede { font-size: 19.5px; color: var(--ink-soft); margin: 0 0 36px; max-width: 33ch; line-height: 1.5; }

/* ---------- signup ---------- */
.signup { display: flex; gap: 9px; max-width: 470px; }
.signup input[type=email] {
  flex: 1; padding: 16px 18px; font-family: var(--sans); font-size: 16px;
  border: 1px solid var(--line); background: #fffdf7cc; backdrop-filter: blur(4px);
  border-radius: 12px; color: var(--ink); outline: none; transition: border-color .2s, box-shadow .2s;
}
.signup input::placeholder { color: var(--ink-faint); }
.signup input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(44,86,56,.12); }
.btn {
  appearance: none; border: 0; cursor: pointer; font-family: var(--sans); font-weight: 600;
  background: var(--ink); color: var(--paper); padding: 16px 26px; border-radius: 12px; font-size: 16px;
  white-space: nowrap; position: relative; overflow: hidden;
  transition: transform .12s var(--ease), box-shadow .2s;
  box-shadow: var(--shadow-sm);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .55; cursor: default; transform: none; }
.form-note { font-family: var(--mono); font-size: 11.5px; letter-spacing: .02em; color: var(--ink-faint); margin: 14px 3px 0; }
.form-msg { font-size: 15px; margin: 14px 3px 0; min-height: 1.2em; }
.form-msg.ok { color: var(--done); }
.form-msg.err { color: #a8402a; }

/* ---------- the demo card (the memorable bit) ---------- */
.stage { position: relative; }
.stage .label {
  position: absolute; top: -34px; right: 4px; font-family: var(--mono); font-size: 11px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint);
}
.deck {
  background: var(--card); border: 1px solid var(--line); border-radius: 24px;
  box-shadow: var(--shadow); padding: 20px; position: relative;
}
.deck-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 18px; }
.deck-head .t { font-family: var(--display); font-weight: 500; font-size: 19px; letter-spacing: -0.02em; }
.deck-head .meta { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); letter-spacing: .04em; }

.masonry { columns: 2; column-gap: 13px; }
.tile {
  break-inside: avoid; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  margin-bottom: 13px; overflow: hidden; opacity: 0; transform: translateY(14px);
  animation: rise .6s var(--ease) forwards;
}
.tile .thumb { height: 104px; position: relative; }
.tile.t1 .thumb { height: 132px; background: linear-gradient(150deg,#e9cbb6,#dcae8f); }
.tile.t2 .thumb { background: linear-gradient(150deg,#cdd9e6,#aec2d8); }
.tile.t3 .thumb { height: 92px; background: linear-gradient(150deg,#e3dcca,#cabf9f); }
.tile.t4 .thumb { background: linear-gradient(150deg,#ddd5e2,#c2b6d4); }
.tile .body { padding: 12px 13px 14px; }
.tile .kicker { font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-faint); }
.tile .name { font-family: var(--display); font-size: 15.5px; font-weight: 500; letter-spacing: -0.015em; margin: 4px 0 9px; line-height: 1.22; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px;
  font-weight: 500; padding: 5px 10px; border-radius: 999px;
  background: var(--buy); color: var(--paper); letter-spacing: .01em;
}
.pill.veg { background: var(--done-bg); color: var(--done); }

/* hero tile — the resurfaced item that completes itself */
.tile.hero { border-color: var(--marker-2); box-shadow: 0 0 0 1px var(--marker-2), var(--shadow-sm); }
.tile.hero .thumb { height: 140px; background: linear-gradient(150deg,#dcc6a4,#caa873); }
.tile.hero .flag {
  position: absolute; top: 10px; left: 10px; font-family: var(--mono); font-size: 10px; letter-spacing: .06em;
  text-transform: uppercase; background: var(--paper); color: var(--done); padding: 4px 9px; border-radius: 999px;
  box-shadow: var(--shadow-sm); display: inline-flex; align-items: center; gap: 5px;
}
/* the completing checkbox */
.doit { display: flex; align-items: center; gap: 9px; margin-top: 2px; }
.box {
  width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--done); flex: none;
  display: grid; place-items: center; position: relative; background: transparent;
  transition: background .3s ease;
}
.box svg { width: 13px; height: 13px; }
.box path { stroke: var(--paper); stroke-width: 16; fill: none; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 60; stroke-dashoffset: 60; }
.doit .verb { font-family: var(--sans); font-weight: 600; font-size: 14.5px; position: relative; }
.doit .verb::after {
  content: ""; position: absolute; left: 0; top: 52%; height: 1.5px; width: 100%;
  background: var(--ink-soft); transform: scaleX(0); transform-origin: left;
}
/* looping "save -> done" demo */
.tile.hero.go .box { animation: fillbox .5s ease 0s forwards; }
.tile.hero.go .box path { animation: draw .45s var(--ease) .12s forwards; }
.tile.hero.go .doit .verb::after { animation: strike .4s var(--ease) .2s forwards; }
.tile.hero.go .doit .verb { animation: fade .4s ease .25s forwards; }

/* ---------- sections ---------- */
section { padding: 92px 0; border-top: 1px solid var(--line); }
.klabel { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 46px; display: inline-flex; align-items: center; gap: 10px; }
.klabel::before { content: ""; width: 26px; height: 1px; background: var(--ink-faint); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.step { background: var(--paper); padding: 34px 30px 38px; }
.step .num { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); letter-spacing: .1em; }
.step h3 { font-family: var(--display); font-weight: 500; font-size: 27px; letter-spacing: -0.025em; margin: 14px 0 10px; }
.step p { color: var(--ink-soft); margin: 0; font-size: 16px; }
.step.done h3 { color: var(--done); }

/* ---------- closing ---------- */
.cta-band { text-align: center; }
.cta-band h2 { font-family: var(--display); font-weight: 360; font-size: clamp(34px, 5vw, 56px); letter-spacing: -0.03em; margin: 0 0 16px; font-variation-settings: "opsz" 144, "SOFT" 40; }
.cta-band p { color: var(--ink-soft); margin: 0 auto 30px; max-width: 40ch; }
.cta-band .signup { margin: 0 auto; }
.cta-band .form-msg { text-align: center; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 44px 0; color: var(--ink-soft); }
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
footer .brand { font-size: 19px; }
footer .footer-links { display: flex; gap: 26px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
footer a { color: var(--ink-soft); text-decoration: none; }
footer a:hover { color: var(--ink); }

/* ---------- doc pages ---------- */
.doc { max-width: 700px; margin: 0 auto; padding: 64px 0 104px; }
.doc h1 { font-family: var(--display); font-weight: 360; font-size: clamp(38px, 5.5vw, 56px); letter-spacing: -0.03em; margin: 0 0 10px; font-variation-settings: "opsz" 144, "SOFT" 30; }
.doc .updated { font-family: var(--mono); color: var(--ink-faint); font-size: 12.5px; letter-spacing: .03em; margin: 0 0 44px; }
.doc h2 { font-family: var(--display); font-weight: 500; font-size: 25px; letter-spacing: -0.02em; margin: 46px 0 14px; }
.doc h3 { font-size: 17px; font-weight: 700; margin: 30px 0 8px; }
.doc p, .doc li { color: var(--ink); font-size: 16.5px; line-height: 1.66; }
.doc a { color: var(--done); text-underline-offset: 3px; }
.doc ul { padding-left: 22px; }
.doc li { margin: 7px 0; }
.callout {
  background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--done);
  border-radius: 12px; padding: 22px 24px; margin: 28px 0; box-shadow: var(--shadow-sm);
}
.callout p { margin: 0; }

/* ---------- load orchestration ---------- */
.reveal { opacity: 0; transform: translateY(16px); animation: rise .7s var(--ease) forwards; }

@keyframes rise   { to { opacity: 1; transform: translateY(0); } }
@keyframes sweep  { to { transform: scaleX(1); } }
@keyframes draw   { to { stroke-dashoffset: 0; } }
@keyframes fillbox{ to { background: var(--done); } }
@keyframes strike { to { transform: scaleX(1); } }
@keyframes fade   { to { color: var(--ink-faint); } }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 44px; padding: 36px 0 72px; }
  .stage { max-width: 440px; }
  .steps { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .signup { flex-direction: column; }
  .signup .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .tile, .reveal { opacity: 1; transform: none; }
  h1 em .hl { transform: scaleX(1); }
}
