/* The app's blue (docs/UI-DESIGN.md §2), in the shape of the Yasashii Photo site. */
:root {
  --ground: #f6f9fc;
  --white: #ffffff;
  --line: #dde4ed;
  --pale: #dce8f6;
  --blue: #2f5c99;
  --ink: #26303d;
  --muted: #5e6a78;
  --wisteria: #ece8f6;
  --green: #3a8c6b;
  --serif: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --latin: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Noto Sans JP", "Hiragino Sans", system-ui, sans-serif;
  --gutter: clamp(16px, 5vw, 64px);
  --measure: 1120px;
  --radius: 22px;
}

/* One language at a time: the inline script in <head> and script.js set <html lang>. */
html[lang="ja"] [data-lang="en"], html:not([lang="ja"]) [data-lang="ja"] { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.9;
  letter-spacing: 0.03em;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-weight: 500; }
h1, h2 { font-family: var(--serif); letter-spacing: 0.06em; line-height: 1.5; }
p, figure, ul, ol, dl, dd { margin: 0; }
button { font: inherit; }
a { color: var(--blue); }
/* Each authored line of a heading stays whole. */
.line { white-space: nowrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .4s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); line-height: 1.3; }
.brand-words { display: flex; flex-direction: column; }
/* The app icon keeps the iOS rounded-square silhouette. */
.brand-icon, .cta-icon, .closing-icon { border-radius: 22.5%; box-shadow: 0 6px 18px -8px rgba(38, 48, 61, 0.45); }
.brand-en { font-family: var(--latin); font-size: 17px; letter-spacing: 0.28em; font-weight: 500; }
.brand-ja { font-family: var(--serif); font-size: 12px; letter-spacing: 0.32em; color: var(--muted); }
.header-right { display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); }
.nav { display: flex; gap: clamp(16px, 3vw, 36px); }
.nav a {
  font-family: var(--latin); font-size: 16px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; position: relative; white-space: nowrap;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 2px; height: 1px; background: var(--blue);
  transition: right .4s ease;
}
.nav a:hover::after, .nav a:focus-visible::after { right: 0; }
/* Pearl and lacquer: generated materials (generate_assets.py) under the buttons' text. */
.lang-switch, .rail-arrow {
  border: 1px solid rgba(47, 92, 153, 0.45);
  background: url("images/button-pearl.webp") center / 100% 100% no-repeat, var(--white);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 6px 14px -10px rgba(38, 48, 61, 0.55);
}
.lang-switch {
  color: var(--blue); border-radius: 999px;
  padding: 5px 16px; font-family: var(--sans); font-size: 14px; letter-spacing: 0.06em; cursor: pointer; white-space: nowrap;
}
.lang-switch:hover, .rail-arrow:hover:not(:disabled) { border-color: var(--blue); }
.lang-switch:focus-visible, .cta:focus-visible, .rail-arrow:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

/* Shared */
section { padding: clamp(80px, 11vw, 140px) var(--gutter); position: relative; }
.eyebrow {
  font-family: var(--latin); font-size: 16px; font-weight: 500; letter-spacing: 0.36em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 20px;
}
section > h2, .screens-head h2, .howto-text h2 { font-size: clamp(27px, 3.6vw, 38px); }
.section-lead { max-width: 720px; margin-top: 20px; color: var(--muted); }
.note { margin-top: 20px; color: var(--muted); font-size: 14px; }

