/* AI Futures Japan — shared styles for index.html and privacy.html.
   Colours are sampled from the hero art and logo: navy headline, logo red, lavender form card. */

:root {
  --paper: #FAF8F6;      /* hero paper; page background blends into the image edges */
  --white: #FFFFFF;
  --ink: #1A1A1A;
  --navy: #0B1F3A;       /* headline navy */
  --brand: #053360;      /* logo navy */
  --red: #D3302C;        /* logo red */
  --red-dark: #B02520;
  --lav: #E6E0F1;        /* form card */
  --lav-line: #CFC6E2;
  --muted: #565C6B;
  --line: rgba(11, 31, 58, .14);
  --focus: rgba(5, 51, 96, .22);
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", YuGothic, Meiryo, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: .02em;
  line-break: strict;
  overflow-wrap: break-word;
}
html[lang="en"] body { line-height: 1.65; letter-spacing: 0; }

/* One page carries both languages; the <html lang> decides which is shown. */
html[lang="ja"] body [lang="en"],
html[lang="en"] body [lang="ja"] { display: none !important; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: .18em; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 860px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 248, 246, .88);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  transition: box-shadow .2s;
}
.topbar.scrolled { box-shadow: 0 1px 0 var(--line), 0 6px 20px -12px rgba(11, 31, 58, .25); }
.topbar .in {
  max-width: 1600px; margin: 0 auto; height: 56px;
  padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 12px;
}
.topbar .brand { display: flex; align-items: center; margin-right: auto; }
.topbar .brand img { height: 26px; width: auto; }
.status {
  display: inline-flex; align-items: center; gap: 8px; margin-right: auto;
  font-size: 13px; font-weight: 700; color: var(--navy); letter-spacing: .06em;
}
.status::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red);
  box-shadow: 0 0 0 4px rgba(211, 48, 44, .15);
}
.lang {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--white); border: 1px solid var(--line); border-radius: 999px;
}
.lang button {
  font: inherit; font-size: 13px; font-weight: 700; letter-spacing: .02em;
  border: 0; background: transparent; color: var(--muted);
  padding: 4px 12px; border-radius: 999px; cursor: pointer; line-height: 1.6;
}
.lang button[aria-pressed="true"] { background: var(--navy); color: var(--white); }
.btn-sm {
  display: inline-flex; align-items: center; height: 36px; padding: 0 16px;
  background: var(--red); color: var(--white); border-radius: 999px;
  font-size: 13.5px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.btn-sm:hover { background: var(--red-dark); color: var(--white); }

/* ---------- Hero ---------- */
.hero { max-width: 1600px; margin: 0 auto; }
.hero img { width: 100%; }

/* ---------- Sign-up ---------- */
.signup { position: relative; z-index: 2; padding: 0 0 clamp(56px, 8vw, 96px); }
.signup .wrap { max-width: 1240px; }
.card {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  grid-template-areas: "intro covers" "form form" "done done";
  gap: 0 clamp(24px, 4vw, 56px);
  align-items: start;
  margin-top: clamp(20px, 3vw, 36px);
  padding: clamp(24px, 4vw, 48px);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, .55), transparent 60%),
    var(--lav);
  border: 1px solid var(--lav-line);
  border-radius: 24px;
}
.covers {
  position: relative; z-index: 3;
  width: 100%; max-width: 640px; aspect-ratio: 1 / 1.1;
  justify-self: center;
  margin-top: calc(-1 * clamp(140px, 22vw, 340px));   /* rise into the hero, as on the slide */
  grid-area: covers;
}
.intro { grid-area: intro; align-self: center; }
#signup-form { grid-area: form; }
.success { grid-area: done; }
.cover {
  position: absolute; width: 72%;
  border-radius: 6px; background: var(--white);
  box-shadow: 0 28px 50px -18px rgba(11, 31, 58, .45), 0 2px 6px rgba(11, 31, 58, .14);
  transition: transform .45s cubic-bezier(.2, .7, .2, 1), z-index 0s .2s;
}
.cover-en { left: 0; top: 1%; transform: rotate(-4deg); z-index: 1; }
.cover-ja { right: 0; top: 7%; transform: rotate(3deg); z-index: 1; }
html[lang="ja"] .cover-ja, html[lang="en"] .cover-en { z-index: 2; }
html[lang="en"] .cover-en { transform: rotate(-2deg) translateY(-6px); }
html[lang="ja"] .cover-ja { transform: rotate(2deg) translateY(-6px); }
.free-badge {
  --size: clamp(72px, 8vw, 108px);
  position: absolute; z-index: 4; right: -1%; top: 2%;
  width: var(--size); aspect-ratio: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--red); color: var(--white);
  font-size: clamp(18px, 2vw, 27px); font-weight: 900; line-height: 1.05; letter-spacing: .04em;
  transform: rotate(10deg);
  box-shadow: 0 12px 24px -10px rgba(176, 37, 32, .8), inset 0 0 0 3px rgba(255, 255, 255, .35);
}
html[lang="en"] .free-badge { right: calc(28% - var(--size) * .55); top: -3%; }   /* on the English cover, now in front */
.free-badge small { font-size: .42em; font-weight: 700; letter-spacing: .16em; margin-top: 2px; }

