/* Athens Gakko design system: notebook / academic. */

:root {
  --paper: #faf7f0;
  --paper-2: #f2ede0;
  --sheet: #fffefa;
  --ink: #1a2233;
  --ink-2: #4a5468;
  --rule: #e2dbc9;
  --rule-blue: #d9e4f2;
  --blue: #2848a8;
  --blue-soft: #e8eefb;
  --red: #b3321f;
  --red-soft: #fbe9e5;
  --green: #246b4b;
  --green-soft: #e4f3ea;
  --serif: "Newsreader", "Noto Serif JP", Georgia, serif;
  --sans:
    "Inter", "Noto Sans JP", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Caveat", "Noto Sans JP", cursive;
  --radius: 10px;
  --maxw: 1120px;
  --gutter: 24px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.lang-en .ja,
body.lang-ja .en {
  display: none !important;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--blue);
}

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--ink);
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  z-index: 100;
}

.skip:focus {
  left: 8px;
}

/* ─── Type ─── */
h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.2rem, 4.2vw, 3.3rem);
}

h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
}

h3 {
  font-size: 1.3rem;
  line-height: 1.25;
}

body.lang-ja h1,
body.lang-ja h2,
body.lang-ja h3 {
  line-height: 1.35;
  letter-spacing: 0;
}

body.lang-ja {
  line-height: 1.85;
}

body.lang-ja h1 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
}

body.lang-ja h1,
body.lang-ja h2,
body.lang-ja h3 {
  word-break: auto-phrase;
  text-wrap: balance;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
}

body.lang-ja .eyebrow {
  letter-spacing: 0.06em;
}

.lede {
  font-size: 1.15rem;
  color: var(--ink-2);
  max-width: 62ch;
}

.muted {
  color: var(--ink-2);
}

/* ─── Navigation ─── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 240, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.site-nav.scrolled {
  border-bottom-color: var(--rule);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  background: var(--sheet);
}

.lang-btn {
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 11px;
  color: var(--ink-2);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.lang-btn[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
}

.menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--sheet);
  cursor: pointer;
  color: var(--ink);
}

.menu-btn span,
.menu-btn span::before,
.menu-btn span::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  margin: 0 auto;
  position: relative;
  content: "";
}

.menu-btn span::before {
  position: absolute;
  top: -6px;
  left: 0;
}

.menu-btn span::after {
  position: absolute;
  top: 6px;
  left: 0;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 600;
  font-size: 0.97rem;
  padding: 12px 22px;
  border-radius: 8px;
  border: 1.5px solid var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}

.btn-primary {
  background: var(--ink);
  color: #fff;
}

.btn-primary:hover {
  background: var(--blue);
  border-color: var(--blue);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--ink);
  color: #fff;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.9rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ─── Sections ─── */
.section {
  padding: clamp(64px, 9vw, 112px) 0;
}

.section-alt {
  background: var(--paper-2);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.section-head h2 {
  margin-bottom: 16px;
}

/* ─── Hero ─── */
.hero {
  padding: clamp(40px, 6vw, 80px) 0 clamp(56px, 8vw, 104px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero h1 {
  margin-bottom: 22px;
}

.hero .lede {
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

/* ─── Worked example sheet ─── */
.sheet {
  position: relative;
  background-color: var(--sheet);
  background-image:
    linear-gradient(
      to right,
      transparent 39px,
      #e7b1a9 39px,
      #e7b1a9 40px,
      transparent 40px
    ),
    repeating-linear-gradient(
      transparent 0,
      transparent 29px,
      var(--rule-blue) 29px,
      var(--rule-blue) 30px
    );
  border: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow:
    0 1px 2px rgba(26, 34, 51, 0.06),
    0 18px 40px -18px rgba(26, 34, 51, 0.25);
  padding: 22px 22px 22px 58px;
}

.sheet-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 6px;
}

body.lang-ja .sheet-label {
  letter-spacing: 0.04em;
}

.sheet-problem {
  font-family: var(--serif);
  font-size: 1.08rem;
  line-height: 1.7;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--rule);
}

.work {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.work li {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: start;
  color: var(--blue);
  padding: 6px 10px 6px 6px;
  border-radius: 8px;
}

.work .num {
  font-family: var(--hand);
  font-size: 1.25rem;
  line-height: 1.5;
}

.work .tex {
  overflow-x: auto;
  overflow-y: hidden;
  font-size: 1.02rem;
}

.work .katex-display {
  margin: 0;
  text-align: left;
}

.work .katex-display > .katex {
  text-align: left;
}

.work .tag {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
  text-align: right;
  white-space: nowrap;
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 600;
}

.work .ok .tag {
  color: var(--green);
}

.work .bad {
  background: var(--red-soft);
  outline: 2px solid var(--red);
  outline-offset: 1px;
  border-radius: 12px;
}

.work .bad .tag {
  color: var(--red);
}

.work .derived {
  opacity: 0.55;
}

.work .derived .tag {
  color: var(--ink-2);
}

.hand-note {
  font-family: var(--hand);
  font-size: 1.15rem;
  color: var(--red);
  transform: rotate(-2deg);
  display: inline-block;
}

.tutor {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 0.95rem;
  line-height: 1.6;
}

body.lang-ja .tutor {
  line-height: 1.8;
}

.tutor-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 6px;
}

.tutor p + p {
  margin-top: 8px;
}

.tutor .ask {
  font-weight: 600;
}

.sheet-caption {
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--ink-2);
}

.sheet--compact {
  padding: 18px 18px 18px 52px;
}

/* ─── Three steps ─── */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 48px);
  list-style: none;
}

