/* =========================================================
   CommunAI: site styles
   Colors: navy / gold / blue (from the logo). Motif: ×
   Fonts: Shippori Mincho (headings, numbers) and Noto Sans JP (everything else)
   Themes: dark (default) and light, switched with html[data-theme]
   ========================================================= */

:root {
  /* theme tokens (dark) */
  --bg: #070E1E;
  --bg-2: #060C1A;
  --text: #F4F1E8;
  --text-soft: rgba(244, 241, 232, 0.76);
  --text-muted: rgba(244, 241, 232, 0.58);
  --rule: rgba(244, 241, 232, 0.12);
  --rule-strong: rgba(244, 241, 232, 0.22);
  --line-soft: rgba(244, 241, 232, 0.36);
  --track: rgba(244, 241, 232, 0.08);
  --gold-light: #D9B862;            /* accent for text and lines */
  --nav-bg: rgba(7, 14, 30, 0.72);
  --shade-rgb: 5, 10, 23;
  --stage-bg: radial-gradient(120% 90% at 70% 45%, #13254a 0%, #0a1430 45%, #050a17 100%);
  /* content stays flat navy; only a short fade joins it to the opening */
  --content-bg: linear-gradient(180deg, #050a17 0%, #070E1E 360px);

  /* fixed brand colors */
  --gold: #B08935;
  --btn-bg: #D9B862;
  --btn-bg-hover: #E6C877;
  --btn-fg: #070E1E;

  --serif: 'Shippori Mincho', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --sans: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Yu Gothic', sans-serif;

  --pad-x: clamp(20px, 5.5vw, 96px);
  --block-y: clamp(56px, 7vw, 88px);
  --max: 1120px;
  --nav-h: 76px;
  --radius: 10px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

/* light theme: the colors inverted (cream paper, navy ink, deeper gold) */
html[data-theme="light"] {
  --bg: #F6F4ED;
  --bg-2: #EFEDE4;
  --text: #0E1A33;
  --text-soft: rgba(14, 26, 51, 0.78);
  --text-muted: rgba(14, 26, 51, 0.64);
  --rule: rgba(14, 26, 51, 0.12);
  --rule-strong: rgba(14, 26, 51, 0.24);
  --line-soft: rgba(14, 26, 51, 0.32);
  --track: rgba(14, 26, 51, 0.08);
  --gold-light: #8A6A22;
  --nav-bg: rgba(246, 244, 237, 0.86);
  --shade-rgb: 246, 244, 237;
  --stage-bg: radial-gradient(120% 90% at 70% 45%, #ffffff 0%, #f3f0e6 45%, #e6e1d2 100%);
  --content-bg: linear-gradient(180deg, #E8E4D7 0%, #F6F4ED 360px);
  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: var(--nav-h); background: var(--bg); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  font-feature-settings: "palt" 1;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
em { font-style: normal; }
h1, h2, h3 { font-weight: 700; line-height: 1.4; }
/* Japanese line breaking: keep phrases together, avoid one-character orphans */
h1, h2, h3, p, li, dd { word-break: auto-phrase; text-wrap: pretty; }
h1, h2, .formula__text { text-wrap: balance; }
::selection { background: var(--btn-bg); color: var(--btn-fg); }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; border-radius: 2px; }
body.menu-open { overflow: hidden; }
.nowrap { white-space: nowrap; }

.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 300;
  background: var(--btn-bg); color: var(--btn-fg); padding: 10px 16px; font-weight: 700; text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

.container { max-width: var(--max); margin: 0 auto; }

/* ---------- shared bits ---------- */
.label {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--sans); font-size: 12px; font-weight: 500; letter-spacing: 0.24em;
  color: var(--gold-light); text-transform: uppercase;
}
.label::after { content: ""; width: 32px; height: 1px; background: currentColor; opacity: .5; }
.label span { font-family: var(--serif); font-size: 15px; letter-spacing: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  min-height: 52px; padding: 0 28px;
  font-family: var(--sans); font-size: 15px; font-weight: 700; letter-spacing: 0.06em;
  text-decoration: none; white-space: nowrap;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn__arrow { transition: transform .3s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn--gold { background: var(--btn-bg); color: var(--btn-fg); }
.btn--gold:hover { background: var(--btn-bg-hover); }
.btn--line-light { border: 1px solid var(--line-soft); color: var(--text); }
.btn--line-light:hover { border-color: var(--gold-light); color: var(--gold-light); }

html.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
html.js .reveal.is-in { opacity: 1; transform: none; }

/* =========================================================
   NAV
   ========================================================= */
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--serif); font-weight: 800; font-size: 25px; letter-spacing: -0.01em; color: var(--text); }
.logo__mark { width: 40px; height: 40px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(217, 184, 98, 0.5); }
.logo__word span { color: var(--gold-light); }

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h);
  color: var(--text);
  transition: background-color .35s var(--ease), border-color .35s var(--ease), opacity .8s var(--ease), transform .8s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav__inner { height: 100%; display: flex; align-items: center; gap: 22px; padding: 0 clamp(20px, 4vw, 56px); }
.nav .logo { margin-right: auto; }
.nav__links { display: flex; gap: 30px; }
.nav__link {
  position: relative; text-decoration: none; font-size: 15px; font-weight: 500; letter-spacing: 0.08em;
  opacity: .82; transition: opacity .2s;
}
.nav__link::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--gold-light); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav__link:hover, .nav__link.is-current { opacity: 1; }
.nav__link:hover::after, .nav__link.is-current::after { transform: scaleX(1); }
.nav__cta {
  text-decoration: none; font-size: 15px; font-weight: 700; letter-spacing: 0.08em;
  padding: 12px 24px; background: var(--btn-bg); color: var(--btn-fg);
  transition: background-color .25s;
}
.nav__cta:hover { background: var(--btn-bg-hover); }
.nav__toggle { display: none; width: 48px; height: 48px; position: relative; margin-right: -8px; }
.nav__toggle span { position: absolute; left: 11px; right: 11px; height: 2px; background: currentColor; transition: transform .35s var(--ease), top .35s var(--ease); }
.nav__toggle span:first-child { top: 18px; }
.nav__toggle span:last-child { top: 28px; }
.nav__toggle[aria-expanded="true"] span:first-child { top: 23px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { top: 23px; transform: rotate(-45deg); }
.nav__progress { position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%; background: var(--gold-light); transform-origin: left; transform: scaleX(0); }

.nav.is-scrolled { background: var(--nav-bg); border-bottom-color: var(--rule); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); }
.nav.on-opening,
.nav.on-opening.is-scrolled { background: transparent; border-bottom-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }

html.motion body:not(.is-revealed) .nav { opacity: 0; transform: translateY(-12px); pointer-events: none; }

/* theme switch */
.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  border: 1px solid var(--rule-strong); color: var(--text);
  display: grid; place-items: center;
  transition: border-color .25s, color .25s;
}
.theme-toggle:hover { border-color: var(--gold-light); color: var(--gold-light); }
.theme-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle__moon { display: none; }
html[data-theme="light"] .theme-toggle__sun { display: none; }
html[data-theme="light"] .theme-toggle__moon { display: block; }

.menu {
  position: fixed; inset: 0; z-index: 90; background: var(--bg); color: var(--text);
  padding: calc(var(--nav-h) + 20px) var(--pad-x) 40px;
  display: flex; flex-direction: column; gap: 28px; overflow-y: auto;
}
.menu[hidden] { display: none; }
.menu__links { display: flex; flex-direction: column; }
.menu__links a { padding: 14px 0; border-bottom: 1px solid var(--rule); font-family: var(--serif); font-size: 20px; font-weight: 700; text-decoration: none; }
.menu__cta { align-self: flex-start; }

/* =========================================================
   OPENING (globe → ×)
   ========================================================= */
.opening { position: relative; background: var(--bg); color: var(--text); }
.opening__stage { position: relative; overflow: hidden; background: var(--stage-bg); }
.opening__canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100vh; height: 100svh; touch-action: pan-y; -webkit-tap-highlight-color: transparent; }
.opening__shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(var(--shade-rgb), 0.55) 0%, rgba(var(--shade-rgb), 0) 55%); }

