/* Polymath NYC — 2026 refresh
   Neo-classical editorial system: black canvas, paper cards, red accent,
   Didone display serif, ASCII text-mosaic hero. No drop shadows; soft radii. */
:root {
  --canvas: #0e0d0b;
  --canvas-2: #161513;
  --paper: #f5f2ea;
  --paper-2: #ece8dc;
  --pill: #e4dfd2;
  --red: #d8351f;
  --red-deep: #b02a18;
  --ink: #171512;
  --body: #5b574d;
  --body-on-dark: #a8a49a;
  --line: rgba(23, 21, 18, 0.14);
  --line-on-dark: rgba(245, 242, 234, 0.14);
  --serif: "Libre Baskerville", "Noto Serif JP", Georgia, serif;
  --sans: "Inter", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --maxw: 1180px;
  --r-card: 32px;
  --r-tile: 20px;
  --r-pill: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  font-family: var(--sans);
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.7;
  font-size: 15.5px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

::selection { background: var(--red); color: var(--paper); }

/* ---------- header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .3s ease;
}
/* over the light hero (top of page): ink on paper */
.site-header:not(.scrolled) { background: transparent; }
.site-header:not(.scrolled) .brand { color: var(--ink); }
.site-header:not(.scrolled) .brand .sub { color: var(--body); }
.site-header:not(.scrolled) nav.primary a { color: rgba(23,21,18,0.72); }
.site-header:not(.scrolled) nav.primary a:hover { color: var(--ink); }
.site-header:not(.scrolled) .lang-toggle { border-color: var(--line); }
.site-header:not(.scrolled) .lang-toggle button { color: rgba(23,21,18,0.55); }
.site-header:not(.scrolled) .lang-toggle button.active { background: var(--ink); color: var(--paper); }
.site-header:not(.scrolled) .menu-btn span { background: var(--ink); }
.site-header.scrolled {
  background: rgba(14, 13, 11, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-on-dark);
}
.site-header .bar {
  max-width: var(--maxw); margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
  height: 84px; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--paper); }
.brand svg { height: 36px; width: auto; }
.brand svg.logo-hex path { stroke: currentColor; }
.brand svg.logo-hex path.k { stroke: var(--canvas); }
.site-header:not(.scrolled) .brand svg.logo-hex path.k { stroke: var(--paper); }
.brand .word { font-family: var(--serif); font-weight: 900; font-size: 21px; letter-spacing: .05em; white-space: nowrap; -webkit-text-stroke: 0.4px currentColor; }
.brand .word em { font-style: normal; color: var(--red); }
.brand .sub { display: block; font-family: var(--sans); font-size: 9.5px; letter-spacing: .32em; text-transform: uppercase; color: var(--body-on-dark); margin-top: 0; }

nav.primary { display: flex; align-items: center; gap: 26px; }
nav.primary a {
  color: rgba(245,242,234,0.75); font-size: 15.5px; font-weight: 500; letter-spacing: .02em;
  transition: color .2s;
}
nav.primary a:hover { color: var(--paper); }

.lang-toggle {
  display: inline-flex; border: 1px solid var(--line-on-dark); border-radius: var(--r-pill); overflow: hidden;
}
.lang-toggle button {
  appearance: none; border: 0; background: transparent; color: rgba(245,242,234,0.55);
  font: 600 13px/1 var(--sans); letter-spacing: .06em; padding: 8px 12px; cursor: pointer;
  transition: background .2s, color .2s;
}
.lang-toggle button.active { background: var(--paper); color: var(--ink); }