.eyebrow {
  display: inline-block; margin: 0 0 14px;
  padding: 3px 12px; border-radius: 999px;
  background: var(--red); color: var(--white);
  font-size: 12.5px; font-weight: 700; letter-spacing: .1em;
}
.signup h2 { margin: 0; color: var(--navy); font-feature-settings: "palt"; word-break: auto-phrase; }
.signup h2 .book { display: block; font-size: clamp(26px, 2.7vw, 34px); font-weight: 900; line-height: 1.3; }
.signup h2 .book-sub { display: block; margin-top: 6px; font-size: clamp(16px, 1.6vw, 20px); font-weight: 700; line-height: 1.45; color: var(--brand); }
html[lang="en"] .signup h2 .book { font-weight: 800; letter-spacing: -.015em; line-height: 1.15; }
.pitch { margin: 16px 0 0; font-size: 15.5px; line-height: 1.85; color: #333A48; }
html[lang="en"] .pitch { line-height: 1.6; }
.bonus { margin: 12px 0 0; font-size: 14.5px; font-weight: 700; color: var(--navy); line-height: 1.6; }
.bonus::before { content: "＋"; color: var(--red); margin-right: .3em; }

form { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--lav-line); }
.req-note { margin: 0 0 10px; font-size: 12.5px; color: var(--muted); }
.req { color: var(--red); font-weight: 700; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
@media (min-width: 1100px) { .fields { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.field label, .fieldset-label {
  display: block; margin-bottom: 5px;
  font-size: 13.5px; font-weight: 700; color: var(--navy); letter-spacing: .03em;
}
.opt { font-weight: 500; color: var(--muted); font-size: 12px; margin-left: 4px; }
input[type="text"], input[type="email"], input[type="tel"] {
  width: 100%; height: 48px; padding: 0 14px;
  font: inherit; font-size: 16px; letter-spacing: .01em; color: var(--ink);
  background: var(--white);
  border: 1.5px solid rgba(0, 32, 96, .38); border-radius: 10px;
  transition: border-color .15s, box-shadow .15s;
}
input:hover { border-color: rgba(0, 32, 96, .6); }
input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--focus); }
input[aria-invalid="true"] { border-color: var(--red); }
.err { min-height: 0; margin: 4px 0 0; font-size: 12.5px; font-weight: 500; color: var(--red-dark); line-height: 1.5; }
.err:empty { display: none; }


.privacy-box {
  margin: 20px 0 0; padding: 14px 16px;
  background: rgba(255, 255, 255, .7); border: 1px solid var(--lav-line); border-radius: 12px;
  font-size: 12.5px; line-height: 1.75; color: #3B4150;
}
.privacy-box strong { display: block; color: var(--navy); font-size: 13px; margin-bottom: 2px; }
.privacy-box p { margin: 0; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0; font-size: 14px; line-height: 1.65; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--brand); }

