/* ことり灯 — site
   The app's room, on the web: one dark room, one warm light. Type sits in the dark like captions in a gallery;
   no boxes, no outlines. The only colour is the lamp. Single dark theme by choice: this is a bedtime app. */

:root {
  color-scheme: dark;
  --room: #1c1b1a;
  --room-deep: #161514;
  --ink: rgba(244, 239, 232, .9);
  --ink-soft: rgba(244, 239, 232, .64);
  --ink-faint: rgba(244, 239, 232, .4);
  --ink-ghost: rgba(244, 239, 232, .12);
  --lamp: #ffd9a8;
  --lamp-glow: rgba(255, 200, 140, .5);
  --f: "Sawarabi Gothic", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  --f-num: var(--f);
  --slow: cubic-bezier(.33, 0, .2, 1);
  --gutter: max(22px, env(safe-area-inset-left, 0px));
  --measure: 34rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--room);
  color: var(--ink);
  font-family: var(--f);
  font-size: 16px;
  line-height: 1.95;
  letter-spacing: .06em;
  font-feature-settings: "palt" 1;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html[lang="en"] body { letter-spacing: .015em; line-height: 1.75; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
:focus-visible { outline: 1px solid var(--lamp); outline-offset: 4px; border-radius: 2px; }
.ja-keep { word-break: keep-all; overflow-wrap: anywhere; line-break: strict; }

/* fine grain and a soft vignette, as in the app */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 30; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: calc(env(safe-area-inset-top, 0px) + 18px) var(--gutter) 18px;
  background: linear-gradient(180deg, rgba(28, 27, 26, .92) 0%, rgba(28, 27, 26, .78) 70%, rgba(28, 27, 26, 0) 100%);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.mark { display: inline-flex; align-items: center; gap: 11px; font-size: 14px; letter-spacing: .32em; color: var(--ink-soft); white-space: nowrap; }
html[lang="en"] .mark { letter-spacing: .16em; }
.mark i, .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--lamp); box-shadow: 0 0 12px 2px var(--lamp-glow); flex: none; }
.nav { display: flex; align-items: center; gap: 28px; font-size: 13px; letter-spacing: .2em; }
html[lang="en"] .nav { letter-spacing: .08em; }
.nav a { color: var(--ink-faint); transition: color .9s var(--slow); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav .lang { font-family: var(--f-num); letter-spacing: .14em; }
.go { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); letter-spacing: .22em; white-space: nowrap; }
html[lang="en"] .go { letter-spacing: .08em; }
.go::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--lamp); box-shadow: 0 0 14px 3px var(--lamp-glow); transition: transform .9s var(--slow); }
.go:hover::before { transform: scale(1.45); }
.go.soon { color: var(--ink-soft); cursor: default; }
.go.soon:hover::before { transform: none; }
.nav .go { color: var(--ink); }
@media (max-width: 720px) { .nav .hide-s { display: none; } .nav { gap: 20px; } }

/* ---------- hero: the lamp comes on, slowly ---------- */
.hero { position: relative; display: grid; justify-items: center; text-align: center; padding: 18px var(--gutter) 120px; }
.lamp { position: relative; width: min(560px, 100%); aspect-ratio: 900 / 700; margin: 0 auto -8px; }
.lamp img { position: absolute; inset: 0; width: 100%; height: 100%; }
.lamp .lit { opacity: 0; animation: light 6.5s var(--slow) .9s forwards; }
@keyframes light { to { opacity: 1; } }
.hero h1 { margin: 0; font-weight: 400; font-size: clamp(27px, 5.6vw, 46px); line-height: 1.7; letter-spacing: .14em; }
html[lang="en"] .hero h1 { letter-spacing: .01em; line-height: 1.3; font-size: clamp(30px, 6vw, 52px); }
.hero .sub { margin-top: 22px; font-size: 15px; letter-spacing: .2em; color: var(--ink-soft); }
html[lang="en"] .hero .sub { letter-spacing: .06em; }
.hero .go { margin-top: 46px; font-size: 14px; }
.rise { opacity: 0; transform: translateY(10px); filter: blur(4px); animation: rise 2.4s var(--slow) forwards; }
.rise.d1 { animation-delay: 2.6s; } .rise.d2 { animation-delay: 3.4s; } .rise.d3 { animation-delay: 4.2s; }
@keyframes rise { to { opacity: 1; transform: none; filter: blur(0); } }