html.motion .opening { height: 250vh; height: 250svh; }
html.motion .opening__stage { position: sticky; top: 0; height: 100vh; height: 100svh; }
html.motion .opening__hero,
html.motion .opening__formula { position: absolute; inset: 0; }

/* hero */
.opening__hero {
  z-index: 2; pointer-events: none;
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--nav-h) + 24px) var(--pad-x) 32px;
  min-height: 100vh; min-height: 100svh;
  opacity: var(--hero-o, 1);
  transform: translate3d(0, var(--hero-y, 0px), 0);
  will-change: opacity, transform;
}
.opening__hero a, .opening__hero button { pointer-events: auto; }
.hero { max-width: min(640px, 46vw); margin-top: auto; }
/* the eyebrow says what CommunAI is (a community), so it is sized to be read at a glance */
.hero__eyebrow {
  display: flex; align-items: flex-start; gap: 12px; line-height: 1.7; text-wrap: balance;
  font-size: clamp(17px, 1.5vw, 24px); font-weight: 500; letter-spacing: 0.08em; color: var(--text);
}
.hero__pulse { margin-top: calc((1.7em - 7px) / 2); width: 7px; height: 7px; border-radius: 50%; background: var(--gold-light); box-shadow: 0 0 0 0 rgba(217, 184, 98, .6); animation: pulse 2.4s var(--ease) infinite; flex: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(217, 184, 98, .55); } 70% { box-shadow: 0 0 0 12px rgba(217, 184, 98, 0); } 100% { box-shadow: 0 0 0 0 rgba(217, 184, 98, 0); } }
.hero__title {
  margin-top: 20px;
  font-family: var(--serif); font-weight: 800;
  font-size: clamp(32px, min(3.9vw, 7.4vh), 80px);
  line-height: 1.16; letter-spacing: -0.02em;
}
.hero__line { display: block; overflow: hidden; padding-bottom: 0.06em; white-space: nowrap; }
.hero__line > span { display: inline-block; }
.hero__title em { color: var(--gold-light); position: relative; }
.hero__title em::after { content: ""; position: absolute; left: 0.04em; right: 0.04em; bottom: 0.02em; height: 2px; background: var(--gold-light); transform-origin: left; transition: transform 1s var(--ease) 1.2s; }
.hero__lead { margin-top: 26px; max-width: 30em; font-size: clamp(15px, 1.15vw, 17px); line-height: 2; color: var(--text-soft); }
.hero__cta { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; }

