/* Pentad — one stylesheet, no framework. Print and mobile first. */

:root {
  --paper: #faf8f4;
  --paper-2: #f2ede4;
  --ink: #191917;
  --ink-2: #3b3833;
  --muted: #6c675e;
  --line: #e4ded2;
  --line-2: #d2c9b9;
  --accent: #9e3b32;
  --accent-soft: #f2e3df;
  --jade: #35655a;
  --jade-soft: #e3ece9;
  --gold: #9c7c39;
  --radius: 3px;
  --serif: "Songti SC", "Noto Serif SC", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line-2);
}

a:hover {
  border-bottom-color: var(--accent);
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
}

h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  margin-top: 2.4em;
}

h3 {
  font-size: 1.15rem;
  margin-top: 1.8em;
}

p {
  margin: 0 0 1em;
}

small {
  font-size: 0.82rem;
  color: var(--muted);
}

/* ---------------------------------------------------------------- layout */

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 22px;
}

.wrap-wide {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 22px;
}

header.site {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 20;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
}

.brand {
  font-family: var(--serif);
  font-size: 1.16rem;
  /* Was 0.18em for a two-letter mark. Six letters at that spacing read as a
     word broken apart, so the tracking comes down with the length. */
  letter-spacing: 0.1em;
  border: 0;
  font-weight: 600;
}

.brand span {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-left: 8px;
}

.nav-links {
  display: flex;
  gap: 20px;
  font-size: 0.86rem;
  color: var(--muted);
}

.nav-links a {
  border: 0;
  color: var(--muted);
}

.nav-links a[aria-current="page"] {
  color: var(--ink);
}

main {
  padding: 34px 0 90px;
}

footer.site {
  border-top: 1px solid var(--line);
  padding: 26px 0 40px;
  font-size: 0.8rem;
  color: var(--muted);
}

footer.site .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  justify-content: space-between;
}

/* --------------------------------------------------------------- pieces */

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 12px;
}

.hanzi {
  font-family: var(--serif);
  font-size: 0.62em;
  color: var(--muted);
  margin-left: 0.35em;
  letter-spacing: 0.05em;
}

.lede {
  font-size: 1.1rem;
  color: var(--ink-2);
  line-height: 1.65;
  max-width: 40em;
}

.muted {
  color: var(--muted);
}

.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 34px 0;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin: 22px 0;
}

.card.soft {
  background: var(--paper-2);
  border-color: var(--line-2);
}

.card.accent {
  background: var(--accent-soft);
  border-color: #e6c9c3;
}

.card.jade {
  background: var(--jade-soft);
  border-color: #c9dcd6;
}

.stack > * + * {
  margin-top: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.08s ease, opacity 0.15s ease;
}

.btn:hover {
  opacity: 0.88;
}

.btn:active {
  transform: translateY(1px);
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-2);
}

.btn.small {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.82rem;
}

.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

label.field {
  display: block;
  margin: 18px 0;
}

label.field > span {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 600;
}

input[type="text"],
input[type="date"],
input[type="email"],
input[type="number"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: #fff;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
}

input:focus,
input[type="search"]:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--jade);
  outline-offset: 1px;
  border-color: var(--jade);
}

textarea {
  min-height: 84px;
  resize: vertical;
}

.choices {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.choice {
  border: 1px solid var(--line-2);
  background: #fff;
  border-radius: var(--radius);
  padding: 14px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
}

.choice b {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.choice small {
  display: block;
  line-height: 1.4;
}

.choice[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--paper-2);
  box-shadow: inset 0 0 0 1px var(--ink);
}

/* ----------------------------------------------------------------- data */

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 14px;
  align-items: baseline;
  margin: 6px 0 4px;
}

.stat {
  min-width: 0;
}