/* Buttons for the stores (not live yet: "Coming to") */
.cta-row { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 16px 20px; margin-top: 36px; }
.cta-body { display: flex; flex-direction: column; gap: 10px; flex: 1 1 240px; min-width: 0; }
.cta-stores { display: flex; flex-wrap: wrap; gap: 12px; }
.cta {
  display: inline-flex; align-items: center; justify-content: center; min-height: 54px;
  padding: 12px 28px; border-radius: 999px; color: var(--white);
  background: linear-gradient(rgba(22, 52, 98, 0.12), rgba(22, 52, 98, 0.12)),
    url("images/button-blue.webp") center / 100% 100% no-repeat, var(--blue);
  border: 1px solid rgba(22, 52, 98, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 16px 28px -16px rgba(31, 70, 130, 0.9);
  font-size: 16px; font-weight: 500; letter-spacing: 0.06em; text-decoration: none; text-shadow: 0 1px 1px rgba(10, 30, 60, 0.25);
}
.cta[aria-disabled="true"] { cursor: default; }
.cta-note { color: var(--muted); font-size: 15px; }

/* 1. Hero */
.hero {
  background:
    linear-gradient(100deg, rgba(246, 249, 252, 0.95) 28%, rgba(246, 249, 252, 0.6) 58%, rgba(246, 249, 252, 0.08) 85%),
    url("images/hero.webp") right top / cover no-repeat, var(--ground);
  padding-top: clamp(48px, 7vw, 96px);
  padding-bottom: clamp(48px, 6vw, 88px);
  overflow: hidden;
}
.hero-inner {
  max-width: var(--measure); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(32px, 5vw, 72px); align-items: center;
}
.hero-text { padding-bottom: 0; }
.hero h1 { font-size: clamp(34px, 5.2vw, 56px); line-height: 1.45; color: var(--blue); }
.lead { margin-top: 28px; font-size: clamp(18px, 1.9vw, 20px); line-height: 1.9; }
.hero-sub { margin-top: 16px; color: var(--muted); }
.hero-visual { justify-self: center; width: min(430px, 100%); }
/* Two phones of the generated frame: the check screen behind, the fit screen in front. */
.hero-phones { position: relative; padding-left: 30%; }
.hero-phone { position: relative; z-index: 1; width: 100%; filter: drop-shadow(0 34px 34px rgba(31, 62, 110, 0.3)); }
.hero-phone-back { position: absolute; z-index: 0; left: 0; top: 10%; width: 60%; filter: drop-shadow(0 24px 26px rgba(31, 62, 110, 0.22)); }
.hero-visual figcaption { margin-top: 18px; text-align: center; color: var(--muted); font-size: 14px; }

/* 2. Features */
.features { background: url("images/paper.webp") center / cover, var(--ground); }
.features > *, .screens > * { max-width: var(--measure); margin-left: auto; margin-right: auto; }
.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 48px; }
.feature {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 24px 30px; box-shadow: 0 22px 40px -32px rgba(38, 48, 61, 0.55);
}
/* The generated icons are on white: multiply drops the white on the card. */
.feature-icon { width: 92px; height: 92px; margin: 0 0 4px -10px; mix-blend-mode: multiply; }
.feature-en { font-family: var(--latin); font-size: 15px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--blue); }
.feature h3 { margin: 10px 0 12px; font-size: 19px; line-height: 1.5; }
.feature p:not(.feature-en) { font-size: 16px; line-height: 1.85; color: var(--muted); }

/* The still-life band */
.band { margin: 0; position: relative; }
.band img { width: 100%; height: clamp(260px, 30vw, 440px); object-fit: cover; object-position: 30% 55%; }
/* The right of the still life is empty paper: a line about the print sheets sits there. */
.band-text {
  position: absolute; top: 50%; right: max(var(--gutter), calc((100% - var(--measure)) / 2)); transform: translateY(-50%);
  max-width: 46%; display: flex; flex-direction: column;
}
.band-text .eyebrow { margin-bottom: 12px; }
.band-line { font-family: var(--serif); font-size: clamp(17px, 2vw, 26px); line-height: 1.7; letter-spacing: 0.06em; color: var(--ink); }

