/*
  We Member Me — public landing page.
  Voice: kept, handwritten, shared — the family biscuit tin full of photos and letters.
  Colour: from the brand board (theme/theme.png): cream paper, terracotta for what you press,
  deep brown ink, with sage (us) and sand (later) as named roles. The token names (brick, jade,
  ochre) are the roles; the values are the board's.
  Type: LXGW WenKai TC (a warm, hand-lettered Kai) for display; Noto Sans HK for reading;
  the wordmark in its own soft serif (Fraunces, only the letters of the name).
  Everything is self-hosted: no third-party requests.
*/

@font-face {
  font-family: "Wordmark";
  src: url("/fonts/wordmark.woff2?v=1") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "WenKai";
  src: url("/fonts/wenkai-bold.woff2?v=ec29a79a91") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "WenKai";
  src: url("/fonts/wenkai-regular.woff2?v=3ee604b281") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans HK";
  src: url("/fonts/notosanshk.woff2?v=23842dc04a") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}

:root {
  --brick: #b0523a;
  --brick-deep: #8c3f2a;
  --brick-soft: #fbe9dc;
  --jade: #6f7550;
  --jade-soft: #eef0e4;
  --ochre: #deb08c;
  --ochre-soft: #f9e2c9;
  --ink: #4a2414;
  --ink-2: #6b4433;
  --ink-3: #7a5644;
  --paper: #fef8f1;
  --paper-2: #f9ecdd;
  --line: #ebddce;
  --on-brick: #fff8f0;
  --on-brick-2: #fbe0cf;
  --terracotta: #c6664a;
  --blush: #e9a687;

  --display: "WenKai", "Kaiti TC", "BiauKai", "STKaiti", serif;
  --sans: "Noto Sans HK", "PingFang HK", "Microsoft JhengHei", system-ui, sans-serif;

  --step--1: clamp(.85rem, .82rem + .15vw, .95rem);
  --step-0: clamp(1.05rem, 1rem + .25vw, 1.2rem);
  --step-1: clamp(1.3rem, 1.2rem + .5vw, 1.6rem);
  --step-2: clamp(1.7rem, 1.45rem + 1.2vw, 2.4rem);
  --step-3: clamp(2.2rem, 1.7rem + 2.4vw, 3.6rem);
  --step-4: clamp(2.4rem, 1.6rem + 4vw, 5.2rem);

  --gutter: clamp(16px, 4vw, 48px);
  --section: clamp(4rem, 3rem + 6vw, 9rem);
  --radius: 14px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}
@font-face {
  font-family: "Klee One";
  src: url("/fonts/kleeone-semibold.woff2?v=40c5bfe28c") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Klee One";
  src: url("/fonts/kleeone-regular.woff2?v=443c8f21c0") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans JP";
  src: url("/fonts/notosansjp.woff2?v=3a43c8bf4f") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}
@font-face {
  font-family: "Gowun Batang";
  src: url("/fonts/gowunbatang-bold.woff2?v=6aec794ade") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Gowun Batang";
  src: url("/fonts/gowunbatang-regular.woff2?v=1799942130") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans KR";
  src: url("/fonts/notosanskr.woff2?v=15cd7dc4cd") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}
/* Japanese and Korean pages use fonts made for those scripts; Simplified Chinese uses the
   reader's own system fonts (the self-hosted Chinese fonts are Traditional). */
:root:lang(ja) {
  --display: "Klee One", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --sans: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", "Meiryo", system-ui, sans-serif;
}
:root:lang(ko) {
  --display: "Gowun Batang", "AppleMyungjo", "Batang", serif;
  --sans: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}
:root:lang(zh-Hans) {
  --display: "Kaiti SC", "STKaiti", "KaiTi", serif;
  --sans: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
}
/* English pages: Latin text in a Latin font first (CJK fonts set ’ and “ as full-width marks). */
:root:lang(en) {
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans HK", sans-serif;
}