.hero__foot { margin-top: auto; padding-top: 40px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: min(760px, 47vw); border-top: 1px solid var(--rule); }
.stats__item { padding: 16px 20px 4px 0; }
.stats__item + .stats__item { padding-left: 20px; border-left: 1px solid var(--rule); }
.stats dt { font-size: 11.5px; font-weight: 500; letter-spacing: 0.14em; color: var(--text-muted); }
.stats dd { margin-top: 6px; display: flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.stats__num { font-family: var(--serif); font-size: clamp(24px, 2.4vw, 32px); font-weight: 700; color: var(--text); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.stats__pre, .stats__unit { font-size: 12.5px; color: var(--text-soft); }
.stats__note { margin-top: 10px; font-size: 11px; color: var(--text-muted); letter-spacing: 0.06em; }

/* formula overlay */
.opening__formula { z-index: 3; color: var(--text); }
html.motion .opening__formula { opacity: var(--formula-o, 0); visibility: hidden; pointer-events: none; }
html.motion .opening__formula.is-visible { visibility: visible; pointer-events: auto; }
.formula {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  grid-template-areas: "head head head" "left center right" "result result result";
  padding: calc(var(--nav-h) + 20px) var(--pad-x) clamp(28px, 5vh, 56px);
  max-width: 1440px; margin: 0 auto;
}
.formula__head { grid-area: head; text-align: center; }
.formula__head .label { justify-content: center; }
.formula__title { margin-top: 14px; font-family: var(--serif); font-weight: 800; font-size: clamp(26px, min(3.4vw, 5vh), 46px); letter-spacing: -0.01em; line-height: 1.3; }
.formula__title br { display: none; }
.formula__lead { margin: 12px auto 0; max-width: 40em; font-size: 14.5px; line-height: 1.9; color: var(--text-soft); }
.formula__side { align-self: center; }
.formula__side--left { grid-area: left; justify-self: end; text-align: right; }
.formula__side--right { grid-area: right; justify-self: start; }
.formula__center { grid-area: center; display: flex; align-items: center; justify-content: center; }
.formula__glyph { display: none; font-family: var(--serif); font-weight: 500; font-size: clamp(160px, 22vw, 260px); line-height: 1; color: var(--gold-light); }
.formula__label { font-size: 12px; font-weight: 500; letter-spacing: 0.18em; color: var(--text-muted); margin-bottom: 10px; }
.formula__list { display: flex; flex-direction: column; gap: 4px; }
.formula__item {
  position: relative; padding: 8px 0;
  font-family: var(--serif); font-weight: 700; font-size: clamp(22px, min(2.6vw, 4.2vh), 36px); letter-spacing: 0.02em;
  color: var(--text-muted); transition: color .35s var(--ease);
}
.formula__item::before {
  content: ""; position: absolute; top: 50%; width: 28px; height: 1px; background: var(--gold-light);
  transform: scaleX(0); transition: transform .45s var(--ease);
}
.formula__side--left .formula__item::before { right: calc(100% + 14px); transform-origin: right; }
.formula__side--right .formula__item::before { left: calc(100% + 14px); transform-origin: left; }
.formula__item:hover { color: var(--text); }
.formula__item.is-active { color: var(--gold-light); }
.formula__item.is-active::before { transform: scaleX(1); }
.formula__result { grid-area: result; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.formula__eq { font-family: var(--serif); font-size: 26px; color: var(--text-muted); line-height: 1; }
.formula__pair { font-size: 12.5px; font-weight: 500; letter-spacing: 0.16em; color: var(--gold-light); display: flex; gap: 10px; }
.formula__text { font-family: var(--serif); font-weight: 700; font-size: clamp(18px, 1.9vw, 25px); line-height: 1.5; min-height: 1.5em; }
.formula__text.is-swap { animation: swap .6s var(--ease); }
@keyframes swap { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* loader + UI */
.loader {
  position: absolute; inset: 0; z-index: 5; pointer-events: none;
  display: none; padding: 0 clamp(20px, 4vw, 56px);
}
html.motion:not(.intro-quick) .loader { display: block; }
.loader__brand { height: var(--nav-h); }
.loader__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--track); }
.loader__bar span { display: block; height: 100%; width: 100%; background: var(--gold-light); transform-origin: left; transform: scaleX(0); }
body.is-loaded .loader { animation: loaderOut .7s var(--ease) forwards; }
@keyframes loaderOut { to { opacity: 0; visibility: hidden; } }

.opening__skip {
  position: absolute; right: var(--pad-x); bottom: 28px; z-index: 6;
  font-size: 12px; font-weight: 500; letter-spacing: 0.22em; color: var(--text-soft);
  padding: 10px 0 6px; border-bottom: 1px solid var(--line-soft);
  display: none;
}
body.can-skip .opening__skip,
html.motion:not(.intro-quick) body:not(.is-loaded) .opening__skip { display: block; }
.opening__skip:hover { color: var(--gold-light); border-color: var(--gold-light); }

.opening__cue {
  position: absolute; right: var(--pad-x); bottom: 30px; z-index: 4;
  display: flex; align-items: center; gap: 12px; text-decoration: none;
  font-size: 11px; font-weight: 500; letter-spacing: 0.24em; color: var(--text-muted);
  opacity: var(--hero-o, 1);
}
.opening__cue i { width: 1px; height: 44px; background: var(--rule-strong); position: relative; overflow: hidden; }
.opening__cue i::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--gold-light); animation: cue 2s var(--ease) infinite; }
@keyframes cue { to { top: 100%; } }
body.can-skip .opening__cue { display: none; }

