/* Grandma Haru: landing page. Built on tasteskill's base.css (direction "The split stage", seed 399941367),
   with the brand's palette and type kept: washi, indigo, seal red; Shippori Mincho and Zen Kaku Gothic New. */

:root {
  --bg: #F6F1E6;            /* washi paper */
  --surface: #ECE3D2;       /* one step darker */
  --surface-2: #E2D7C0;     /* a tone off the field */
  --ink: #1F1B16;
  --muted: #5C554B;
  --accent: #B33A2E;        /* the seal: the action */
  --accent-strong: #962E24;
  --accent-ink: #FFFDF7;
  --indigo: #23395B;        /* the notebook's cloth */
  --indigo-ink: #F6F1E6;

  --font-display: 'Shippori Mincho', 'Times New Roman', serif;
  --font-text: 'Zen Kaku Gothic New', system-ui, sans-serif;

  --step-small: 0.875rem;
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --step-head: clamp(2rem, 1.4rem + 2.2vw, 3rem);
  --step-display: clamp(2.25rem, 0.6rem + 4.6vw, 4.25rem);

  --margin: clamp(1.25rem, 2.2vw, 2rem);
  --gutter: clamp(1rem, 2vw, 2rem);
  --section: clamp(6rem, 12vw, 13rem);
  --radius: 0px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-ui: 300ms;
  --t-reveal: 800ms;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-text); font-size: var(--step-body); line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
h1, h2, h3, p, figure, ul, ol, dl, dd { margin: 0; }
ul[class], ol[class] { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; background: var(--surface); }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:target { scroll-margin-top: 2rem; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; text-wrap: balance; }
.display { font-size: var(--step-display); line-height: 0.98; letter-spacing: -0.035em; }
.head { font-size: var(--step-head); line-height: 1.06; letter-spacing: -0.02em; }
.lead { font-size: var(--step-lead); line-height: 1.4; }
p { max-width: 62ch; text-wrap: pretty; }
.nums { font-variant-numeric: tabular-nums; }

/* ---------- controls ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: 0 1.5rem; background: var(--accent); color: var(--accent-ink); border-radius: var(--radius); font-weight: 700; text-decoration: none; white-space: nowrap; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease; }
.button:active { transform: scale(0.97); }
.button-ink { background: var(--ink); color: var(--bg); }
.link { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.22em; text-decoration-thickness: 0.08em; transition: text-decoration-color var(--t-hover) ease; }
.link-plain { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 0.08em; transition: color var(--t-hover) ease; }
@media (hover: hover) and (pointer: fine) {
  .button:hover { background-color: var(--accent-strong); }
  .button-ink:hover { background-color: var(--indigo); }
  .link:hover { text-decoration-color: currentColor; }
  .link-plain:hover { color: var(--accent); }
}

/* ---------- hero: statement beside a mosaic of the notebook ---------- */
.hero { display: grid; grid-template-columns: 52fr 48fr; height: 100svh; min-height: 640px; }
.hero-text { padding: var(--margin); display: flex; flex-direction: column; gap: clamp(3rem, 8vh, 6rem); }
.wordmark { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-weight: 800; font-size: 1.375rem; text-decoration: none; }
.seal { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; background: var(--accent); color: var(--accent-ink); border-radius: 6px; font-family: var(--font-display); font-size: 1.25rem; transform: rotate(6deg); }
.hero-copy { display: flex; flex-direction: column; gap: 2.25rem; }
.hero-copy .lead { max-width: 30ch; }
.hero-act { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; }
.lines .line { display: block; overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.lines [data-line] { display: block; }

.hero-field { position: relative; background: var(--surface); overflow: hidden; }
.hero-nav { position: absolute; top: var(--margin); right: var(--margin); display: flex; gap: 1.75rem; z-index: 1; font-weight: 500; }
.mosaic { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; width: 134%; padding: 5.5rem 0 2rem var(--margin); }
.hero-facts { margin-top: auto; max-width: 34ch; }
.tile { aspect-ratio: 3 / 4; overflow: hidden; background: var(--bg); }
.tile img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.t-haru { grid-column: 1; grid-row: 1; }
.t-cover { grid-column: 2 / 4; grid-row: 1 / 3; aspect-ratio: auto; }
.t-page { grid-column: 4; grid-row: 1; }
.t-hands { grid-column: 4; grid-row: 2; background: var(--indigo); }
.t-dish { grid-column: 1; grid-row: 3; }
.t-check { grid-column: 3; grid-row: 3; }
.t-washer { grid-column: 4; grid-row: 3; }

/* ---------- shared section frame ---------- */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); padding-inline: var(--margin); }
.section { padding-block: calc(var(--section) / 2); }