*, *::before, *::after { 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: var(--step-0); line-height: 1.8; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.25; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: inherit; }
.nowrap { white-space: nowrap; }
:focus-visible { outline: 3px solid oklch(0.6 0.15 250); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 10; background: var(--paper); color: var(--ink); padding: .5rem 1rem; border-radius: 8px; }
.skip:focus { top: 1rem; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 52px; padding: .8rem 1.5rem;
  border-radius: 999px; font: inherit; font-weight: 700; font-size: var(--step-0); text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: background-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn-small { min-height: 42px; padding: .45rem 1.1rem; font-size: var(--step--1); }
.btn-light { background: var(--brick); color: var(--on-brick); box-shadow: 0 6px 18px color-mix(in oklch, var(--brick) 28%, transparent); }
.btn-light:hover { background: var(--brick-deep); }
.btn-ghost-light { color: var(--brick-deep); border-color: color-mix(in oklch, var(--brick) 45%, transparent); }
.btn-ghost-light:hover { border-color: var(--brick); background: var(--brick-soft); }
.btn-brick { background: var(--brick); color: var(--on-brick); }
.btn-brick:hover { background: var(--brick-deep); }
.btn-outline { color: var(--brick); border-color: var(--brick); background: transparent; }
.btn-outline:hover { background: var(--brick-soft); }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.top { position: absolute; inset: 0 0 auto 0; z-index: 5; display: flex; align-items: center; gap: 1.5rem;
  padding: 1rem var(--gutter); color: var(--ink); }
/* The name in its own serif, with the mark (an envelope of photographs) before it. The mark is
   cut out for light paper; on dark ground the simplified heart tile stands in. */
.wordmark { font-family: "Wordmark", var(--display); font-weight: 700; font-size: 1.45rem; letter-spacing: 0; text-decoration: none; margin-right: auto;
  display: inline-flex; align-items: center; gap: .55rem; color: var(--ink); white-space: nowrap; }
.wordmark::before { content: ""; flex: none; width: 2.7rem; aspect-ratio: 378 / 328; background: url("/img/mark.webp") center / contain no-repeat; }
.top-links { display: none; gap: 1.5rem; font-size: var(--step--1); font-weight: 600; white-space: nowrap; }
.top-links a { text-decoration: none; opacity: .85; }
.top-links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: .3em; }
/* A home page's six links, the language menu and two buttons need room; the three links of the
   other pages fit much sooner. Below these widths the same links are at the foot of the page. */
@media (min-width: 1000px) { .top-links:not(:has(a:nth-child(4))) { display: flex; } }
@media (min-width: 1320px) { .top-links { display: flex; } }
/* The bar's button never folds its words; where the name, the language menu and it cannot share a
   line (phones), it steps aside: the same button is the first thing under the headline. */
.top .btn { flex: none; white-space: nowrap; }
/* The way in for people who already have a place here: quieter than the button beside it. */
.top-login { flex: none; display: inline-flex; align-items: center; min-height: 42px; padding: .35rem .95rem; border-radius: 999px;
  font-size: var(--step--1); font-weight: 700; white-space: nowrap; text-decoration: none; color: var(--brick);
  border: 1.5px solid color-mix(in oklch, var(--brick) 40%, transparent); }
.top-login:hover { background: var(--brick-soft); }
@media (max-width: 600px) {
  .top { gap: .6rem; }
  .top .btn { display: none; }
  .top-login { padding-inline: .75rem; }
}
@media (max-width: 400px) { .wordmark { font-size: 1.2rem; gap: .4rem; } .wordmark::before { width: 2.2rem; } }
@media (max-width: 350px) {
  .top { gap: .4rem; }
  .wordmark { font-size: 1.02rem; gap: .3rem; } .wordmark::before { width: 1.9rem; }
  .top-login { padding-inline: .6rem; } .lang-menu summary { padding-inline: .45rem; }
}