/* intro choreography (motion only) */
html.motion [data-intro] { transition: opacity 1s var(--ease), transform 1.1s var(--ease-out); }
html.motion body:not(.is-revealed) [data-intro] { opacity: 0; transform: translateY(18px); }
html.motion .hero__line[data-intro] { transform: none; opacity: 1; }
html.motion .hero__line > span { transition: transform 1.25s var(--ease-out); }
html.motion body:not(.is-revealed) .hero__line > span { transform: translateY(110%); }
html.motion body:not(.is-revealed) .hero__title em::after { transform: scaleX(0); }
html.motion body.is-revealed [data-intro="2"] > span { transition-delay: .08s; }
html.motion body.is-revealed [data-intro="3"] > span { transition-delay: .2s; }
html.motion body.is-revealed [data-intro="4"] { transition-delay: .45s; }
html.motion body.is-revealed [data-intro="5"] { transition-delay: .6s; }
html.motion body.is-revealed [data-intro="6"] { transition-delay: .8s; }
html.motion body:not(.is-revealed) .opening__cue { opacity: 0; }

/* static opening: reduced motion, no WebGL, no JS */
html:not(.motion) .opening__formula { position: relative; z-index: 2; padding: 24px 0 40px; }
html:not(.motion) .formula { height: auto; padding-top: 24px; }
html:not(.motion) .formula__glyph { display: block; }
html:not(.motion) .opening__skip,
html:not(.motion) .loader { display: none; }