/* ---------- sections ---------- */
.section { padding: 110px var(--gutter); }
.wrap { width: 100%; max-width: 1040px; margin: 0 auto; }
.eyebrow { display: flex; align-items: center; gap: 12px; font-size: 12px; letter-spacing: .3em; color: var(--ink-faint); margin-bottom: 26px; }
html[lang="en"] .eyebrow { letter-spacing: .16em; text-transform: uppercase; }
h2 { margin: 0; font-weight: 400; font-size: clamp(22px, 3.6vw, 30px); line-height: 1.75; letter-spacing: .12em; }
html[lang="en"] h2 { letter-spacing: .01em; line-height: 1.35; font-size: clamp(26px, 4vw, 36px); }
.lead { margin-top: 26px; max-width: var(--measure); color: var(--ink-soft); }
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.about .lead { margin-top: 0; }
.about .lead p + p { margin-top: 1.2em; }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; gap: 26px; } }

/* features: a numbered caption beside a screen of the app, alternating sides */
.features { display: grid; gap: 130px; margin-top: 80px; }
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 330px); gap: 72px; align-items: center; }
.feature:nth-child(even) { grid-template-columns: minmax(0, 330px) minmax(0, 1fr); }
.feature:nth-child(even) .shot { order: -1; }
.num { font-family: var(--f-num); font-size: 15px; letter-spacing: .18em; color: var(--lamp); }
.feature h3 { margin: 14px 0 0; font-weight: 400; font-size: clamp(20px, 2.8vw, 25px); line-height: 1.75; letter-spacing: .12em; }
html[lang="en"] .feature h3 { letter-spacing: .01em; line-height: 1.4; font-weight: 400; }
.feature p { margin-top: 20px; color: var(--ink-soft); max-width: 27rem; }
.feature .tag-plus { display: inline-block; margin-top: 16px; font-size: 12px; letter-spacing: .14em; color: var(--lamp); }
html[lang="en"] .feature .tag-plus { letter-spacing: .06em; }
/* plans: what is free, what comes with Plus, what can be bought once — words only, no boxes */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; margin-top: 48px; }
.plans h3 { margin: 0; font-weight: 400; font-size: 18px; letter-spacing: .12em; color: var(--ink); }
html[lang="en"] .plans h3 { letter-spacing: .02em; }
.plans .when { margin: 6px 0 0; font-size: 13px; color: var(--lamp); letter-spacing: .08em; }
.plans ul { margin: 18px 0 0; padding: 0; list-style: none; color: var(--ink-soft); font-size: 15px; }
.plans li { padding: 6px 0; border-top: 1px solid var(--ink-ghost); }
.plans .note { grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--ink-faint); }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; gap: 36px; } }
.shot { position: relative; }
.shot::before { /* the screen glows faintly into the room */
  content: ""; position: absolute; inset: 8% -18%; z-index: 0; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 196, 140, .16), rgba(255, 196, 140, .04) 60%, transparent);
  filter: blur(20px);
}
.shot img { position: relative; z-index: 1; width: 100%; border-radius: 34px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7); }
@media (max-width: 760px) {
  .features { gap: 96px; margin-top: 56px; }
  .feature, .feature:nth-child(even) { grid-template-columns: 1fr; gap: 34px; }
  .feature:nth-child(even) .shot { order: 0; }
  .shot { width: min(300px, 78%); margin: 0 auto; }
}

/* a quiet promise about privacy */
.promise { text-align: center; padding: 120px var(--gutter); background: radial-gradient(60% 70% at 50% 50%, rgba(255, 200, 140, .06), transparent 70%); }
.promise h2 { margin-top: 0; }
.promise .lead { margin: 26px auto 0; }

/* questions: only the questions show; the plus at the right opens the answer below. No boxes, no rules. */
.faq { display: grid; gap: 4px; margin-top: 52px; max-width: 46rem; }
.qa summary {
  list-style: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  display: flex; align-items: center; gap: 28px; padding: 20px 0;
  font-size: 17px; line-height: 1.8; letter-spacing: .1em; color: var(--ink-soft);
  transition: color .9s var(--slow);
}
html[lang="en"] .qa summary { letter-spacing: .02em; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary:hover, .qa[open] summary { color: var(--ink); }
.qa .q { flex: 1; min-width: 0; }
html[lang="ja"] .qa .q, html[lang="ja"] .qa .a { word-break: keep-all; overflow-wrap: anywhere; line-break: strict; }
.plus { position: relative; flex: none; width: 15px; height: 15px; color: var(--ink-faint); transition: color .9s var(--slow), transform .9s var(--slow); }
.plus::before, .plus::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; margin-top: -.5px; background: currentColor; border-radius: 1px; transition: transform .9s var(--slow), opacity .9s var(--slow); }
.plus::after { transform: rotate(90deg); }
.qa summary:hover .plus { color: var(--ink-soft); transform: scale(1.12); }
.qa[open] .plus { color: var(--lamp); }
.qa[open] .plus::after { transform: rotate(180deg); opacity: 0; }   /* the plus settles into a minus */
.qa .a { padding: 0 44px 26px 0; color: var(--ink-soft); }
.qa[open] .a { animation: qa-in 1.1s var(--slow); }
@keyframes qa-in { from { opacity: 0; transform: translateY(-6px); filter: blur(3px); } }
/* where the browser can, the answer also opens smoothly instead of jumping */
@supports (interpolate-size: allow-keywords) {
  .faq { interpolate-size: allow-keywords; }
  .qa::details-content { height: 0; overflow: clip; transition: height .7s var(--slow), content-visibility .7s allow-discrete; }
  .qa[open]::details-content { height: auto; }
}