/* ---------- Hero ---------- */
.hero { position: relative; color: var(--ink); display: grid; overflow: hidden;
  background: radial-gradient(120% 90% at 12% 0%, #fffaf4 0%, var(--paper) 42%, var(--ochre-soft) 100%);
  padding: calc(5.5rem + env(safe-area-inset-top)) var(--gutter) 0; }
.hero-text { position: relative; z-index: 1; max-width: 36rem; padding-bottom: 2.5rem; }
.hero-title { color: var(--ink); font-family: var(--display); font-size: var(--step-4); line-height: 1.12; letter-spacing: .01em; margin-bottom: 1.5rem; }
.hero-title span { display: block; white-space: nowrap; animation: rise .9s var(--ease) both; }
.hero-title span + span { animation-delay: .12s; }
/* English lines are longer than Chinese ones: let them wrap on small screens. */
.hero-title:lang(en) span { white-space: normal; }
.hero-lede { font-size: var(--step-1); line-height: 1.75; color: var(--ink-2); max-width: 32em; animation: rise .9s var(--ease) .24s both; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 2rem 0 1rem; animation: rise .9s var(--ease) .34s both; }
.hero-note { font-size: var(--step--1); color: var(--ink-3); animation: rise .9s var(--ease) .42s both; }
.hero-visual { position: relative; margin: 0 calc(var(--gutter) * -1); }
.hero-visual img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; animation: unveil 1.2s var(--ease) .15s both; }
.memory-card { position: absolute; left: var(--gutter); bottom: 1.5rem; max-width: min(20rem, 80%); padding: 1rem 1.25rem .9rem;
  background: var(--paper); color: var(--ink); border-radius: 6px; transform: rotate(-2.2deg);
  box-shadow: 0 2px 4px oklch(0.2 0.03 40 / .18), 0 18px 40px oklch(0.2 0.03 40 / .28); animation: drop 1s var(--ease) .7s both; }
.memory-card p { margin: 0; }
.memory-date { font-size: .82rem; font-weight: 700; color: var(--brick); }
.memory-title { font-family: var(--display); font-size: 1.35rem; font-weight: 700; line-height: 1.35; margin: .15rem 0 .35rem !important; }
.memory-people { font-size: .8rem; color: var(--ink-3); }
.dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; margin-right: .3rem; vertical-align: .05em; }
.dot-brick { background: var(--brick); } .dot-jade { background: var(--jade); } .dot-ochre { background: var(--ochre); }

@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; min-height: min(92vh, 60rem);
    padding: 7rem 0 0 var(--gutter); gap: 3rem; }
  .hero-text { padding-bottom: 6rem; }
  .hero-visual { margin: 0; align-self: stretch; }
  .hero-visual img { height: 100%; aspect-ratio: auto; }
  .memory-card { left: -3rem; bottom: 4rem; }
}

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes unveil { from { clip-path: inset(0 0 100% 0); transform: scale(1.06); } to { clip-path: inset(0 0 0 0); transform: none; } }
@keyframes drop { from { opacity: 0; transform: translateY(24px) rotate(-6deg); } to { opacity: 1; transform: rotate(-2.2deg); } }

/* ---------- Sections ---------- */
section { padding: var(--section) var(--gutter); }
.section-title { font-family: var(--display); font-size: var(--step-3); line-height: 1.2; letter-spacing: .01em; }
.section-title-small { font-size: var(--step-2); }

.tin { display: grid; gap: 2rem; max-width: 72rem; margin: 0 auto; }
.tin-title { font-family: var(--display); font-size: var(--step-3); line-height: 1.25; color: var(--brick); }
.tin-body { font-size: var(--step-1); line-height: 1.85; color: var(--ink-2); max-width: 30em; }
.tin-punch { font-family: var(--display); font-weight: 700; color: var(--ink); font-size: var(--step-2); margin-top: 1.5rem; }
/* Remembering: the same layout on a quieter background, so it reads as its own moment. */
.remember { background: var(--paper-2); max-width: none; padding-inline: max(var(--gutter), calc((100vw - 72rem) / 2)); }
.remember .tin-title { color: var(--ink); }
@media (min-width: 900px) { .tin { grid-template-columns: 1fr 1.1fr; gap: 5rem; align-items: start; } }

.ways { background: var(--paper-2); display: grid; gap: clamp(3.5rem, 8vw, 7rem); }
.ways > .section-title { max-width: 72rem; margin: 0 auto; width: 100%; }
.way { display: grid; gap: 2rem; max-width: 72rem; margin: 0 auto; width: 100%; align-items: center; }
.way img { width: calc(100% - 8px); aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius);
  box-shadow: 8px 8px 0 var(--way-color); }