/* =========================================================
   CONTENT: one continuous, compact page
   ========================================================= */
.content { position: relative; background: var(--content-bg); }
.block { padding: var(--block-y) var(--pad-x) 0; }
.block:last-child { padding-bottom: var(--block-y); }

.block__head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px clamp(28px, 5vw, 72px); align-items: end;
  margin-bottom: clamp(24px, 3vw, 36px);
}
.block__title { margin-top: 12px; font-family: var(--serif); font-weight: 800; font-size: clamp(22px, 2.3vw, 30px); line-height: 1.35; letter-spacing: 0; }
/* section headings are the plain English label (ABOUT, MEMBERS, ...) */
.block__title--en { margin-top: 0; font-weight: 700; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.2; letter-spacing: 0.12em; }
.block__lead { font-size: clamp(16px, 1.3vw, 18.5px); line-height: 1.95; color: var(--text-soft); max-width: 32em; }
.note { margin-top: 6px; font-size: 13px; color: var(--text-muted); }

/* small section labels: muted, no color accents */
.kicker { display: flex; align-items: baseline; gap: 10px; font-family: var(--sans); font-size: 14px; font-weight: 500; letter-spacing: 0.06em; color: var(--text-muted); }
.kicker span { font-size: 11.5px; font-weight: 700; letter-spacing: 0.2em; }
.sub { font-family: var(--sans); font-size: 14px; font-weight: 700; letter-spacing: 0.12em; color: var(--text-muted); }

/* about: three ruled rows instead of cards */
.rows { border-top: 1px solid var(--rule-strong); }
.rows__item {
  display: grid; grid-template-columns: 3.2em minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 6px clamp(18px, 3vw, 44px); align-items: baseline;
  padding: clamp(18px, 2.4vw, 28px) 0; border-bottom: 1px solid var(--rule);
}
.rows__no { font-family: var(--serif); font-size: 14px; font-weight: 700; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.rows__title { font-family: var(--serif); font-weight: 700; font-size: clamp(20px, 2.2vw, 28px); line-height: 1.45; }
.rows__title span { display: block; margin-top: 4px; font-size: 0.7em; font-weight: 500; color: var(--text-muted); }
.rows__text { font-size: 16px; line-height: 1.9; color: var(--text-soft); }

.statement { margin-top: clamp(28px, 4vw, 44px); font-family: var(--serif); font-weight: 700; font-size: clamp(18px, 1.8vw, 23px); line-height: 1.8; max-width: 42em; }
.mission {
  margin-top: clamp(28px, 4vw, 44px); padding: clamp(32px, 4.5vw, 56px) 0;
  border-top: 1px solid var(--gold-light); border-bottom: 1px solid var(--rule-strong);
  text-align: center;
}
.mission__label { font-size: clamp(13px, 1.1vw, 15px); font-weight: 700; letter-spacing: 0.32em; color: var(--gold-light); }
.mission__title { margin-top: 14px; font-family: var(--serif); font-weight: 800; font-size: clamp(25px, 3.1vw, 42px); line-height: 1.45; text-wrap: balance; }
.mission__title em { color: var(--gold-light); }
.mission__text { margin: 18px auto 0; max-width: 34em; font-size: clamp(16px, 1.35vw, 18.5px); line-height: 1.95; color: var(--text-soft); text-wrap: balance; }

/* members: two ruled columns, fields as plain text */
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px clamp(28px, 5vw, 72px); }
.duo__col { border-top: 1px solid var(--rule-strong); padding-top: 16px; }
.duo__note { margin-top: 12px; font-size: 14px; color: var(--text-muted); }
/* fields: groups (dt) with their items (dd) */
.fields { margin-top: 6px; }
.fields__group { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 2px 16px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.fields dt { font-size: 13.5px; font-weight: 700; letter-spacing: 0.06em; color: var(--text-muted); }
.fields ul { display: flex; flex-wrap: wrap; row-gap: 2px; font-family: var(--serif); font-weight: 700; font-size: clamp(16px, 1.55vw, 19px); line-height: 1.7; }
.fields li:not(:last-child)::after { content: "／"; margin: 0 0.45em; font-weight: 400; color: var(--text-muted); }
.checks { margin-top: 6px; }
.checks li { position: relative; padding: 11px 0 11px 26px; font-size: 17px; line-height: 1.7; border-bottom: 1px solid var(--rule); }
.checks li::before { content: "×"; position: absolute; left: 2px; top: 10px; font-family: var(--serif); color: var(--gold-light); }

/* activities: daily list on the left, the two big items on the right */
.acts {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px clamp(28px, 5vw, 72px);
  border-top: 1px solid var(--rule-strong); padding-top: 18px;
}
.acts__list { margin-top: 6px; }
.acts__row { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 4px 20px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.acts__row dt { font-family: var(--serif); font-weight: 700; font-size: 17px; line-height: 1.6; }
.acts__row dd { font-size: 15.5px; line-height: 1.85; color: var(--text-soft); }
.acts__feature + .acts__feature { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--rule); }
.acts__big { margin-top: 6px; font-family: var(--serif); font-weight: 800; font-size: clamp(24px, 2.5vw, 32px); line-height: 1.35; }
.acts__text { margin-top: 8px; font-size: 16px; line-height: 1.9; color: var(--text-soft); }
.acts__link { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 500; color: var(--gold-light); text-decoration: none; border-bottom: 1px solid currentColor; }
.acts__link span { margin-left: 4px; }
.acts__link:hover { opacity: .8; }
.results { margin-top: 8px; }
.results__item + .results__item { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--rule); }
.results__title { font-family: var(--serif); font-weight: 800; font-size: clamp(19px, 1.8vw, 23px); line-height: 1.45; }
.results__meta { margin-top: 4px; font-size: 15.5px; line-height: 1.8; color: var(--text-soft); }