.steps li {
  border-top: 2px solid var(--ink);
  padding-top: 18px;
}

.steps .n {
  font-family: var(--serif);
  font-size: 2.6rem;
  line-height: 1;
  color: var(--blue);
  margin-bottom: 14px;
}

.steps h3 {
  margin-bottom: 10px;
}

.steps p {
  color: var(--ink-2);
}

/* ─── Principles ─── */
.principles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(32px, 6vw, 80px);
  list-style: none;
}

.principles li {
  padding: 24px 0;
  border-top: 1px solid var(--rule);
}

.principles h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.principles p {
  color: var(--ink-2);
}

/* ─── Audience ─── */
.audience {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
}

.audience > div {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 28px;
}

.audience h3 {
  margin-bottom: 14px;
}

.audience ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.audience li {
  position: relative;
  padding-left: 22px;
  color: var(--ink-2);
}

.audience li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 10px;
  height: 2px;
  background: var(--blue);
}

/* ─── FAQ ─── */
.faq {
  max-width: 760px;
}

.faq details {
  border-top: 1px solid var(--rule);
  padding: 18px 0;
}

.faq details:last-child {
  border-bottom: 1px solid var(--rule);
}

.faq summary {
  cursor: pointer;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

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

.faq summary::after {
  content: "+";
  font-family: var(--sans);
  color: var(--blue);
  font-size: 1.4rem;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq details p {
  margin-top: 12px;
  color: var(--ink-2);
}

/* ─── Contact ─── */
.contact {
  background: var(--ink);
  color: #fff;
  padding: clamp(64px, 9vw, 112px) 0;
}

.contact .eyebrow {
  color: #a9bdf5;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}

.contact h2 {
  margin-bottom: 18px;
}

.contact .lede {
  color: #c9d1e3;
}

.form-card {
  background: var(--sheet);
  color: var(--ink);
  border-radius: 12px;
  padding: clamp(20px, 3vw, 32px);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid #c8bfa8;
  border-radius: 8px;
  padding: 11px 13px;
}

.form-group textarea {
  resize: vertical;
  min-height: 130px;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

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

.form-captcha {
  min-height: 0;
}

.form-submit {
  align-self: flex-start;
}

.form-status {
  font-size: 0.95rem;
  min-height: 1.5em;
  color: var(--ink-2);
}

.form-status.success {
  color: var(--green);
  font-weight: 600;
}

.form-status.error {
  color: var(--red);
  font-weight: 600;
}

/* ─── Footer ─── */
footer {
  padding: 28px 0;
  font-size: 0.88rem;
  color: var(--ink-2);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}

.footer-inner strong {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
}

/* ─── Investor page ─── */
.glance {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 8px 24px;
}

.glance div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}

.glance div:last-child {
  border-bottom: 0;
}

.glance dt {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding-top: 2px;
}

.glance dd {
  font-weight: 500;
}

.rows {
  list-style: none;
  max-width: 860px;
}

.rows li {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 8px 16px;
  padding: 24px 0;
  border-top: 1px solid var(--rule);
}

.rows .n {
  font-family: var(--serif);
  font-size: 1.8rem;
  line-height: 1.1;
  color: var(--blue);
}

.rows h3 {
  margin-bottom: 8px;
}

.rows p {
  color: var(--ink-2);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.split h2 {
  margin-bottom: 16px;
}

.split p + p {
  margin-top: 14px;
}

.market {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 48px);
}

.market > div {
  border-top: 2px solid var(--ink);
  padding-top: 16px;
}

.market h3 {
  margin-bottom: 8px;
}

.market p {
  color: var(--ink-2);
}

.roadmap {
  list-style: none;
  max-width: 860px;
  counter-reset: phase;
}

.roadmap li {
  position: relative;
  padding: 0 0 28px 40px;
  border-left: 2px solid var(--rule);
  margin-left: 11px;
}

.roadmap li::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--ink-2);
}

.roadmap li.done::before {
  background: var(--green);
  border-color: var(--green);
}

.roadmap li.now::before {
  background: var(--blue);
  border-color: var(--blue);
}

.roadmap li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.roadmap h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.roadmap p {
  color: var(--ink-2);
}

.roadmap .state {
  display: inline-block;
  margin-left: 8px;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
  color: var(--blue);
}

.team {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 48px);
}

.team > div {
  border-top: 2px solid var(--ink);
  padding-top: 16px;
}

.team .role {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 10px;
}

.team p {
  color: var(--ink-2);
}

.stealth {
  margin-top: 32px;
  padding: 16px 20px;
  background: var(--paper-2);
  border-radius: var(--radius);
  color: var(--ink-2);
  font-size: 0.95rem;
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .hero-grid,
  .split,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .steps,
  .market {
    grid-template-columns: minmax(0, 1fr);
  }

  .principles,
  .audience,
  .team {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  :root {
    --gutter: 16px;
  }

  .menu-btn {
    display: block;
  }

  .nav-cta {
    display: none;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px var(--gutter) 16px;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 12px 0;
    font-size: 1.05rem;
  }

  .sheet {
    padding: 16px 14px 16px 46px;
    background-image:
      linear-gradient(
        to right,
        transparent 31px,
        #e7b1a9 31px,
        #e7b1a9 32px,
        transparent 32px
      ),
      repeating-linear-gradient(
        transparent 0,
        transparent 29px,
        var(--rule-blue) 29px,
        var(--rule-blue) 30px
      );
  }

  .work li {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .work .tag {
    grid-column: 2;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    text-align: left;
  }

  .glance div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .rows li {
    grid-template-columns: 40px minmax(0, 1fr);
  }
}