/* 3. Screens */
.screens { background: radial-gradient(70% 60% at 50% 0%, rgba(220, 232, 246, 0.9), rgba(220, 232, 246, 0) 70%), var(--white); }
.screens-head { max-width: var(--measure); margin: 0 auto; display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.rail-arrows { display: flex; gap: 10px; }
.rail-arrow { width: 48px; height: 48px; border-radius: 50%; color: var(--blue); font-size: 26px; line-height: 1; cursor: pointer; }
.rail-arrow:disabled { opacity: 0.35; cursor: default; }
.screen-rail {
  list-style: none; padding: 8px 0 16px; margin: 40px auto 0; max-width: var(--measure);
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 28px) / 4); gap: 28px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.screen { scroll-snap-align: start; text-align: center; }
.screen img { width: 86%; margin: 0 auto; filter: drop-shadow(0 24px 24px rgba(31, 62, 110, 0.22)); }
.screen h3 { margin-top: 18px; font-family: var(--serif); font-size: 18px; line-height: 1.6; letter-spacing: 0.04em; color: var(--blue); }
.screen p { margin-top: 6px; font-size: 14px; line-height: 1.75; color: var(--muted); }
.screens .note { max-width: var(--measure); margin-left: auto; margin-right: auto; }

/* 4. How to */
.howto {
  max-width: calc(var(--measure) + 2 * var(--gutter)); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 88px); align-items: start;
}
.howto-figure img { width: 100%; border-radius: var(--radius); }
/* The sample person as a print laid on the page. */
.print-photo img {
  border-radius: 3px; border: 12px solid var(--white); outline: 1px solid var(--line);
  box-shadow: 0 30px 44px -30px rgba(38, 48, 61, 0.6); transform: rotate(-1.2deg);
}
.print-photo figcaption { margin-top: 18px; }
.howto-figure figcaption { margin-top: 12px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.steps { list-style: none; padding: 0; margin-top: 36px; border-top: 1px solid var(--line); }
.steps li {
  display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 8px; padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.steps .num { grid-row: span 2; font-family: var(--latin); font-size: 28px; line-height: 1.2; color: var(--blue); }
.step-title { font-size: 18px; font-weight: 500; }
.step-text { color: var(--muted); font-size: 16px; }
.tips {
  margin-top: 32px; padding: 24px 26px; border-radius: var(--radius); border: 1px solid var(--line);
  background: url("images/paper.webp") center / cover, var(--ground);
}
.tips h3 { font-size: 17px; }
.tips ul { margin-top: 10px; padding: 0; list-style: none; display: grid; gap: 4px; }
.tips li { position: relative; padding-left: 22px; font-size: 16px; }
.tips li::before {
  content: ""; position: absolute; left: 0; top: 0.62em; width: 10px; height: 10px; border-radius: 50%;
  background: var(--pale); border: 1.5px solid var(--blue);
}

/* 5. Purposes */
.purposes { background: url("images/paper.webp") center / cover, var(--ground); }
.purposes > * { max-width: var(--measure); margin-left: auto; margin-right: auto; }
.purposes > .section-lead { margin-top: 20px; }
.purpose-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 40px; }
.purpose {
  background: rgba(255, 255, 255, 0.82); border: 1px solid var(--line); border-radius: var(--radius);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  padding: 22px 24px 20px; box-shadow: 0 12px 28px -26px rgba(38, 48, 61, 0.7);
}
.purpose h3 { font-size: 19px; line-height: 1.5; }
.purpose-size { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 16px; }
.purpose-taken { color: var(--muted); font-size: 15px; }
.purpose-sources { margin-top: 10px; padding: 10px 0 0; border-top: 1px solid var(--line); list-style: none; font-size: 14px; line-height: 1.7; }
.purpose-sources li + li { margin-top: 4px; }
.purpose-sources a { overflow-wrap: anywhere; }
.badge {
  display: inline-block; padding: 1px 12px; border-radius: 999px; font-size: 14px; line-height: 1.8; white-space: nowrap;
  border: 1px solid var(--line); background: var(--white); color: var(--ink);
}
.badge-free { background: var(--pale); border-color: var(--pale); color: var(--blue); }
.badge-check { background: var(--wisteria); border-color: var(--wisteria); color: #4b3f74; }
.modes { margin-top: 40px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 28px; }
.modes dd { margin-top: 10px; font-size: 15px; color: var(--muted); line-height: 1.8; }

/* 6. Before you use it */
.notice { padding-top: clamp(64px, 8vw, 100px); padding-bottom: clamp(64px, 8vw, 100px); }
.notice-card {
  max-width: 860px; margin: 0 auto; padding: clamp(28px, 5vw, 48px);
  border-radius: var(--radius); background: var(--wisteria);
}
.notice-card h2 { font-size: clamp(24px, 3vw, 30px); margin-bottom: 18px; }
.notice-card ul { margin-top: 18px; padding-left: 1.2em; }
.notice-card li { margin-top: 8px; font-size: 16px; }

/* 7. Price */
.price { text-align: center; background: url("images/paper.webp") center / cover, var(--ground); }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 360px)); justify-content: center; gap: 24px; margin-top: 48px; }
.plan {
  text-align: left; padding: 32px 30px 34px; border-radius: var(--radius);
  background: var(--white); border: 1px solid var(--line); box-shadow: 0 22px 40px -32px rgba(38, 48, 61, 0.55);
}
.plan-premium { border-color: rgba(47, 92, 153, 0.5); padding-top: 0; overflow: hidden; }
/* The one-time purchase gets a lacquer band for its name. */
.plan-premium .plan-en {
  margin: 0 -30px 26px; padding: 14px 30px; color: var(--white);
  background: linear-gradient(rgba(22, 52, 98, 0.12), rgba(22, 52, 98, 0.12)), url("images/button-blue.webp") center / 100% 100% no-repeat, var(--blue);
}
.plan-en { font-family: var(--latin); font-size: 16px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--blue); }
.plan-price { margin-top: 6px; font-family: var(--serif); font-size: 44px; line-height: 1.3; }
.plan-price .yen { font-size: 20px; margin-left: 4px; }
.plan-note { color: var(--muted); font-size: 14px; line-height: 1.7; }
.plan ul { margin-top: 18px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.plan li { padding: 12px 0 12px 28px; border-bottom: 1px solid var(--line); position: relative; font-size: 16px; }
.plan li::before {
  content: ""; position: absolute; left: 2px; top: 1.15em; width: 12px; height: 7px;
  border-left: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(-45deg);
}
.price-note { max-width: 760px; margin: 32px auto 0; color: var(--muted); font-size: 15px; }

/* 8. Closing */
.closing {
  text-align: center;
  background: linear-gradient(rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.82)), url("images/hero.webp") right top / cover no-repeat, var(--ground);
}
.closing-icon { width: 96px; height: 96px; margin: 0 auto 28px; }
.closing h2 { font-size: clamp(28px, 4vw, 42px); color: var(--blue); }
.closing .cta-row { justify-content: center; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 48px var(--gutter) 56px; text-align: center; color: var(--muted); font-size: 14px; line-height: 1.8; }
.site-footer .brand-en { color: var(--ink); margin-bottom: 12px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin: 20px 0 12px; }
.footer-links a { color: var(--ink); }

/* Gentle fade-in as sections enter the viewport (only with script, so nothing stays hidden without it). */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 1s ease, transform 1s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 1100px) {
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .screen-rail { grid-auto-columns: calc((100% - 2 * 28px) / 3); }
}
@media (max-width: 860px) {
  .nav { display: none; }
  .modes { grid-template-columns: 1fr; }
  .hero-inner, .howto { grid-template-columns: 1fr; }
  .hero-text { padding-bottom: 0; }
  .hero-visual { width: min(400px, 92vw); margin-top: 24px; }
  .howto-figure { max-width: 420px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .brand-en { font-size: 15px; letter-spacing: 0.22em; }
  .eyebrow { font-size: 14px; letter-spacing: 0.26em; }
  .feature-grid, .plans { grid-template-columns: 1fr; }
  .screen-rail { grid-auto-columns: 62%; gap: 14px; }
  .rail-arrows { display: none; }
  .band img { height: 220px; object-position: 30% 55%; }
  .band-text { position: static; transform: none; max-width: none; padding: 24px var(--gutter) 0; }
  .band-line { font-size: 19px; }
  .cta { padding: 12px 22px; }
}