/* a real Commu News issue as a sample */
.sample {
  margin-top: clamp(32px, 4.5vw, 52px); border-top: 1px solid var(--rule-strong); padding-top: 18px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 20px clamp(28px, 5vw, 72px); align-items: start;
}
.sample__title { margin-top: 6px; font-family: var(--serif); font-weight: 800; font-size: clamp(20px, 2vw, 26px); line-height: 1.4; }
.sample__text { margin-top: 8px; font-size: 16px; line-height: 1.9; color: var(--text-soft); }
.sample__frame { display: block; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--rule-strong); background: #FBF8F1; }
.sample__frame img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

.plans { margin-top: clamp(32px, 4.5vw, 52px); border-top: 1px solid var(--rule-strong); padding-top: 18px; }
.plans__list { margin-top: 4px; }
.plans__list li { display: grid; grid-template-columns: 13em 5.5em minmax(0, 1fr); gap: 2px 18px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.plans__name { font-family: var(--serif); font-weight: 700; font-size: 17px; }
.plans__status { font-size: 13px; letter-spacing: 0.06em; color: var(--text-muted); }
.plans__text { font-size: 15.5px; line-height: 1.85; color: var(--text-soft); }

/* news + faq: heading on the left, list on the right */
.side-wrap { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.8fr); gap: 16px clamp(28px, 5vw, 72px); align-items: start; }
.news { border-top: 1px solid var(--rule-strong); }
.news__item { display: grid; grid-template-columns: 6.5em auto minmax(0, 1fr); gap: 6px 18px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.news__date { font-size: 14px; color: var(--text-muted); font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.news__cat { justify-self: start; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; padding: 1px 10px; border-radius: 999px; border: 1px solid var(--rule-strong); color: var(--text-soft); white-space: nowrap; }
/* no proportional punctuation here, so the closing ！ keeps its full width */
.news__title { font-size: 16px; line-height: 1.7; color: var(--text); text-decoration: none; font-feature-settings: normal; }
a.news__title:hover { color: var(--gold-light); }
.news__ext { margin-left: 6px; font-size: 12px; color: var(--text-muted); }

.faq { border-top: 1px solid var(--rule-strong); }
.faq__item { border-bottom: 1px solid var(--rule); }
.faq__item summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 28px 1fr 22px; gap: 10px; align-items: center; padding: 16px 0; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__q { font-family: var(--serif); font-size: 16px; font-weight: 700; color: var(--text-muted); }
.faq__text { font-family: var(--serif); font-weight: 700; font-size: 17.5px; line-height: 1.6; transition: color .25s; }
.faq__icon { position: relative; width: 14px; height: 14px; justify-self: end; }
.faq__icon::before, .faq__icon::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; margin-top: -0.75px; background: var(--text-muted); transition: transform .35s var(--ease), background-color .35s; }
.faq__icon::after { transform: rotate(90deg); }
.faq__item[open] .faq__icon::after { transform: rotate(0deg); }
.faq__item[open] .faq__icon::before, .faq__item[open] .faq__icon::after { background: var(--gold-light); }
.faq__item summary:hover .faq__text { color: var(--gold-light); }
.faq__a { padding: 0 32px 18px 38px; }
.faq__a p { font-size: 16px; color: var(--text-soft); }
.faq__a a { color: var(--gold-light); }
.faq__item[open] .faq__a { animation: swap .5s var(--ease); }

/* contact */
.cta {
  text-align: center;
  border-top: 1px solid var(--rule-strong);
  padding: clamp(36px, 5vw, 56px) 0 0;
}
.cta__lead { margin: 14px auto 0; max-width: 32em; color: var(--text-soft); font-size: 16.5px; }
.cta__also { margin-top: 10px; font-size: 16.5px; font-weight: 700; color: var(--text); }
.cta__buttons { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.cta__steps { margin-top: 22px; display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 26px; font-size: 14.5px; color: var(--text-soft); }
.cta__steps li { display: flex; align-items: center; gap: 10px; }
.cta__steps li + li::before { content: "→"; color: var(--text-muted); margin-right: 16px; }
.cta__steps span { font-family: var(--serif); font-weight: 700; color: var(--text-muted); }

/* footer */
.footer { background: var(--bg-2); color: var(--text); padding: 44px var(--pad-x) 30px; border-top: 1px solid var(--rule); }
.footer__top { display: flex; justify-content: space-between; gap: 28px 48px; flex-wrap: wrap; padding-bottom: 28px; border-bottom: 1px solid var(--rule); }
.logo--footer { font-size: 22px; }
.logo--footer .logo__mark { width: 38px; height: 38px; }
.footer__tag { margin-top: 12px; font-size: 13px; color: var(--text-muted); line-height: 1.9; }
.footer__links { display: grid; grid-template-columns: repeat(2, auto); gap: 8px 40px; align-content: start; }
.footer__links a, .footer__social a { font-size: 13.5px; color: var(--text-soft); text-decoration: none; transition: color .2s; }
.footer__links a:hover, .footer__social a:hover { color: var(--gold-light); }
.footer__social { display: flex; flex-direction: column; gap: 8px; }
.footer__social span { display: inline-block; min-width: 5.5em; font-size: 11.5px; letter-spacing: 0.1em; color: var(--text-muted); }
.footer__bottom { padding-top: 18px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 11.5px; letter-spacing: 0.06em; color: var(--text-muted); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
  .nav__links { gap: 20px; }
}

/* the hero switches to "globe on top" when the screen is narrow or tall */
@media (max-width: 899px), (max-aspect-ratio: 21/20) {
  .opening__shade { background: linear-gradient(180deg, rgba(var(--shade-rgb), 0) 36%, rgba(var(--shade-rgb), 0.78) 62%, rgba(var(--shade-rgb), 0.93) 100%); }
  .opening__hero { justify-content: flex-end; padding-bottom: max(20px, env(safe-area-inset-bottom)); }
  .hero { max-width: 640px; margin-top: auto; }
  /* on phones the eyebrow can sit over the globe's lower edge: a soft halo keeps it readable */
  .hero__eyebrow { font-size: 15px; letter-spacing: 0.02em; gap: 10px; text-shadow: 0 0 14px rgba(var(--shade-rgb), 0.95), 0 0 4px rgba(var(--shade-rgb), 0.9); }
  .hero__title { font-size: clamp(28px, min(8.4vw, 5.2vh), 68px); margin-top: 12px; }
  .hero__lead { margin-top: 14px; font-size: 14px; line-height: 1.85; }
  .hero__cta { margin-top: 20px; flex-wrap: nowrap; }
  .hero__cta .btn { flex: 1 1 0; min-height: 48px; padding: 0 12px; gap: 8px; font-size: 13.5px; }
  .hero__foot { margin-top: 0; padding-top: 22px; }
  .stats { max-width: none; }
  .stats__item { padding: 10px 6px 0 0; }
  .stats__item + .stats__item { padding-left: 10px; }
  .stats dt { font-size: 9.5px; letter-spacing: 0.08em; }
  .stats dd { margin-top: 4px; gap: 3px; }
  .stats__num { font-size: clamp(17px, 4.8vw, 26px); }
  .stats__pre, .stats__unit { font-size: 10px; }
  .stats__note { margin-top: 8px; font-size: 10px; }
  .opening__cue { display: none; }

  .formula {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    grid-template-areas: "head head" "center center" "left right" "result result";
    row-gap: 10px;
    padding-top: calc(var(--nav-h) + 8px);
  }
  .formula__title { font-size: clamp(21px, 5.8vw, 32px); margin-top: 10px; }
  .formula__lead { display: none; }
  .formula__center { min-height: 22vh; }
  .formula__side--left, .formula__side--right { justify-self: stretch; text-align: center; align-self: start; }
  .formula__item { font-size: clamp(19px, 5vw, 26px); padding: 4px 0; }
  .formula__item::before { display: none; }
  .formula__item.is-active { text-decoration: underline; text-decoration-color: var(--gold-light); text-underline-offset: 8px; text-decoration-thickness: 1px; }
  .formula__label { margin-bottom: 4px; }
  .formula__text { font-size: clamp(16px, 4.4vw, 21px); }
}

@media (max-width: 899px) {
  :root { --nav-h: 68px; }
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: block; }
  .block__head { grid-template-columns: 1fr; align-items: start; gap: 10px; }
  .rows__item { grid-template-columns: 2.4em minmax(0, 1fr); }
  .rows__text { grid-column: 2; }
  .duo { grid-template-columns: 1fr; }
  .acts { grid-template-columns: 1fr; }
  .sample { grid-template-columns: 1fr; }
  .sample__frame { aspect-ratio: 1 / 1; }
  .side-wrap { grid-template-columns: 1fr; }
}

/* very narrow phones (320px class): one CTA, smaller eyebrow */
@media (max-width: 359px) {
  .hero__eyebrow { font-size: 13.5px; letter-spacing: 0; gap: 8px; }
  .hero__cta .btn--line-light { display: none; }
  .nav__inner { gap: 12px; }
}
@media (min-width: 600px) and (max-width: 899px) {
  .hero__cta .btn { max-width: 260px; }
}

/* phones with little height: keep the lead and tighten the spacing, so the
   globe, copy and buttons all fit (the globe shrinks to the space left) */
@media (max-width: 899px) and (max-height: 780px) {
  .hero__title { margin-top: 10px; }
  .hero__lead { margin-top: 10px; font-size: 13px; line-height: 1.75; }
  .hero__cta { margin-top: 14px; }
  .hero__foot { padding-top: 14px; }
}
/* very short phones (iPhone SE class): the copy starts higher, so the shade does too */
@media (max-width: 899px) and (max-height: 620px) {
  .opening__shade { background: linear-gradient(180deg, rgba(var(--shade-rgb), 0) 16%, rgba(var(--shade-rgb), 0.8) 36%, rgba(var(--shade-rgb), 0.94) 100%); }
}

@media (max-width: 600px) {
  body { font-size: 15px; }
  :root { --block-y: 52px; }
  .logo { font-size: 22px; }
  .logo__mark { width: 34px; height: 34px; }
  .theme-toggle { width: 38px; height: 38px; }
  .acts__row { grid-template-columns: 1fr; gap: 2px; }
  .fields__group { grid-template-columns: 1fr; }
  .plans__list li { grid-template-columns: auto 1fr; }
  .plans__text { grid-column: 1 / -1; }
  .news__item { grid-template-columns: auto 1fr; }
  .news__title { grid-column: 1 / -1; }
  .faq__a { padding: 0 8px 16px 38px; }
  .cta__buttons .btn { width: 100%; }
  .cta__steps { flex-direction: column; align-items: center; gap: 4px; }
  .cta__steps li + li::before { display: none; }
  .footer__links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; }
}

/* short screens (landscape phones) */
@media (max-height: 520px) and (min-aspect-ratio: 21/20) {
  .hero__title { font-size: clamp(30px, 9vh, 56px); margin-top: 12px; }
  .hero__lead { display: none; }
  .hero__foot { display: none; }
  .formula__lead { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html.js .reveal { opacity: 1; transform: none; }
}