/* intro: a narrow column of text beside the place nobody looks */
.intro { align-items: center; }
.intro-text { grid-column: 1 / 6; display: flex; flex-direction: column; gap: 1.1rem; }
.intro-text h2 { margin-bottom: 0.6rem; }
.intro-text .first { font-weight: 700; font-size: var(--step-lead); line-height: 1.35; }
.intro-pic { grid-column: 8 / 13; overflow: hidden; }
.intro-pic img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 40%; }

/* the live thing: check your house */
.secrets { align-items: start; }
.secrets-head { grid-column: 7 / 13; grid-row: 1; }
.secrets-head p { margin: 1rem 0 2.5rem; }
.secrets-pic { grid-column: 1 / 6; grid-row: 1 / 3; position: sticky; top: 10vh; }
.stack { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--bg); }
.stack img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; opacity: 0; transition: opacity var(--t-ui) ease; }
.stack img.is-active { opacity: 1; }
.secrets-list { grid-column: 7 / 13; grid-row: 2; }
.rows { display: flex; flex-direction: column; gap: 4px; }
.row { background: transparent; transition: background-color var(--t-hover) ease; }
.row label { display: grid; grid-template-columns: 1.6rem 1fr auto; align-items: center; column-gap: 0.9rem; min-height: 58px; padding: 0.55rem 0.9rem; cursor: pointer; }
.row input { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--accent); }
.row-name { font-family: var(--font-display); font-weight: 800; font-size: var(--step-lead); line-height: 1.25; }
.row-room { font-size: var(--step-small); color: var(--muted); }
.row-desc { display: grid; grid-template-rows: 1fr; padding: 0 0.9rem 0.9rem 3.4rem; max-width: 34ch; box-sizing: content-box; }
.js .row-desc { grid-template-rows: 0fr; padding-bottom: 0; transition: grid-template-rows var(--t-ui) var(--ease-out), padding var(--t-ui) var(--ease-out); }
.row-desc > span { overflow: hidden; }
.row.is-active { background: var(--surface); }
.row.is-active .row-room { color: var(--accent); font-weight: 700; }
.js .row.is-active .row-desc { grid-template-rows: 1fr; padding-bottom: 0.9rem; }
.tally { margin-top: 2rem; font-size: var(--step-lead); line-height: 1.4; }
.tally a { font-weight: 700; }

