/*
 * The only stylesheet of the static site, and the only resource the pages
 * load: the CSP of `_headers` forbids inline styles and third-party
 * requests alike (SETUP §3).
 *
 * Tokens are the design system's (design-system.md §1–§3), transcribed as
 * custom properties. Zen Maru Gothic is the product face but it is *not*
 * fetched: a webfont would mean a third-party request (Google Fonts) or a
 * multi-megabyte Japanese file, so the stack falls back to the rounded
 * gothic every Japanese device already has.
 *
 * The block rules below (h2/h3, p, ul/ol, dl, table, blockquote) exist for
 * text the pages do not have yet: when the owner's 利用規約 and
 * プライバシーポリシー replace the placeholders, they are dropped into
 * `<main>` and are already styled — a content edit, not a redesign.
 */

:root {
  /* The twelve colours of the owner's brand artwork and the shades
     design-system §1 derives from them (decisions D-106/D-107, field-tests
     F-140 in the app and F-142 here): a warm cream ground, white cards,
     chocolate ink, sunshine for what one taps. Every hex below is that
     table's own. */
  --background: #fff8ed;
  --background-tint: #ffead6;
  --surface: #ffffff;
  --ink: #5d311f;
  --ink-secondary: #806454;
  --muted: #947361;
  --border: #e8dcce;
  --divider: #f1eae2;
  --primary: #ffd35c;
  --primary-deep: #5d311f;
  --primary-text: #5d311f;
  --secondary-container: #e8f0e5;
  --tertiary: #ffddc0;
  --warning-container: #ffecdc;
  --warning-text: #5d311f;
  /* The palette's red pair, for the same reason the block rules below
     exist: no page has an error line today, and the one that gains one
     takes the app's deep coral rather than inventing a red. */
  --error: #a5443b;
  --error-container: #ffe8e2;
  --font:
    "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans",
    "Yu Gothic", sans-serif;

  /* The app has no dark theme (design-system §1) and the site does not
     invent one: the browser is told to keep its light rendering. */
  color-scheme: light;
}

/* The site's one gradient: the peach tint fading into the cream ground in
   the top of the page. It was design-system §1's onboarding background, drawn
   here because the app drew it too; the app retired both the gradient and the
   cream at field-tests F-225 — its tabs are white and its pushed screens pale
   grey — and these pages kept the warm ground and the wash over it. Nothing
   in the app matches this any more, so it is the site's own. */
html {
  background: linear-gradient(180deg, var(--background-tint), var(--background))
    no-repeat;
  background-size: 100% 320px;
  background-color: var(--background);
}

body {
  margin: 0 auto;
  padding: 24px 20px 56px;
  max-width: 640px;
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}

/* Header: the lockup — the mark (`img/logo.svg`, the F curl, 40px tall) and
   the wordmark beside it as **text in the page's language** (field-tests
   F-143): 「ファミピクス」 at the root, 「Famipics」 under /en/ and /fr/, so
   one drawing serves the three languages. The image carries an empty `alt`
   on purpose — the name is right there in text, and a mark that repeated it
   would have a screen reader say it twice. It is a link home, and nothing
   else. */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0 24px;
  line-height: 0;
  color: var(--ink);
  text-decoration: none;
}

/* The wordmark's own size is the one the lockup's curves had: the em was
   91.67 units of that drawing's 216-unit height, drawn 40px tall — 17px. The
   brand face is the body stack's first family, and 900 is the weight the
   curves were drawn at. */
.wordmark span {
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.02em;
}

main {
  background: var(--surface);
  border-radius: 18px;
  padding: 24px 20px;
  box-shadow: 0 4px 16px rgb(93 49 31 / 5%);
}

h1 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.5;
}

.updated {
  margin: 0 0 20px;
  /* A date is information a reader reads, not a label: design-system §1
     gives `inkSecondary` "secondary body text, dates" (5.14:1 on the cream)
     and keeps `muted` for labels and section headers (4.07:1). */
  color: var(--ink-secondary);
  font-size: 11px;
  font-weight: 700;
}

/* --- Block styles, for the real text once it lands. --- */

h2 {
  margin: 28px 0 8px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.5;
}

h3 {
  margin: 20px 0 6px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}

p {
  margin: 0 0 14px;
  color: var(--ink-secondary);
}

ul,
ol {
  margin: 0 0 14px;
  padding-left: 1.4em;
  color: var(--ink-secondary);
}

li {
  margin-bottom: 6px;
}

dt {
  font-weight: 700;
}

dd {
  margin: 0 0 12px;
  color: var(--ink-secondary);
}

blockquote {
  margin: 0 0 14px;
  border-left: 3px solid var(--border);
  padding-left: 12px;
  color: var(--ink-secondary);
}

table {
  width: 100%;
  margin-bottom: 14px;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  border-bottom: 1px solid var(--divider);
  padding: 8px 4px;
  text-align: left;
  vertical-align: top;
}