.menu-btn { display: none; appearance: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.menu-btn span { display: block; width: 22px; height: 2px; background: var(--paper); margin: 5px 0; transition: transform .25s, opacity .25s; }
body.menu-open .menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
body.menu-open .menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 24px; border-radius: var(--r-pill); font-weight: 600; font-size: 14px;
  letter-spacing: .01em; cursor: pointer; border: 1px solid transparent;
  transition: background .2s, color .2s, border-color .2s, opacity .2s;
}
.btn::after { content: "↗"; font-size: 14px; }
.btn.primary { background: var(--red); color: var(--paper); }
.btn.primary:hover { background: var(--red-deep); }
.btn.ghost { border-color: var(--line-on-dark); color: var(--paper); }
.btn.ghost:hover { border-color: var(--paper); }
.btn.paper { background: var(--pill); color: var(--ink); }
.btn.paper:hover { background: #d9d3c2; }

/* ---------- hero: paper, centered, minimal ---------- */
.hero {
  position: relative; background: var(--paper); color: var(--ink);
  padding: 108px 0 28px; overflow: hidden;
}
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--red);
}
.kicker::before { content: ""; width: 26px; height: 1.5px; background: var(--red); }
.hero-grid {
  display: grid; grid-template-columns: 11fr 10fr; gap: 32px; align-items: center;
}
.hero-text { padding-top: 36px; }
.hero h1 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4.2vw, 56px);
  line-height: 1.06; letter-spacing: -0.015em; margin: 20px 0 18px; max-width: 15ch;
  white-space: pre-line;
}
.hero h1 .hl {
  background: var(--red); color: var(--paper);
  padding: 0.03em 0.14em; margin-left: -0.14em;
  border-radius: 6px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.hero .lead { max-width: 44ch; color: var(--body); font-size: 16.5px; }
.hero .cta-row { display: flex; gap: 12px; margin: 32px 0 0; flex-wrap: wrap; }
.hero .btn.ghost { border-color: rgba(23,21,18,0.3); color: var(--ink); }
.hero .btn.ghost:hover { border-color: var(--ink); }

/* ASCII acropolis artwork — borderless, dissolves into the paper */
.hero-art {
  display: flex; justify-content: center; overflow: hidden;
}
.hero-art pre {
  font: 400 5px/1.0 "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: 0px; user-select: none; white-space: pre;
  color: rgba(23, 21, 18, 0.85);
}
.hero-art .r { color: var(--red); }
.hero-art .b { color: rgba(23, 21, 18, 0.38); }

/* stats strip (inside the mission card) */
.stats {
  margin-top: 48px; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(3, 1fr);
}
.stats > div { padding: 22px 24px 0 0; }
.stats > div + div { border-left: 1px solid var(--line); padding-left: 28px; }
.stats .n { font-family: var(--serif); font-size: 28px; font-weight: 700; color: var(--ink); line-height: 1.15; }
.stats .l { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--body); margin-top: 4px; }

/* ---------- card sections on canvas ---------- */
section.block { padding: 14px 0; }
section.block:first-of-type { padding-top: 40px; }
.card {
  background: var(--paper); border-radius: var(--r-card);
  padding: clamp(32px, 5vw, 64px);
}
.card.red { background: var(--red); color: var(--paper); }
.card.dark { background: var(--canvas-2); color: var(--paper); border: 1px solid var(--line-on-dark); }

.section-head { margin-bottom: 44px; }
.section-head h2, h2.display {
  font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.12; letter-spacing: -0.01em; margin-top: 14px; max-width: 24ch;
}
.card.red .kicker { color: var(--paper); }
.card.red .kicker::before { background: var(--paper); }

/* mission */
.mission .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.mission p { color: var(--body); font-size: 16px; }
.mission p + p { margin-top: 16px; }

/* team */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.member {
  background: #fbf9f4; border: 1px solid var(--line); border-radius: var(--r-tile);
  padding: 28px 26px; display: flex; flex-direction: column;
  transition: background .2s ease;
}
.member:hover { background: #ffffff; }
.member .photo {
  width: 104px; height: 104px; border-radius: 50%; overflow: hidden;
  border: 2px solid var(--ink); margin-bottom: 18px;
}
.member .photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.member h3 { font-family: var(--serif); font-weight: 700; font-size: 19px; letter-spacing: .01em; }
.member .role { color: var(--red); font-size: 12.5px; font-weight: 600; letter-spacing: .03em; margin: 4px 0 14px; }
.member .bio { color: var(--body); font-size: 13.5px; line-height: 1.75; }
.member .bio.clamped { display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.member .more {
  margin-top: 14px; align-self: flex-start; appearance: none; background: none; border: 0;
  color: var(--ink); font: 600 13px var(--sans); cursor: pointer;
  border-bottom: 1.5px solid var(--red); padding: 0 0 2px;
}

/* why (red card) */
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.why-card {
  background: rgba(14,13,11,0.16); border-radius: var(--r-tile); padding: 32px 30px;
  transition: background .2s;
}
.why-card:hover { background: rgba(14,13,11,0.26); }
.why-card .num { font-family: var(--serif); font-size: 14px; letter-spacing: .1em; opacity: .75; }
.why-card h3 { font-family: var(--serif); font-weight: 700; font-size: 22px; margin: 10px 0 12px; line-height: 1.3; }
.why-card p { color: rgba(245,242,234,0.82); font-size: 14px; }

/* results */
.results-list { columns: 2; column-gap: 48px; margin-bottom: 48px; }
.results-list li {
  list-style: none; break-inside: avoid;
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 14px 4px; border-bottom: 1px solid var(--line);
  font-size: 14.5px;
}
.results-list .school { font-weight: 600; }
.results-list .deg { color: var(--body); font-size: 13px; text-align: right; white-space: nowrap; }
.logo-row {
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
  opacity: .8;
}
.logo-row img { height: 42px; width: auto; filter: grayscale(1); mix-blend-mode: multiply; }

/* blog */
.blog .section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.blog .follow { color: var(--red); font-weight: 600; font-size: 14px; }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.post {
  border: 1px solid var(--line); border-radius: var(--r-tile); overflow: hidden; background: #fbf9f4;
  transition: background .2s ease;
}
.post:hover { background: #ffffff; }
.post .thumb { aspect-ratio: 1.91 / 1; background: var(--paper-2); }
.post .thumb img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.2); }
.post:hover .thumb img { filter: none; }
.post .body { padding: 16px 18px 20px; }
.post .date { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--body); }
.post h3 { font-size: 14.5px; line-height: 1.55; font-weight: 600; margin-top: 8px; }