.stat b {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 4.6vw, 1.45rem);
  line-height: 1.25;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stat small {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lightbar {
  position: relative;
  height: 10px;
  background: var(--paper-2);
  border-radius: 5px;
  overflow: hidden;
  margin: 16px 0 10px;
}

.lightbar .day {
  position: absolute;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, #d8c9a8, #f0dfae);
  border-radius: 5px;
}

.scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- timer */

.timer-face {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 26px 10px 18px;
}

.breath {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: radial-gradient(circle at 50% 40%, #fff, var(--paper-2));
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 2.1rem;
  font-variant-numeric: tabular-nums;
  transition: transform 4s cubic-bezier(0.45, 0, 0.55, 1);
}

.breath.inhale {
  transform: scale(1.12);
}

.breath.exhale {
  transform: scale(0.92);
}

.step-text {
  min-height: 3em;
  text-align: center;
  font-size: 1.02rem;
  color: var(--ink-2);
}

/* ----------------------------------------------------------- year strip */

.yearmap {
  display: grid;
  gap: 2px;
  margin: 24px 0;
}

.node {
  display: grid;
  grid-template-columns: 92px 1fr 88px;
  gap: 12px;
  align-items: center;
  padding: 9px 10px;
  border-left: 3px solid transparent;
  font-size: 0.9rem;
}

.node:nth-child(odd) {
  background: rgba(0, 0, 0, 0.015);
}

.node.past {
  opacity: 0.5;
}

.node.active {
  border-left-color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
  opacity: 1;
}

.node .t {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 0.8rem;
}

.node .n {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.node .el {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.node .d {
  text-align: right;
  color: var(--muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------- others */

.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin: 26px 0;
}

.plan {
  border: 1px solid var(--line-2);
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.plan.feature {
  border-color: var(--ink);
  box-shadow: 0 1px 0 var(--ink);
}

.plan .amount {
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1.1;
}

.plan ul {
  padding-left: 18px;
  margin: 14px 0 18px;
  font-size: 0.86rem;
  color: var(--ink-2);
}

.plan li {
  margin: 6px 0;
}

.plan .btn {
  margin-top: auto;
}

.faq {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
}

.faq p {
  margin: 10px 0 0;
  color: var(--ink-2);
  font-size: 0.92rem;
}

.pill {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--paper-2);
  border: 1px solid var(--line-2);
  color: var(--muted);
}

.gate {
  position: relative;
  overflow: hidden;
}

.gate .veil {
  position: absolute;
  inset: 0;
  /* Fade, then stay opaque: the last third is meant to read as "there is more
     here", not as an empty panel someone forgot to fill in. */
  background: linear-gradient(180deg, rgba(250, 248, 244, 0) 0%, rgba(250, 248, 244, 0.86) 42%, var(--paper) 74%);
  pointer-events: none;
}

.gate-body {
  max-height: 150px;
  overflow: hidden;
}

.hidden {
  display: none !important;
}

.notice {
  font-size: 0.8rem;
  color: var(--muted);
  border-left: 2px solid var(--line-2);
  padding-left: 12px;
  margin: 18px 0;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 12px;
  top: 12px;
  background: #fff;
  padding: 10px 14px;
  z-index: 100;
  border: 1px solid var(--ink);
}

@media (max-width: 700px) {
  .price-grid {
    grid-template-columns: 1fr;
  }
  .choices {
    grid-template-columns: 1fr;
  }
  .node {
    grid-template-columns: 76px 1fr;
  }
  .node .d {
    display: none;
  }
  .nav-links {
    gap: 14px;
    font-size: 0.8rem;
  }
  .brand span {
    display: none;
  }
}

/*
 * The wordmark went from two characters to six. At 320px the five links no
 * longer fit beside it, so the bar takes a second line instead of letting the
 * whole page scroll sideways — which it did, by 12px, until this was added.
 */
@media (max-width: 430px) {
  .nav {
    height: auto;
    flex-wrap: wrap;
    /* The header bar is `class="wrap nav"` — one element, two classes. Setting
       this to `9px 0 8px` would zero out .wrap's 22px gutter. */
    padding: 9px 22px 8px;
    row-gap: 5px;
  }
  .brand {
    font-size: 1.04rem;
  }
  .nav-links {
    width: 100%;
    flex-wrap: wrap;
    gap: 6px 14px;
    font-size: 0.78rem;
  }
  /* Wrapping has to happen between links, never inside one: "How it / works"
     reads as a layout bug, and a horizontally scrolled nav hides Pricing. */
  .nav-links a {
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .breath {
    transition: none;
  }
}

@media print {
  header.site,
  footer.site,
  .btn {
    display: none;
  }
  body {
    background: #fff;
  }
}