a {
  /* The app's link tint, which since D-106 is the chocolate `ink` itself —
     10.34:1 on the cream, and a tapped word is told from a sentence by its
     700 weight and its underline (design-system §1). */
  color: var(--primary-deep);
  font-weight: 700;
}

/* An image never dictates its own height: the width/height attributes
   give the browser the ratio to reserve, the layout gives the width. */
img {
  max-width: 100%;
  height: auto;
}

/* The header lockup: 40px tall, the width from its ratio. After the
   generic `img` rule so it wins on `height`. */
.wordmark img {
  display: block;
  height: 40px;
  width: auto;
}

/* --- The notice card. Once the じゅんび中 placeholder of the legal pages
   (3.4), now the one attention block a page may carry — a caveat inside a
   legal page. It is drawn in the peach pair: since D-106 the palette does
   have a red, and it names a fault or an act that cannot be undone, which a
   caveat is neither (design-system §1). */
.notice {
  background: var(--warning-container);
  border-radius: 16px;
  padding: 16px 16px 4px;
  color: var(--warning-text);
  font-size: 14px;
  line-height: 1.6;
}

.notice p {
  margin: 0 0 12px;
  color: inherit;
}

.notice strong {
  font-weight: 800;
}

/* --- /i/, the invitation landing page (SETUP §3).

   The App Store button is an `a.store` since field-tests F-40. The Google
   Play button waits on the listing going live (M15): until then it is a
   linkless `span.store.store-pending`, drawn quiet — a button that looks
   tappable but goes nowhere would be worse than an honest 準備中. M15's
   content edit turns it into the same `a.store` shape as the Apple one. --- */

.store {
  display: block;
  margin-top: 12px;
  border-radius: 14px;
  /* Sunshine with a chocolate label, the app's primary button (D-106): the
     pair measures 7.65:1, and white on sunshine — 1.43:1 — is forbidden
     anywhere in the palette (design-system §1). */
  background: var(--primary);
  padding: 14px 16px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.store-pending {
  background: var(--divider);
  /* `--muted` on `--divider` is 2.34:1; `--ink-secondary` clears AA at
     4.55:1 and still reads as an inactive control next to the live sunshine
     button. */
  color: var(--ink-secondary);
}

/* The line under the invitation's buttons: a sentence the reader must
   read, so §1's `inkSecondary` rather than the label taupe. */
.caution {
  margin: 20px 0 0;
  color: var(--ink-secondary);
  font-size: 13px;
}

/* --- Footer --- */

footer {
  padding-top: 24px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

footer a {
  display: inline-block;
  padding: 8px 10px;
}

.dot {
  color: var(--primary);
}

/* --- Header: wordmark on the left, the three languages on the right.
   Every page exists in 日本語, English and Français (SETUP §3); the
   current one is drawn as text, the two others as links. --- */

.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.lang {
  padding: 8px 0 24px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.lang a,
.lang span {
  display: inline-block;
  padding: 4px 6px;
}

.lang span {
  color: var(--ink);
}

/* --- Legal pages --- */

.legal h2 {
  border-top: 1px solid var(--divider);
  padding-top: 20px;
}

.legal .lead {
  color: var(--ink);
  font-weight: 700;
}

/* The one-line word of the translated pages: the English text governs. It
   is a sentence, so `inkSecondary` — design-system §1 again. */
.governing {
  margin: 0 0 20px;
  color: var(--ink-secondary);
  font-size: 12px;
}

/* --- /faq — the questions, and /contact — the mail button (SETUP §3,
   screens §9, decisions D-96). Both pages are the legal shell — the cream
   ground, the white card, the lockup and the three languages — so only the
   accordion rows and the pill are new. Why those rows are `<details>` and
   how they close one another is markup, and `faq.html` says it there. --- */

.legal details {
  border-top: 1px solid var(--divider);
}

.legal details:first-of-type {
  border-top: 0;
}

.legal summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  /* `display: flex` already drops the disclosure triangle; `list-style` and
     the `::-webkit-details-marker` rule below are for the Safari that still
     draws its own. */
  list-style: none;
  cursor: pointer;
  min-height: 52px;
  padding: 6px 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.legal summary::-webkit-details-marker {
  display: none;
}

/* The chevron of the mockup: taupe and pointing down on a closed row,
   chocolate and pointing up on the open one. A rotated square's ink sits
   off its box's centre, so each state carries the nudge that recentres
   it. */
.legal summary::after {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  margin-right: 4px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-3px) rotate(45deg);
}

.legal details[open] summary::after {
  border-color: var(--primary-deep);
  transform: translateY(3px) rotate(-135deg);
}

.legal details p {
  margin: 0 0 16px;
  font-size: 14px;
}

/* The line under the rows, pointing at /contact. */
.more {
  margin: 8px 0 0;
  border-top: 1px solid var(--divider);
  padding-top: 20px;
  font-size: 14px;
}

/* /contact: one sentence, one button, the address (decisions D-19). */
.ask {
  margin: 16px 0 20px;
  color: var(--ink);
}

/* The mail button is the `.store` pill of `/i/`, drawn as a capsule with
   the envelope beside its word. It carries the `.store` class too, so the
   sunshine ground and the chocolate label — the envelope included, it is
   stroked in `currentColor` — are the ones that rule gives above. */
.mail {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 16px;
  font-size: 16px;
}

.mail svg {
  width: 18px;
  height: 18px;
  flex: none;
}

/* The address in plain text, for whoever would rather copy it than let a
   mail app open. */
.address {
  margin: 10px 0 0;
  /* The address is the answer the page exists to give, so `inkSecondary`
     and not the label taupe (design-system §1). */
  color: var(--ink-secondary);
  font-size: 13px;
  text-align: center;
}

/* 特定商取引法に基づく表記 — a two-column table on any width. */
.facts th {
  width: 34%;
  color: var(--ink);
  font-weight: 700;
}

/* --- The landing page (SETUP §3) ---

   One hero and nothing else (owner's call, decisions D-65): a headline, one
   line on the one thing famipics is — the photos locked on the phone, the
   keys the family's — two store buttons, a picture. The languages are a
   dropdown in the header, the legal links the footer. Everything is CSS:
   no script, no webfont, no third-party resource (the CSP of `_headers`);
   the dropdown is a <details>. --- */

.landing {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: none;
  padding: 0;
}

.landing .top {
  width: 100%;
  max-width: 1040px;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 14px 20px 0;
  align-items: center;
}

.landing .wordmark {
  padding: 0;
}

/* The language dropdown: a <details> whose summary is the current
   language, its menu the two others. */
.lang-menu {
  position: relative;
  border: 0;
  padding: 0;
}

.lang-menu summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 30px 6px 14px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  position: relative;
}

.lang-menu summary::-webkit-details-marker {
  display: none;
}

.lang-menu summary::after {
  content: "";
  position: absolute;
  right: 13px;
  top: 10px;
  width: 6px;
  height: 6px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
}

.lang-menu .lang {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 2;
  min-width: 140px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 6px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgb(93 49 31 / 10%);
}

.lang-menu .lang a {
  display: block;
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--ink);
  font-size: 13px;
  text-decoration: none;
}