/* one page, one secret: a square plate with spare text */
.plate { min-height: 88svh; background: var(--surface); }
.plate-pic { grid-column: 1 / 7; display: flex; align-items: center; padding-block: 40px; }
.plate-pic img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: center 38%; }
.plate-text { grid-column: 7 / 13; display: flex; flex-direction: column; justify-content: space-between; gap: 3rem; padding-block: 40px; }
.tabs { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; }
.tabs [role="tab"] { min-height: 44px; font-size: 1.125rem; color: var(--muted); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.3em; text-decoration-thickness: 0.1em; transition: color var(--t-hover) ease, text-decoration-color var(--t-hover) ease; }
.tabs [role="tab"][aria-selected="true"] { color: var(--ink); font-weight: 700; text-decoration-color: var(--accent); }
@media (hover: hover) and (pointer: fine) { .tabs [role="tab"]:hover { color: var(--ink); } }
.plate-body { display: flex; flex-direction: column; gap: 3rem; }
.plate-body p { max-width: 34ch; font-size: var(--step-lead); line-height: 1.45; }
.cells { display: grid; grid-template-columns: 1fr 1fr; }
.cell { display: flex; align-items: center; justify-content: center; min-height: 72px; padding: 0 1rem; text-align: center; font-weight: 700; text-decoration: none; transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.cell:active { transform: scale(0.98); }
.cell-ink { background: var(--accent); color: var(--accent-ink); }
.cell-soft { background: var(--surface-2); color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .cell-ink:hover { background: var(--accent-strong); } .cell-soft:hover { background: #D6C9AE; } }

/* one month, every spot: the checklist printed as a slip */
.month { background: var(--indigo); color: var(--indigo-ink); align-items: start; }
.month-text { grid-column: 1 / 6; display: flex; flex-direction: column; gap: 1.5rem; }
.month-text p { max-width: 30ch; font-size: var(--step-lead); line-height: 1.45; }
.slip { grid-column: 7 / 12; background: var(--bg); color: var(--ink); padding: 2.5rem 2rem 4rem; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), 95% 100%, 90% calc(100% - 14px), 85% 100%, 80% calc(100% - 14px), 75% 100%, 70% calc(100% - 14px), 65% 100%, 60% calc(100% - 14px), 55% 100%, 50% calc(100% - 14px), 45% 100%, 40% calc(100% - 14px), 35% 100%, 30% calc(100% - 14px), 25% 100%, 20% calc(100% - 14px), 15% 100%, 10% calc(100% - 14px), 5% 100%, 0 calc(100% - 14px)); }
.slip h3 { font-family: var(--font-text); font-weight: 700; font-size: var(--step-body); margin-top: 1.75rem; }
.slip h3:first-child { margin-top: 0; }
.slip-rows li { display: flex; align-items: baseline; gap: 0.5rem; font-size: 1rem; line-height: 1.9; font-variant-numeric: tabular-nums; }
.leader { flex: 1; overflow: hidden; white-space: nowrap; color: var(--muted); }
.leader::after { content: ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ."; }
.slip-rows li span:last-child { color: var(--muted); }
.slip-total { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 2rem; min-height: 44px; padding: 0 0.9rem; background: var(--ink); color: var(--bg); font-weight: 700; max-width: none; }

/* price: two plans, two fields */
.plans { display: grid; grid-template-columns: 1fr 1fr; }
.plan { display: flex; flex-direction: column; gap: 1.25rem; min-height: 80svh; padding: 40px var(--margin) 40px calc(var(--gutter) / 2); }
.plan:first-child { padding-left: var(--margin); }
.plan-free { background: var(--surface); }
.plan-full { background: var(--indigo); color: var(--indigo-ink); }
.plan-for { font-size: 1.25rem; max-width: 26ch; line-height: 1.4; }
.plan-inc { max-width: 40ch; }
.plan-full .plan-inc, .plan-full .plan-for { color: var(--indigo-ink); }
.plan-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 1rem 2rem; }
.price { font-family: var(--font-display); font-weight: 800; }
.price small { font-family: var(--font-text); font-weight: 500; font-size: 1.125rem; letter-spacing: 0; margin-left: 0.4rem; }

/* questions as reading text */
.faq h2 { grid-column: 1 / 6; }
.faq-text { grid-column: 7 / 13; columns: 2; column-gap: 40px; }
.faq-text p { break-inside: avoid; margin-bottom: 1.25rem; max-width: 40ch; }
.faq-text b { font-weight: 700; }

/* the notebook returns */
.close { position: relative; overflow: hidden; overflow: clip; min-height: 90svh; background: var(--surface); align-items: center; }
.close-object { grid-column: 1 / 7; align-self: end; }
.close-object img { width: 100%; max-width: none; margin: 5rem 0 -18% -10%; transform: rotate(-5deg); background: none; }
.close-text { grid-column: 7 / 13; max-width: 28rem; display: flex; flex-direction: column; gap: 1.1rem; padding-block: 4rem; }
.close-text .fact { font-family: var(--font-display); font-weight: 800; font-size: var(--step-lead); }
.close-text .button { align-self: start; }

/* legal pages: one reading column */
.legal { max-width: 44rem; padding: 2.5rem var(--margin) 0; }
.legal .wordmark { margin-bottom: clamp(3rem, 8vh, 5rem); }
.legal h1 { margin-bottom: 1rem; }
.legal h2 { font-size: var(--step-lead); line-height: 1.3; margin: 2.5rem 0 0.6rem; }
.legal p + p { margin-top: 0.8rem; }
.legal .updated { color: var(--muted); }

/* footer: one quiet line */
.foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; gap: 1.5rem; padding: 30svh var(--margin) 30px; font-size: 1rem; }
.foot p { color: var(--muted); }
.foot nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: center; }
.foot p:last-child { justify-self: end; }

