/* ohm.software: one stylesheet, no scripts. Fraunces (OFL) for Latin display type,
   Shippori Mincho (OFL) for Japanese display type, system fonts for body text. */
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces.woff") format("woff");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Shippori Mincho";
  src: url("/assets/fonts/shippori-mincho.woff") format("woff");
  font-weight: 600;
  font-display: swap;
}

:root {
  --paper: #f6f2ea;
  --surface: #fffdf9;
  --ink: #1f1d1a;
  --muted: #6b655c;
  --line: #e2dbcf;
  --accent: #b63e30;
  --accent-ink: #ffffff;
  --mark-bg: #1f1d1a;
  --mark-fg: #f6f2ea;
  --shadow: 0 1px 2px rgb(31 29 26 / 6%), 0 12px 32px -12px rgb(31 29 26 / 18%);
  --display: "Fraunces", "New York", ui-serif, Georgia, "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --body: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161513;
    --surface: #201f1c;
    --ink: #ede8df;
    --muted: #a8a196;
    --line: #34312c;
    --accent: #ef8a7b;
    --accent-ink: #1f1d1a;
    --mark-bg: #ede8df;
    --mark-fg: #161513;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 12px 32px -12px rgb(0 0 0 / 60%);
  }
}
:lang(ja) {
  --display: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", "Fraunces", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.65 var(--body);
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; height: auto; }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.narrow { max-width: 720px; margin-inline: auto; width: min(720px, 100% - 40px); }

.skip {
  position: absolute; left: 16px; top: -48px; padding: 8px 14px;
  background: var(--ink); color: var(--paper); border-radius: 8px; z-index: 10;
}
.skip:focus { top: 12px; }

/* Header */
.top { border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 600 19px/1 var(--display); letter-spacing: 0.01em; }
.brand svg { width: 30px; height: 30px; flex: none; }
.nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.nav a { color: var(--ink); text-decoration: none; padding: 8px 0; }
.nav a:hover { color: var(--accent); }
.nav .lang { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; }
@media (max-width: 640px) {
  .nav a:not(.lang) { display: none; }
}

/* Mark */
.mark-bg { fill: var(--mark-bg); }
.mark-fg { stroke: var(--mark-fg); }

/* Hero */
.hero { padding: clamp(56px, 10vw, 120px) 0 clamp(48px, 8vw, 96px); overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 48px; }
.eyebrow { margin: 0 0 18px; color: var(--accent); font-size: 14px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
:lang(ja) .eyebrow { letter-spacing: 0.04em; }
h1 {
  margin: 0; max-width: 12em;
  font: 600 clamp(44px, 7.2vw, 84px)/1.04 var(--display);
  letter-spacing: -0.02em; text-wrap: balance;
}
:lang(ja) h1 { font-size: clamp(38px, 6.2vw, 72px); line-height: 1.2; letter-spacing: 0.02em; word-break: keep-all; }
.lead { margin: 24px 0 32px; max-width: 34em; color: var(--muted); font-size: clamp(18px, 2.1vw, 21px); }
.button {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 12px 22px;
  background: var(--ink); color: var(--paper); border-radius: 999px; text-decoration: none; font-weight: 600;
}
.button:hover { background: var(--accent); color: var(--accent-ink); }
.hero-mark svg { width: clamp(180px, 24vw, 300px); height: auto; display: block; transform: rotate(-6deg); }
.hero-mark .mark-bg { fill: none; }
.hero-mark .mark-fg { stroke: var(--ink); opacity: 0.12; }
@media (max-width: 760px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-mark { display: none; }
}

/* Sections */
.section { padding: clamp(44px, 7vw, 80px) 0; border-top: 1px solid var(--line); }
h2 { margin: 0 0 28px; font: 600 clamp(28px, 3.4vw, 38px)/1.15 var(--display); letter-spacing: -0.01em; }
.section p { margin: 0 0 14px; }

/* Apps */
/* Desktop: the featured (first) app takes a 2×2 block, the next two tiles stack beside it,
   and later tiles flow three to a row. */
.apps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 20px; }
.app {
  display: flex; flex-direction: column; gap: 18px; padding: 28px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow);
}
.app.featured { grid-column: span 2; grid-row: span 2; flex-direction: row; align-items: flex-start; gap: 26px; padding: 32px; }
.app.featured .description { max-width: 36em; }
.app.live .app-body { flex: 1; align-self: stretch; display: flex; flex-direction: column; }
.app.live .app-links { margin-top: auto; padding-top: 18px; }
.app:not(.featured) .icon:not(.icon-soon) { width: 64px; height: 64px; border-radius: 15px; }
.app:not(.featured) h3 { font-size: 24px; }
.icon { width: 96px; height: 96px; border-radius: 22px; flex: none; display: block; box-shadow: 0 1px 2px rgb(0 0 0 / 12%); }
.icon-link { flex: none; display: block; border-radius: 22px; }
.app-body { min-width: 0; }
.app-meta { margin: 0 0 6px !important; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: 0.04em; }
.app h3 { margin: 0; font: 600 30px/1.15 var(--display); }
.app h3 a { color: var(--ink); text-decoration: none; }
.app h3 a:hover { color: var(--accent); }
.tagline { margin: 4px 0 12px !important; color: var(--accent); font-weight: 600; }
.description { color: var(--ink); }
.points { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; font-size: 15px; line-height: 1.5; }
.points li { position: relative; padding-left: 18px; }
.points li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
@media (max-width: 760px) { .points { grid-template-columns: 1fr; } }
.app-links { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 18px; }
.text-link { font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.badge { display: inline-block; line-height: 0; border-radius: 9px; }
.badge img { height: 40px; width: auto; }

.app.soon { background: transparent; border-style: dashed; box-shadow: none; }
.app.soon h3 { font-size: 24px; color: var(--muted); }
.app.soon .description { margin-top: 6px; color: var(--muted); }
.icon-soon { display: grid; place-items: center; width: 64px; height: 64px; border: 1.5px dashed var(--line); border-radius: 18px; box-shadow: none; }
.icon-soon svg { width: 34px; height: 34px; }
.icon-soon .mark-bg { fill: none; }
.icon-soon .mark-fg { stroke: var(--muted); opacity: 0.55; }

@media (max-width: 960px) {
  .apps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app.featured { grid-row: auto; }
}
@media (max-width: 640px) {
  .apps { grid-template-columns: 1fr; }
  .app.featured { grid-column: auto; flex-direction: column; gap: 18px; padding: 24px; }
  .app.featured .icon { width: 80px; height: 80px; border-radius: 18px; }
}

/* Footer */
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.foot-row { display: flex; justify-content: space-between; gap: 16px; padding: 28px 0 36px; }
.foot p { margin: 0; }
.foot a { color: var(--muted); }

/* 404 */
.not-found { padding: clamp(72px, 14vw, 160px) 0; }
.not-found h1 { font-size: clamp(36px, 5vw, 56px); }
.not-found p { color: var(--muted); }