.lang-menu .lang a:hover {
  background: var(--background);
}

.landing main {
  flex: 1;
  display: flex;
  background: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

/* Hero: the words and the picture side by side when there is room, the
   picture below the words when there is not. */
.hero {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 24px 0 40px;
  text-align: center;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
}

.hero::before {
  top: 110px;
  right: -120px;
  width: 420px;
  height: 420px;
  background: var(--tertiary);
  opacity: 0.45;
}

.hero::after {
  bottom: -160px;
  left: -140px;
  width: 460px;
  height: 460px;
  background: var(--secondary-container);
  opacity: 0.7;
}

.hero .wrap {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
  max-width: 1040px;
  margin: 0 auto;
  padding: 16px 20px 0;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 5.4vw, 48px);
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.hero .tagline {
  margin: 0 auto 28px;
  max-width: 30em;
  color: var(--ink-secondary);
  font-size: clamp(15px, 1.8vw, 18px);
  line-height: 1.8;
}

/* The store buttons: two pills of the same size, the store's glyph
   beside its name. Centred under the words on a phone, left on a
   desktop. */
.stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  height: 52px;
  border-radius: 999px;
  /* The same sunshine pill with the same chocolate label as `.store`
     above. The two providers' glyphs ride the label's colour, so they stay
     the dark marks their guidelines ask for. */
  padding: 0 22px 0 18px;
  background: var(--primary);
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 6px 14px rgb(93 49 31 / 18%);
}

.store-btn svg {
  width: 22px;
  height: 22px;
  flex: none;
}

/* The picture: a dark rounded frame around the (placeholder) screenshot. */
.phone {
  width: min(280px, 70vw);
  margin: 0 auto;
  border-radius: 42px;
  padding: 10px;
  /* The bezel around the picture: the palette's one dark, not a grey of its
     own (design-system §1). */
  background: var(--ink);
  box-shadow: 0 30px 60px rgb(93 49 31 / 22%);
}

.phone img {
  display: block;
  width: 100%;
  border-radius: 34px;
}

@media (min-width: 820px) {
  .hero {
    padding: 48px 0 72px;
    text-align: left;
  }

  .hero .wrap {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 40px;
  }

  .hero .tagline {
    margin-left: 0;
  }

  .stores {
    justify-content: flex-start;
  }

  .phone {
    width: min(320px, 100%);
  }
}

/* Footer of the landing page: the legal links and the name. */
.landing footer {
  padding: 20px 20px 32px;
}

.landing footer .copyright {
  margin-top: 6px;
  font-size: 11px;
}