/* ---------- tablet and phone: one column ---------- */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .hero-text { gap: 2.5rem; padding-bottom: 3rem; }
  .hero-copy { gap: 1.25rem; }
  .hero-field { min-height: 0; }
  .hero-nav { position: static; padding: var(--margin) var(--margin) 0; justify-content: flex-start; }
  .hero-nav a:not(:first-child) { display: none; }
  .mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; padding: 1.5rem var(--margin) 0; max-height: 92svh; overflow: hidden; }
  .mosaic .tile { grid-column: auto; grid-row: auto; aspect-ratio: 3 / 4; }
  .mosaic .tile:nth-child(even) { margin-top: 48px; }
  .t-check, .t-washer { display: none; }
  .intro-text, .intro-pic, .secrets-head, .secrets-list, .plate-pic, .plate-text, .month-text, .slip, .faq h2, .faq-text { grid-column: 1 / -1; }
  .intro-pic { margin-top: 3rem; }
  .secrets-head { grid-row: 1; }
  .secrets-pic { grid-column: 1 / -1; grid-row: 2; position: sticky; top: 0; z-index: 2; height: 38svh; margin-inline: calc(var(--margin) * -1); }
  .secrets-list { grid-row: 3; }
  .stack { aspect-ratio: auto; height: 100%; }
  .secrets-list { margin-top: 2rem; }
  .row-desc { padding-left: 3.4rem; }
  .plate { min-height: 0; }
  .plate-pic { padding-block: 16px 0; }
  .plate-text { padding-block: 1.5rem 2.5rem; gap: 2rem; }
  .cells { grid-template-columns: 1fr; }
  .cell { min-height: 60px; }
  .slip { margin-top: 3rem; padding-inline: 1.25rem; }
  .plans { grid-template-columns: 1fr; }
  .plan-full { order: -1; }
  .plan, .plan:first-child { min-height: 70svh; padding: 2rem var(--margin); }
  .plan-foot .button { width: 100%; }
  .faq-text { margin-top: 1.5rem; }
  .close { min-height: 70svh; }
  .foot { grid-template-columns: 1fr; gap: 8px; padding-top: 20svh; padding-bottom: 24px; font-size: 0.875rem; }
  .foot nav { justify-content: flex-start; }
  .foot p:last-child { justify-self: start; }
}
@media (max-width: 760px) {
  h1.display { font-size: 9.4vw; }
  .hero-nav { display: none; }
  .mosaic { max-height: none; padding-top: 1.5rem; padding-bottom: 2rem; }
  .t-page, .t-hands, .t-dish { display: none; }
  .secrets-pic { height: 30svh; }
  .plan, .plan:first-child { min-height: 0; padding-block: 3rem; }
  .plan-foot { margin-top: 1.5rem; }
  .foot { padding-top: 12svh; }
  .faq-text { columns: 1; }
  .close { min-height: 0; }
  .close-text { grid-column: 1 / -1; order: -1; max-width: none; padding-block: 3rem 0; }
  .close-object { grid-column: 1 / -1; }
  .close-object img { width: 100%; margin: 2rem 0 -30% 12%; }
}

/* ---------- motion (content stays visible without JavaScript) ---------- */
.shutter { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .js [data-rise] { opacity: 0; transform: translateY(18px); animation: rise var(--t-reveal) var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 90ms + 300ms); }
  .js .lines [data-line] { transform: translateY(105%); animation: line 900ms var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 110ms + 150ms); }
  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .shutter[data-reveal] { opacity: 1; transform: none; clip-path: inset(0 0 100% 0); transition: clip-path 1100ms var(--ease-in-out); }
  .js .shutter[data-reveal] img { transform: scale(1.12); transition: transform 1500ms var(--ease-soft); }
  .js .shutter[data-reveal].is-in { clip-path: inset(0); }
  .js .shutter[data-reveal].is-in img { transform: none; }
  .js .t-cover { clip-path: inset(0 0 100% 0); animation: open 1100ms var(--ease-in-out) 250ms forwards; }
  .js .t-cover img { transform: scale(1.12); animation: settle 1500ms var(--ease-soft) 250ms forwards; }
  .t-haru img, .intro-pic img { animation: drift 18s var(--ease-soft) infinite alternate; }
  .close-object img { animation: sway 14s var(--ease-soft) infinite alternate; }
}
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes open { to { clip-path: inset(0); } }
@keyframes settle { to { transform: none; } }
@keyframes line { to { transform: none; } }
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.07); } }
@keyframes sway { from { transform: rotate(-5deg); } to { transform: rotate(-3deg) translateY(-12px); } }