.closing { text-align: center; padding: 140px var(--gutter) 150px; }
.closing .go { margin-top: 40px; font-size: 14px; }

/* ---------- document pages (privacy, support, terms) ---------- */
.doc { padding: 56px var(--gutter) 120px; }
.doc .wrap { max-width: 44rem; }
.doc h1 { margin: 0; font-weight: 400; font-size: clamp(24px, 4vw, 32px); line-height: 1.7; letter-spacing: .14em; }
html[lang="en"] .doc h1 { letter-spacing: .01em; font-size: clamp(28px, 4.6vw, 38px); line-height: 1.3; }
.meta { margin-top: 16px; font-size: 13px; letter-spacing: .1em; color: var(--ink-faint); }
.doc h2 { margin-top: 64px; font-size: 18px; line-height: 1.8; letter-spacing: .12em; display: flex; align-items: baseline; gap: 14px; }
html[lang="en"] .doc h2 { font-size: 20px; font-weight: 400; letter-spacing: .01em; }
.doc h2 .n { font-family: var(--f-num); font-size: 14px; letter-spacing: .12em; color: var(--lamp); }
.doc h2 + p, .doc h2 + ul, .doc h2 + dl { margin-top: 14px; }
.doc p, .doc li, .doc dd { color: var(--ink-soft); }
.doc p + p { margin-top: 1em; }
.doc ul, .doc ol { margin: 0; padding-left: 1.4em; }
.doc p + ol, .doc p + ul, .doc ol + p, .doc ul + p { margin-top: 1em; }
.doc li + li { margin-top: .5em; }
.doc li::marker { color: var(--ink-faint); }
.doc dl { margin: 0; display: grid; gap: 30px; }
.doc dt { color: var(--ink); letter-spacing: .08em; }
.doc dd { margin: 6px 0 0; }
.doc a.text { color: var(--ink); border-bottom: 1px solid var(--ink-ghost); transition: border-color .8s var(--slow); }
.doc a.text:hover { border-color: var(--lamp); }
.contact { margin-top: 26px; display: grid; gap: 8px; }
.contact .addr { font-family: var(--f-num); font-size: 20px; letter-spacing: .06em; color: var(--ink); }
.contact .addr .go { letter-spacing: .06em; }
.blank { color: var(--lamp); } /* fields to fill in before publishing: easy to spot */
.toc { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 13px; letter-spacing: .14em; }
.toc a { color: var(--ink-faint); transition: color .8s var(--slow); }
.toc a:hover { color: var(--ink); }

/* ---------- footer ---------- */
.foot { padding: 70px var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 56px); background: var(--room-deep); }
.foot .wrap { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: end; }
.foot .tag { margin-top: 14px; font-size: 13px; letter-spacing: .16em; color: var(--ink-faint); }
.foot nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px 28px; font-size: 13px; letter-spacing: .14em; }
html[lang="en"] .foot nav, html[lang="en"] .foot .tag { letter-spacing: .05em; }
.foot nav a { color: var(--ink-faint); transition: color .8s var(--slow); }
.foot nav a:hover { color: var(--ink); }
.copy { margin-top: 30px; grid-column: 1 / -1; font-family: var(--f-num); font-size: 12px; letter-spacing: .1em; color: var(--ink-faint); }
@media (max-width: 640px) { .foot .wrap { grid-template-columns: 1fr; } .foot nav { justify-content: flex-start; } }

/* reveal on scroll (set by a few lines of script; content is visible without it) */
.js .reveal { opacity: 0; transform: translateY(14px); filter: blur(3px); transition: opacity 1.6s var(--slow), transform 1.8s var(--slow), filter 1.6s var(--slow); }
.js .reveal.on { opacity: 1; transform: none; filter: blur(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; filter: none; }
}