.way-text { max-width: 30rem; }
.way-text h3 { font-family: var(--display); font-size: var(--step-2); margin-bottom: .75rem; }
.way-text p:last-child { color: var(--ink-2); }
.way-name { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: var(--step--1); color: var(--way-ink); margin-bottom: .5rem; letter-spacing: .02em; }
.way-me { --way-color: var(--brick); --way-ink: var(--brick); }
.way-us { --way-color: var(--jade); --way-ink: var(--jade); }
.way-future { --way-color: var(--ochre); --way-ink: #8a5a34; }
.soon { display: inline-block; font-size: .72rem; font-weight: 700; padding: .05rem .55rem; border-radius: 999px;
  background: var(--ochre-soft); color: oklch(0.45 0.1 70); margin-left: .4rem; letter-spacing: 0; vertical-align: .1em; }
@media (min-width: 900px) {
  .way { grid-template-columns: 1.15fr 1fr; gap: 5rem; }
  .way img { width: 100%; box-shadow: 14px 14px 0 var(--way-color); }
  .way:nth-of-type(even) img { order: 2; box-shadow: -14px 14px 0 var(--way-color); }
}

.examples { max-width: 80rem; margin: 0 auto; }
.section-lede { font-size: var(--step-1); line-height: 1.8; color: var(--ink-2); max-width: 36em; margin: 1rem 0 0; }
.snippets { list-style: none; margin: 2rem calc(var(--gutter) * -1) 0; padding: 0 var(--gutter) 1rem; display: grid; grid-auto-flow: column;
  grid-auto-columns: minmax(16rem, 78%); gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: thin; }
.snippet { scroll-snap-align: start; position: relative; overflow: hidden; background: #fff; border-radius: 10px; padding: 1.6rem 1.4rem 1.4rem;
  box-shadow: 0 1px 2px oklch(0.2 0.02 40 / .08), 0 10px 24px oklch(0.2 0.02 40 / .07); }
/* A strip of colour across the top, clipped by the card's rounded corners. */
.snippet::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--snip); }
.snippet:nth-child(odd) { transform: rotate(-.8deg); }
.snippet:nth-child(even) { transform: rotate(.7deg); }
.snippet-date { font-size: var(--step--1); font-weight: 700; color: var(--snip-ink, var(--snip)); margin-bottom: .5rem; }
.snippet p:last-child { font-family: var(--display); font-size: var(--step-1); line-height: 1.55; margin: 0; }
.snippet-brick { --snip: var(--brick); } .snippet-jade { --snip: var(--jade); }
.snippet-ochre { --snip: var(--ochre); --snip-ink: #8a5a34; } .snippet-ink { --snip: var(--ink); }
@media (min-width: 900px) { .snippets { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); overflow: visible; margin-inline: 0; padding-inline: 0; } }

.how { background: var(--ink); color: var(--paper); }
.how .section-title { max-width: 72rem; margin: 0 auto 3rem; }
.steps { list-style: none; margin: 0 auto; padding: 0; max-width: 72rem; display: grid; gap: 2.5rem; }
.steps h3 { font-family: var(--display); font-size: var(--step-1); margin: .25rem 0 .5rem; }
.steps p { color: oklch(0.82 0.01 60); margin: 0; }
.step-num { font-family: var(--display); font-size: var(--step-3); line-height: 1; color: var(--ochre); }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 3.5rem; } }

