/* Kanji Road: the colours of the app, its paper, sumi ink, the red pen and the indigo of the road. */

@font-face {
  font-family: "Shippori Mincho";
  src: url("../fonts/ShipporiMincho-Regular-subset.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Shippori Mincho";
  src: url("../fonts/ShipporiMincho-Bold-subset.woff") format("woff");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f3eee3;
  --card: #fbf8f1;
  --ink: #2a2420;
  --muted: #6e645a;
  --faint: #9a8f82;
  --line: #ddd3c2;
  --red: #d9553d;
  --indigo: #22407a;
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mincho: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --measure: 36rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--indigo); text-underline-offset: 0.15em; }
a:hover { color: var(--red); }

:focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; border-radius: 4px; }

.ja { font-family: var(--mincho); }

/* Japanese beside an English heading, the way the app sets 俳句 beside Haiku. */
.gloss {
  font-family: var(--mincho);
  font-weight: 400;
  color: var(--faint);
  font-size: 0.8em;
  margin-left: 0.35em;
  white-space: nowrap;
}

.wrap { max-width: 70rem; margin: 0 auto; padding: 0 1.5rem; }

/* Header */

.site-header { padding: 1.25rem 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1.15rem; }
.brand img { width: 36px; height: 36px; border-radius: 22%; box-shadow: 0 0 0 1px rgb(0 0 0 / 0.06); }
.site-nav { display: flex; gap: 1.25rem; font-size: 1rem; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }

/* Hero */

.hero { padding: 2.5rem 0 4.5rem; }
.hero .wrap { display: grid; grid-template-columns: 1fr 1.15fr; gap: 3.5rem; align-items: center; }
.hero-icon { width: 96px; height: 96px; border-radius: 22%; box-shadow: 0 1px 2px rgb(0 0 0 / 0.08), 0 8px 24px rgb(60 40 20 / 0.12); }
.hero h1 { font-size: clamp(2.6rem, 6vw, 3.6rem); line-height: 1.05; margin: 1.5rem 0 1rem; letter-spacing: -0.01em; }
.lede { font-size: 1.3rem; line-height: 1.5; margin: 0 0 1.75rem; max-width: 30rem; }
.devices { color: var(--muted); font-size: 1rem; margin: 0.9rem 0 0; }

/* A plain App Store button. Swap in Apple's official badge when the app's page is live (see README). */
.store {
  display: inline-flex; flex-direction: column; justify-content: center;
  background: #000; color: #fff; text-decoration: none;
  border-radius: 10px; padding: 0.45rem 1.15rem 0.5rem; min-height: 3.2rem;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif; line-height: 1.1;
}
.store:hover { color: #fff; background: #222; }
.store small { font-size: 0.7rem; letter-spacing: 0.01em; }
.store span { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.01em; }

/* A print shown as a postcard, as on the journey. */
.postcard { margin: 0; }
.postcard .card {
  background: var(--card);
  padding: clamp(0.6rem, 1.4vw, 1rem);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgb(60 40 20 / 0.12), 0 12px 32px rgb(60 40 20 / 0.14);
}
.postcard img { border-radius: 2px; width: 100%; }
.postcard figcaption { margin-top: 0.8rem; font-size: 0.95rem; color: var(--muted); }
.postcard figcaption .ja { color: var(--ink); font-size: 1.15rem; margin-right: 0.35rem; }
.hero .postcard .card { transform: rotate(1.2deg); }

/* Sections */

section { padding: 4rem 0; }
section + section { border-top: 1px solid var(--line); }

h2 { font-size: clamp(1.7rem, 3.5vw, 2.15rem); line-height: 1.2; margin: 0 0 1.1rem; letter-spacing: -0.005em; }
h3 { font-size: 1.25rem; margin: 2rem 0 0.4rem; }
p { margin: 0 0 1.1rem; }
.prose { max-width: var(--measure); }
.muted { color: var(--muted); }

.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 3.5rem; align-items: center; }
.feature.flip > :first-child { order: 2; }

.screen {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 0 0 1px rgb(60 40 20 / 0.08), 0 14px 36px rgb(60 40 20 / 0.16);
}
.screen img { width: 100%; }

/* The prints */

.prints { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem 1.5rem; margin-top: 2.5rem; }
.prints .postcard figcaption { font-size: 0.85rem; margin-top: 0.6rem; }
.prints .postcard figcaption .ja { font-size: 1rem; }

/* Price */

.price { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; margin-top: 2rem; max-width: 54rem; }
.price > div { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1.5rem 1.6rem 0.5rem; }
.price h3 { margin-top: 0; }

.closing { text-align: center; }
.closing .prose { margin: 0 auto 1.75rem; }

/* Plain pages: support, privacy, credits */

.page { padding: 2rem 0 4rem; }
.page h1 { font-size: clamp(2.2rem, 5vw, 2.8rem); line-height: 1.1; margin: 1rem 0 1.5rem; }
.page h2 { font-size: 1.5rem; margin-top: 2.75rem; }
.page .prose { max-width: 40rem; }
.page ul { padding-left: 1.2rem; }
.page li { margin-bottom: 0.5rem; }
.updated { color: var(--muted); font-size: 0.95rem; }

/* Footer */

.site-footer { border-top: 1px solid var(--line); padding: 2rem 0 3rem; font-size: 0.95rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; justify-content: space-between; }
.site-footer nav { display: flex; gap: 1.25rem; }
.site-footer a { color: var(--muted); }
.site-footer p { margin: 0; }

/* Narrow screens: one column, iPhone screenshots in place of the iPad's. */

@media (max-width: 52rem) {
  .hero .wrap, .feature { grid-template-columns: 1fr; gap: 2.25rem; }
  .feature.flip > :first-child { order: 0; }
  .prints { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 1rem; }
  .price { grid-template-columns: 1fr; }
  .screen { max-width: 20rem; margin: 0 auto; border-radius: 28px; }
  .screen.landscape { max-width: none; border-radius: 14px; }
}

@media (max-width: 30rem) {
  body { font-size: 1.0625rem; }
  .wrap { padding: 0 1.1rem; }
  .site-nav { gap: 0.9rem; font-size: 0.95rem; }
  .brand span { display: none; }
  section { padding: 3rem 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero .postcard .card { transition: transform 0.4s ease; }
  .hero .postcard:hover .card { transform: rotate(0deg); }
}