.actions { margin-top: 20px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 28px;
  font: inherit; font-size: 16px; font-weight: 700; letter-spacing: .04em;
  color: var(--white); background: var(--red);
  border: 0; border-radius: 12px; cursor: pointer; text-decoration: none;
  box-shadow: 0 10px 24px -12px rgba(211, 48, 44, .8);
  transition: background .15s, transform .15s;
}
.btn:hover { background: var(--red-dark); color: var(--white); }
.btn:active { transform: translateY(1px); }
.btn[aria-busy="true"] { opacity: .7; cursor: progress; }
.btn .arrow { transition: transform .15s; }
.btn:hover .arrow { transform: translateX(3px); }
.form-status { margin: 12px 0 0; font-size: 14px; font-weight: 500; color: var(--red-dark); }
.form-status:empty { display: none; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.success { margin-top: 24px; padding: 24px; background: var(--white); border-radius: 16px; border: 1px solid var(--lav-line); }
.success h3 { margin: 0 0 6px; font-size: 20px; color: var(--navy); }
.success p { margin: 0; }
.success .email { font-weight: 700; color: var(--brand); word-break: break-all; }
.success:focus { outline: none; }
.success .next { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 20px; }
.success .next[hidden] { display: none; }
.success .count { font-size: 14px; color: var(--muted); }

/* ---------- About ---------- */
.about { background: var(--white); padding: clamp(56px, 9vw, 112px) 0; border-top: 1px solid var(--line); }
.about .logo { width: min(340px, 72%); margin: 0 0 clamp(28px, 4vw, 40px); }
.display {
  margin: 0; color: var(--navy);
  font-size: clamp(30px, 5.4vw, 54px); font-weight: 900; line-height: 1.28; letter-spacing: .01em;
  font-feature-settings: "palt"; word-break: auto-phrase;
}
html[lang="en"] .display { font-weight: 800; letter-spacing: -.02em; line-height: 1.12; }
.tagline {
  margin: 16px 0 0; color: var(--navy);
  font-size: clamp(11.5px, 1.4vw, 14px); font-weight: 700; letter-spacing: .2em;
}
.prose { margin-top: clamp(28px, 4vw, 44px); font-size: 17px; }
.prose p { margin: 0 0 1.1em; }
.prose .lead { font-size: clamp(18px, 2vw, 21px); font-weight: 500; color: var(--navy); line-height: 1.8; }
html[lang="en"] .prose .lead { line-height: 1.55; }

.offers {
  list-style: none; margin: clamp(20px, 3vw, 32px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px;
}
.offers li {
  padding: 24px 24px 22px; background: var(--paper);
  border: 1px solid var(--line); border-radius: 16px;
}
.offers .num { display: block; font-size: 13px; font-weight: 900; letter-spacing: .12em; color: var(--red); }
.offers h3 { margin: 6px 0 8px; font-size: 18px; font-weight: 700; color: var(--navy); line-height: 1.5; font-feature-settings: "palt"; }
.offers p { margin: 0; font-size: 15px; line-height: 1.85; color: #333A48; }
html[lang="en"] .offers p { line-height: 1.6; }

/* ---------- Why "AI Futures" ---------- */
.why { position: relative; overflow: hidden; background: var(--navy); color: #E9ECF3; padding: clamp(64px, 10vw, 120px) 0; }
.why::after {           /* the hero's red diagonal, carried down the page */
  content: ""; position: absolute; right: -10%; top: -30%;
  width: 6px; height: 170%; background: var(--red); opacity: .85;
  transform: rotate(38deg); transform-origin: top;
}
.why .wrap { position: relative; z-index: 1; }
.why h2 { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: .18em; color: #AEB8CC; }
.why .q {
  margin: 14px 0 24px; color: var(--white);
  font-size: clamp(26px, 4vw, 40px); font-weight: 900; line-height: 1.35;
  font-feature-settings: "palt"; word-break: auto-phrase;
}
html[lang="en"] .why .q { font-weight: 800; letter-spacing: -.01em; }
.why p { font-size: 17px; margin: 0 0 1.1em; max-width: 46em; }
.why p.goal { color: var(--white); font-weight: 500; }

/* ---------- Closing CTA + footer ---------- */
.cta { padding: clamp(56px, 8vw, 96px) 0; text-align: center; }
.cta-cover {
  width: clamp(150px, 16vw, 200px); margin: 0 auto 28px; border-radius: 5px;
  transform: rotate(-2deg);
  box-shadow: 0 24px 44px -18px rgba(11, 31, 58, .45), 0 2px 6px rgba(11, 31, 58, .14);
}
.cta h2 {
  margin: 0 auto 24px; max-width: 26em; color: var(--navy);
  font-size: clamp(22px, 3vw, 30px); font-weight: 900; line-height: 1.45;
  font-feature-settings: "palt"; word-break: auto-phrase;
}
html[lang="en"] .cta h2 { font-weight: 800; }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 13px; color: var(--muted); }
footer .in { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; }
footer nav { display: flex; gap: 20px; }
footer a { color: var(--muted); }

/* ---------- Privacy policy page ---------- */
.doc { padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); }
.doc h1 { margin: 0; color: var(--navy); font-size: clamp(26px, 4vw, 36px); font-weight: 900; line-height: 1.4; font-feature-settings: "palt"; }
.doc .sub { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.doc .meta { margin: 20px 0 0; font-size: 13.5px; color: var(--muted); }
.doc .intro { margin: 28px 0 0; }
.doc h2 {
  margin: 44px 0 10px; padding-top: 20px; border-top: 1px solid var(--line);
  color: var(--navy); font-size: 19px; font-weight: 700; line-height: 1.5;
}
.doc h3 { margin: 22px 0 6px; font-size: 16px; color: var(--navy); }
.doc p, .doc li { font-size: 15.5px; }
.doc p { margin: 0 0 .9em; }
.doc ol, .doc ul { margin: 0 0 1em; padding-left: 1.6em; }
.doc li { margin: 0 0 .35em; }
.doc table { width: 100%; border-collapse: collapse; margin: 6px 0 1em; font-size: 14.5px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border: 1px solid var(--line); }
.doc th { width: 11em; background: var(--white); color: var(--navy); font-weight: 700; }
.doc .toc { margin: 28px 0 0; padding: 18px 22px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; }
.doc .toc ol { margin: 0; columns: 2 16em; column-gap: 32px; font-size: 14.5px; }
.doc .note { margin: 18px 0 0; padding: 12px 16px; background: var(--lav); border-radius: 12px; font-size: 13.5px; }
/* Unfilled legal details. Searching the source for 要記入 finds every one. */
.tbd { background: #FFE58A; color: #5A3B00; padding: 0 .25em; border-radius: 3px; font-weight: 700; }

/* ---------- Narrow screens ---------- */
@media (max-width: 860px) {
  .card { grid-template-columns: minmax(0, 1fr); grid-template-areas: "covers" "intro" "form" "done"; }
  .covers { max-width: 440px; aspect-ratio: 1 / 1.22; margin: calc(-1 * clamp(72px, 20vw, 150px)) -8px 12px; width: calc(100% + 16px); }
  .cover { width: 80%; }
}
@media (max-width: 560px) {
  .status { display: none; }
  .btn { width: 100%; }
  .fields { grid-template-columns: minmax(0, 1fr); }
  .offers li { padding: 20px; }
  .prose, .why p { font-size: 16px; }
  .doc th { width: 7.5em; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cover, .btn, .btn .arrow { transition: none; }
}