/* contact */
.contact .cols { display: grid; grid-template-columns: 5fr 7fr; gap: 52px; align-items: start; }
.contact .lead { color: var(--body); font-size: 16px; margin-top: 6px; }
.line-box {
  margin-top: 30px; padding: 20px; background: #fbf9f4; border: 1px solid var(--line);
  border-radius: var(--r-tile); display: flex; gap: 18px; align-items: center;
}
.line-box img { width: 92px; border-radius: 10px; }
.line-box p { font-size: 13px; color: var(--body); }
.line-box a { color: #06c755; font-weight: 700; font-size: 14px; display: inline-block; margin-top: 6px; }

form.contact-form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--body); }
.field input, .field textarea, .field select {
  width: 100%; font: 15px var(--sans); color: var(--ink);
  background: #fbf9f4; border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 13px 14px; transition: border-color .2s, background .2s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--red); background: #ffffff;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-note { font-size: 13px; min-height: 20px; }
.form-note.ok { color: #157347; }
.form-note.err { color: var(--red-deep); }

/* footer */
footer { background: var(--canvas); color: var(--body-on-dark); padding: 64px 0 40px; }
footer .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap; padding-bottom: 36px; border-bottom: 1px solid var(--line-on-dark); }
footer .tag { font-size: 13px; margin-top: 10px; max-width: 40ch; }
footer .links { display: flex; gap: 26px; flex-wrap: wrap; }
footer .links a { font-size: 13.5px; color: rgba(245,242,234,0.75); }
footer .links a:hover { color: var(--paper); }
footer .social a { display: inline-flex; margin-left: 14px; opacity: .8; }
footer .social a:hover { opacity: 1; }
footer .social svg { width: 20px; height: 20px; fill: var(--paper); }
footer .disclaimer { font-size: 11.5px; line-height: 1.7; color: rgba(168,164,154,0.75); max-width: 88ch; padding-top: 24px; }
footer .bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-top: 18px; font-size: 12.5px; }

/* legal pages */
.legal-page { background: var(--canvas); padding: 120px 0 60px; }
.legal-page .card { max-width: 840px; margin: 0 auto; }
.legal-page h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 4vw, 42px); margin-bottom: 36px; line-height: 1.2; }
.legal-page h2 { font-family: var(--serif); font-weight: 700; font-size: 19px; margin: 34px 0 10px; }
.legal-page p, .legal-page li { color: var(--body); font-size: 14.5px; }
.legal-page ul { padding-left: 22px; margin: 10px 0; }
.legal-page dt { font-weight: 700; margin-top: 14px; }
.legal-page dd { margin-left: 0; color: var(--body); font-size: 14.5px; }

/* reveal animation */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 12px; }
  .hero-text { padding-top: 0; }
  .team-grid, .blog-grid { grid-template-columns: 1fr 1fr; }
  .mission .cols, .contact .cols { grid-template-columns: 1fr; gap: 32px; }
  .why-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .brand .word { font-size: 17px; }
  .brand .sub { font-size: 7px; letter-spacing: .24em; }
  .brand svg { height: 25px; }
  .menu-btn { display: block; }
  nav.primary {
    position: fixed; inset: 84px 0 auto 0; z-index: 99;
    flex-direction: column; gap: 0; background: var(--canvas);
    border-bottom: 1px solid var(--line-on-dark);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  body.menu-open nav.primary { max-height: 440px; }
  nav.primary a { padding: 16px 24px; width: 100%; border-top: 1px solid var(--line-on-dark); font-size: 15px; }
  .hero { padding-top: 116px; }
  .hero-art pre { font-size: 4px; }
  .stats { grid-template-columns: 1fr; }
  .stats > div + div { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .stats > div { padding: 16px 0 0; }
  .card { border-radius: 24px; }
  .team-grid, .blog-grid { grid-template-columns: 1fr; }
  .results-list { columns: 1; }
  .form-row { grid-template-columns: 1fr; }
  .logo-row { justify-content: center; }
  .ascii-tile pre { font-size: 7px; letter-spacing: 0.5px; }
}