.features { max-width: 72rem; margin: 0 auto; }
.feature-list { display: grid; margin: 2.5rem 0 0; border-top: 1px solid var(--line); }
.feature-list > div { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.feature-list dt { font-weight: 700; }
.feature-list dd { margin: 0; color: var(--ink-2); }
@media (min-width: 900px) { .feature-list { grid-template-columns: 1fr 1fr; column-gap: 4rem; border-top: 0; }
  .feature-list > div:nth-child(-n+2) { border-top: 1px solid var(--line); } }

.privacy { background: var(--jade); color: var(--paper); display: grid; gap: 2.5rem; align-items: center; }
.privacy-photo { margin: 0; }
.privacy-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.privacy-text { max-width: 34rem; }
.privacy-list { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1.1rem; }
.privacy-list li { padding-left: 1.6rem; position: relative; color: #f3ecdc; }
.privacy-list li::before { content: ""; position: absolute; left: 0; top: .72em; width: .7rem; height: .7rem; border-radius: 50%; border: 2px solid var(--ochre); }
.privacy-list strong { color: #fff; }
@media (min-width: 900px) { .privacy { grid-template-columns: 1fr 1.1fr; gap: 5rem; padding-inline: max(var(--gutter), calc((100vw - 72rem) / 2)); } }

.pricing { max-width: 72rem; margin: 0 auto; }
.plans { display: grid; gap: 1.5rem; margin: 2.5rem 0 1.5rem; }
.plan { border-radius: 20px; padding: 2rem 1.75rem; background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; }
.plan-name { font-family: var(--display); font-size: var(--step-1); }
.plan-price { font-family: var(--display); font-size: var(--step-4); font-weight: 700; line-height: 1; margin: 1rem 0 .3rem; }
.currency { font-size: .4em; margin-right: .15em; vertical-align: .9em; }
/* No figure yet: the words take the price's place, at a size words can bear. */
.plan-price-later { font-size: var(--step-2); line-height: 1.25; padding: .35rem 0 .3rem; }
.plan-sub { color: var(--ink-3); font-size: var(--step--1); }
.plan ul { list-style: none; padding: 0; margin: 1rem 0 2rem; display: grid; gap: .6rem; flex: 1; }
.plan li { padding-left: 1.6rem; position: relative; }
.plan li::before { content: "✓"; position: absolute; left: 0; font-weight: 700; color: var(--jade); }
.plan-plus { background: var(--brick); color: var(--on-brick); border-color: var(--brick); }
.plan-plus .plan-sub { color: var(--on-brick-2); }
.plan-plus li::before { color: var(--ochre); }
.plan-plus .btn-brick { background: var(--on-brick); color: var(--brick-deep); }
.plan-plus .soon { margin-left: .5rem; }
.fine { font-size: var(--step--1); color: var(--ink-3); }
@media (min-width: 760px) { .plans { grid-template-columns: 1fr 1fr; } }

.faq { max-width: 50rem; margin: 0 auto; padding-top: 0; }
.faq .section-title { margin-bottom: 1.5rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 1rem; align-items: center;
  padding: 1.2rem 0; font-weight: 700; font-size: var(--step-0); min-height: 56px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--display); font-size: 1.6rem; color: var(--brick); transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); padding-bottom: 1.2rem; margin: 0; }

.join { background: var(--ochre-soft); display: grid; gap: 2.5rem; }
.join-intro { max-width: 30rem; }
.join-intro p { font-size: var(--step-1); color: var(--ink-2); margin-top: 1rem; }
.join-form { background: #fff; border-radius: 20px; padding: clamp(1.5rem, 4vw, 2.5rem); display: grid; gap: 1.4rem; max-width: 36rem; width: 100%;
  box-shadow: 0 1px 2px oklch(0.3 0.04 70 / .1), 0 20px 50px oklch(0.3 0.04 70 / .12); }
@media (min-width: 900px) { .join { grid-template-columns: 1fr 1.1fr; gap: 5rem; align-items: start; padding-inline: max(var(--gutter), calc((100vw - 72rem) / 2)); } }
.field { display: grid; gap: .45rem; border: 0; margin: 0; padding: 0; min-width: 0; }
.field > label, legend { font-weight: 700; padding: 0; display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap; }
legend { margin-bottom: .45rem; }
.optional { font-weight: 400; font-size: var(--step--1); color: var(--ink-3); }
input, textarea { font: inherit; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: 12px;
  padding: .75rem .95rem; min-height: 52px; width: 100%; transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus { outline: none; border-color: var(--brick); box-shadow: 0 0 0 4px color-mix(in oklch, var(--brick) 18%, transparent); }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
textarea { resize: vertical; line-height: 1.7; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { position: relative; display: inline-flex; cursor: pointer; }
.chip input { position: absolute; inset: 0; opacity: 0; margin: 0; min-height: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: .4rem 1rem; border-radius: 999px; border: 1.5px solid var(--line);
  font-size: var(--step--1); font-weight: 600; color: var(--ink-2); background: var(--paper); transition: all .15s var(--ease); }
.chip:hover span { border-color: var(--ink-3); }
.chip input:checked + span { background: var(--brick); border-color: var(--brick); color: var(--on-brick); }
.chip input:checked + span::before { content: "✓"; margin-right: .35rem; }
.chip input:focus-visible + span { outline: 3px solid oklch(0.6 0.15 250); outline-offset: 2px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.foot { background: var(--ink); color: oklch(0.8 0.01 60); padding: 3rem var(--gutter) calc(3rem + env(safe-area-inset-bottom)); text-align: center; }
.foot .wordmark { color: var(--paper); margin: 0 0 .25rem; font-size: 1.5rem; display: flex; justify-content: center; }
.foot .wordmark::before { width: 2rem; aspect-ratio: 1; background-image: url("/favicon.svg"); }
.credits { font-size: .8rem; color: oklch(0.68 0.01 60); max-width: 40rem; margin: 1.5rem auto 0; }

/* Plain pages (thanks, leave, errors) */
.plain { min-height: 100vh; display: grid; place-items: center; padding: 3rem var(--gutter); background: var(--ochre-soft); }
.plain-card { background: #fff; border-radius: 20px; padding: clamp(1.75rem, 5vw, 3rem); max-width: 34rem; width: 100%;
  box-shadow: 0 20px 50px oklch(0.3 0.04 70 / .12); }
.plain-card h1 { font-family: var(--display); font-size: var(--step-3); margin-bottom: 1rem; }
.plain-card .wordmark { color: var(--ink); margin-bottom: 1.5rem; }
.plain-card form { display: grid; gap: 1rem; margin-top: 1.5rem; }

/* Prints: photographs laid out like prints on a table, each with a handwritten line under it. */
.prints { padding-block: calc(var(--section) * .55); background: var(--paper); }
.prints ul { list-style: none; margin: 0 auto; padding: 0; max-width: 72rem; display: grid; gap: 2.25rem; justify-items: center; }
.print { margin: 0; max-width: 26rem; background: #fff; padding: .7rem .7rem 0; border-radius: 4px; transform: rotate(var(--tilt, 0deg));
  box-shadow: 0 1px 2px oklch(0.3 0.04 70 / .14), 0 16px 36px oklch(0.3 0.04 70 / .16); transition: transform .5s var(--ease); }
.print img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 2px; }
.print figcaption { font-family: var(--display); font-size: var(--step-0); line-height: 1.5; color: var(--ink); padding: .8rem .25rem 1rem; }
.prints li:nth-child(1) .print { --tilt: -1.8deg; }
.prints li:nth-child(2) .print { --tilt: 1.4deg; }
.prints li:nth-child(3) .print { --tilt: -.9deg; }
.print:hover { transform: rotate(0deg) translateY(-4px); }
@media (min-width: 760px) {
  .prints ul { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; align-items: start; }
  .prints li:nth-child(2) { margin-top: 2.75rem; }
}
/* end prints */

/* Scroll-driven reveals: only where supported; content is fully visible otherwise. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .way, .steps li, .plan { animation: rise both linear; animation-timeline: view(); animation-range: entry 0% cover 22%; }
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Language switch: a globe in the top bar (visible on phones too) and every language in the footer. */
/* The choice of language sits in the top bar: a small menu that opens in place (plain
   <details>, so it needs no script). The same list stays in the footer. */
.lang-menu { position: relative; font-size: var(--step--1); font-weight: 600; }
.lang-menu summary { display: inline-flex; align-items: center; gap: .4rem; min-height: 42px; padding: .35rem .8rem; border-radius: 999px; cursor: pointer;
  list-style: none; border: 1px solid color-mix(in oklch, var(--brick) 30%, transparent); white-space: nowrap; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary::after { content: ""; width: .45rem; height: .45rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px); transition: transform .2s var(--ease); }
.lang-menu[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
.lang-menu summary:hover, .lang-menu[open] summary { background: var(--brick-soft); }
.lang-list { position: absolute; right: 0; top: calc(100% + .4rem); z-index: 20; min-width: 12.5rem; padding: .4rem; display: grid;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px oklch(0.3 0.05 45 / .18); }
.lang-list a { display: flex; align-items: center; min-height: 44px; padding: .4rem .8rem; border-radius: 10px; text-decoration: none; color: var(--ink); }
.lang-list a:hover { background: var(--brick-soft); }
.lang-list a[aria-current] { color: var(--brick); font-weight: 700; }
.lang-list a[aria-current]::after { content: "✓"; margin-left: auto; padding-left: 1rem; }
/* Phones: the globe alone, to leave room for the name and the button. */
@media (max-width: 640px) { .lang-current { display: none; } .lang-menu summary { padding-inline: .6rem; } }
.langs { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.1rem; margin: 1.2rem auto; max-width: 40rem; }
.langs a { text-decoration: none; opacity: .75; }
.langs a:hover, .langs a[aria-current] { opacity: 1; text-decoration: underline; text-underline-offset: .3em; }

/* ---------- Pets and travel pages: the same hero, with two memory cards instead of a photo ---------- */
.hero-kicker { display: inline-block; font-size: var(--step--1); font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--brick); border: 1px solid currentColor; border-radius: 999px; padding: .2rem .8rem; margin-bottom: 1.25rem;
  animation: rise .9s var(--ease) both; }
.hero-plain .hero-title span { white-space: normal; }
.hero-cards { position: relative; display: grid; gap: 1.25rem; justify-items: start; padding: 0 0 3rem; }
.hero-cards .memory-card { position: relative; left: auto; bottom: auto; }
.hero-cards .memory-card-2 { justify-self: end; transform: rotate(1.8deg); animation-name: drop2; animation-delay: .9s; }
@keyframes drop2 { from { opacity: 0; transform: translateY(24px) rotate(5deg); } to { opacity: 1; transform: rotate(1.8deg); } }
@media (min-width: 900px) {
  .hero-plain { min-height: min(80vh, 50rem); padding-right: var(--gutter); }
  .hero-cards { padding: 0 2rem 6rem; gap: 2rem; }
  .hero-cards .memory-card { left: auto; bottom: auto; }
}
.foot-pages { margin: 1rem 0 0; }
.foot-pages a { color: var(--paper); text-decoration: none; opacity: .85; }
.foot-pages a:hover { opacity: 1; text-decoration: underline; text-underline-offset: .3em; }

/* ---------- Terms: a short brick band, then a readable column ---------- */
.legal-hero { background: linear-gradient(180deg, var(--paper) 0%, var(--ochre-soft) 100%); color: var(--ink); padding: calc(6rem + env(safe-area-inset-top)) var(--gutter) 2.5rem; }
.legal-hero h1 { font-family: var(--display); font-size: var(--step-3); line-height: 1.2; max-width: 44rem; margin: 0 auto .5rem; }
.legal-updated { color: var(--ink-3); font-size: var(--step--1); max-width: 44rem; margin: 0 auto; }
.legal { max-width: 44rem; margin: 0 auto; padding: 2.5rem var(--gutter) var(--section); line-height: 1.85; color: var(--ink-2); }
.legal-lede { font-size: var(--step-1); color: var(--ink); }
.legal section { padding: 0; margin-top: 2.5rem; scroll-margin-top: 1.5rem; }
.legal h2 { font-family: var(--display); font-size: var(--step-1); color: var(--ink); line-height: 1.4; margin-bottom: .75rem; }
.legal p { margin: 0 0 1rem; }
.legal ul { margin: 0 0 1rem; padding-left: 1.3rem; }
.legal li { margin-bottom: .45rem; }
.legal-toc { background: var(--paper-2); border-radius: 12px; padding: 1.25rem 1.5rem; margin: 2rem 0 0; }
.legal-toc h2 { font-size: var(--step-0); margin-bottom: .5rem; }
.legal-toc ol { list-style: none; margin: 0; padding: 0; columns: 2 14rem; column-gap: 2rem; }
.legal-toc li { margin: 0 0 .3rem; break-inside: avoid; }
.legal a { color: var(--brick); }
