/* ============================================================
   THE FLYING ZABUTONS — Core stylesheet
   Sumi-e / inked-scroll aesthetic. Palette and type per brand.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@600;700;800&family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Noto+Serif+JP:wght@400;600;700&display=swap');

:root {
  --parchment: #FDF9F0;
  --parchment-dark: #F5EEDC;
  --parchment-line: #E6DCC4;

  --ink: #1A1A1B;
  --ink-soft: #3A3A3C;
  --ink-muted: #6B6B6E;

  --red: #9E1B1B;
  --red-dark: #7A1414;
  --red-light: #C0353B;
  --cinnabar: #E63946;

  --charcoal: #2D2D2D;
  --charcoal-light: #3D3D3D;
  --black: #000000;

  --font-display: 'Syne', sans-serif;
  --font-body: 'EB Garamond', 'Noto Serif JP', Georgia, serif;
  --font-jp: 'Noto Serif JP', serif;

  --max-w: 1180px;
  --radius: 2px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.08;
  margin: 0;
}

p { margin: 0 0 1.1em; max-width: 66ch; }
p:last-child { margin-bottom: 0; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow { max-width: 860px; }
.container--wide { max-width: 1320px; }

/* ---------- Kickers / labels ---------- */

.kicker {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 14px;
}

.jp-tag {
  font-family: var(--font-jp);
  color: var(--ink-muted);
  font-size: 0.95rem;
  margin-left: 10px;
  letter-spacing: 0.04em;
}

/* ---------- Brush-line divider ---------- */

.brush-line {
  height: 3px;
  width: 74px;
  margin: 22px 0 0;
  background: linear-gradient(90deg, var(--red) 0%, var(--red-light) 55%, transparent 100%);
  border-radius: 2px;
}

.brush-line--center { margin-left: auto; margin-right: auto; }

/* ---------- Seal stamp ---------- */

.seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  background: var(--red);
  color: var(--parchment);
  font-family: var(--font-jp);
  font-size: 1.05rem;
  border-radius: 3px;
  transform: rotate(-4deg);
  box-shadow: 0 2px 0 rgba(0,0,0,0.15);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 14px 26px;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn--primary {
  background: var(--red);
  color: var(--parchment);
}
.btn--primary:hover { background: var(--red-dark); }

.btn--dark {
  background: var(--black);
  color: var(--parchment);
}
.btn--dark:hover { background: #1a1a1a; }

.btn--outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--outline:hover { background: var(--ink); color: var(--parchment); }

.btn--outline-light {
  background: transparent;
  color: var(--parchment);
  border-color: rgba(253,249,240,0.4);
}
.btn--outline-light:hover { background: rgba(253,249,240,0.12); }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Announcement bar ---------- */

.announcement {
  background: var(--red);
  color: var(--parchment);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
}
.announcement .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 10px 24px;
  text-align: center;
  flex-wrap: wrap;
}
.announcement a {
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

/* ---------- Navbar ---------- */

.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253,249,240,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--parchment-line);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img { width: 42px; height: 42px; }
.brand-text .brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1;
}
.brand-text .brand-name .red { color: var(--red); }
.brand-text .brand-sub {
  font-size: 0.7rem;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  margin-top: 3px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav-links a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
}
.nav-links a[aria-current="page"] { color: var(--red); }
.nav-links a:hover { color: var(--red); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle svg { width: 26px; height: 26px; }

.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
}
.mobile-drawer.is-open { display: block; }
.mobile-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}
.mobile-drawer__panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 82%;
  max-width: 340px;
  background: var(--parchment);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 30px rgba(0,0,0,0.25);
}
.mobile-drawer__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}
.mobile-drawer__close { background: none; border: none; cursor: pointer; }
.mobile-drawer__close svg { width: 24px; height: 24px; }
.mobile-drawer__links {
  display: flex;
  flex-direction: column;
  gap: 22px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}
.mobile-drawer__foot { margin-top: auto; padding-top: 24px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 90px 0 100px;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.24;
}
.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--parchment) 0%, rgba(253,249,240,0.85) 45%, var(--parchment) 100%);
}
.hero__content { position: relative; z-index: 1; max-width: 760px; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
.hero h1 .red { color: var(--red); }
.hero .slogan {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  margin-top: 22px;
}
.hero .secondary {
  font-style: italic;
  color: var(--red);
  font-size: 1.05rem;
  margin-top: 8px;
}
.hero .body { margin-top: 22px; font-size: 1.15rem; color: var(--ink-soft); }
.hero .btn-row { margin-top: 32px; }

.jp-vertical {
  position: absolute;
  writing-mode: vertical-rl;
  font-family: var(--font-jp);
  font-size: 2.4rem;
  color: var(--parchment-line);
  right: 4%;
  top: 12%;
  letter-spacing: 0.3em;
  z-index: 0;
  user-select: none;
}

/* ---------- Sections ---------- */

section { padding: 76px 0; }
.section--tight { padding: 56px 0; }
.section--dark {
  background: var(--charcoal);
  color: var(--parchment);
}
.section--dark .kicker { color: var(--red-light); }
.section--dark p { color: rgba(253,249,240,0.78); }
.section--parchment-dark { background: var(--parchment-dark); }

.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }

/* ---------- Two column ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 54px;
  align-items: center;
}
.split img { border-radius: var(--radius); }
.split .kicker { margin-bottom: 12px; }

/* ---------- Philosophy monolith ---------- */

.philosophy {
  background: var(--black);
  color: var(--parchment);
  padding: 90px 0;
  text-align: center;
}
.philosophy .kicker { color: var(--red-light); }
.philosophy h2 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  max-width: 720px;
  margin: 0 auto;
}
.philosophy-list {
  list-style: none;
  margin: 44px auto 0;
  padding: 0;
  max-width: 560px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.philosophy-list li {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
}
.philosophy-close {
  max-width: 620px;
  margin: 44px auto 0;
  font-style: italic;
  color: rgba(253,249,240,0.75);
}

/* ---------- Step row ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 22px;
  margin-top: 40px;
}
.steps--seven { grid-template-columns: repeat(4, 1fr); }
.step-card {
  position: relative;
  padding: 26px 18px 22px;
  background: var(--parchment-dark);
  border: 1px solid var(--parchment-line);
  border-radius: var(--radius);
}
.step-card .num {
  font-family: var(--font-jp);
  color: var(--red);
  font-size: 1.4rem;
  display: block;
  margin-bottom: 10px;
}
.step-card h4 { font-size: 1.02rem; margin-bottom: 6px; }
.step-card p { font-size: 0.92rem; color: var(--ink-muted); margin: 0; }

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 36px;
}
.card {
  position: relative;
  background: var(--parchment-dark);
  border: 1px solid var(--parchment-line);
  padding: 28px 24px;
  border-radius: var(--radius);
}
.brush-corner {
  position: relative;
}
.brush-corner::before,
.brush-corner::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--red);
  border-style: solid;
}
.brush-corner::before {
  top: -1px; left: -1px;
  border-width: 2px 0 0 2px;
}
.brush-corner::after {
  bottom: -1px; right: -1px;
  border-width: 0 2px 2px 0;
}

.tz-card { text-align: center; }
.tz-card .tz-code {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.4rem;
  color: var(--red);
}
.tz-card .tz-name { font-family: var(--font-display); font-weight: 700; margin-top: 6px; }
.tz-card .tz-status { color: var(--ink-muted); font-size: 0.9rem; margin-top: 4px; }

/* ---------- Killboard ---------- */

.kill-feed { list-style: none; padding: 0; margin: 30px 0 0; display: flex; flex-direction: column; gap: 0; }
.kill-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--parchment-line);
}
.kill-row .kill-num {
  font-family: var(--font-jp);
  color: var(--red);
  font-size: 1.3rem;
  width: 28px;
  flex: 0 0 auto;
}
.kill-row .kill-main { flex: 1; }
.kill-row .kill-main strong { font-family: var(--font-display); }
.kill-row .kill-meta { color: var(--ink-muted); font-size: 0.9rem; white-space: nowrap; }
.kill-note { font-size: 0.85rem; color: var(--ink-muted); margin-top: 18px; font-style: italic; }

/* ---------- Tags ---------- */

.tag-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.tag {
  border: 1px solid var(--ink);
  padding: 7px 14px;
  font-size: 0.85rem;
  font-family: var(--font-display);
  font-weight: 600;
  border-radius: 20px;
}
.tag--red { border-color: var(--red); color: var(--red); }

/* ---------- CTA band ---------- */

.cta {
  text-align: center;
  padding: 80px 0;
}
.cta--light { background: var(--parchment-dark); }
.cta--dark { background: var(--black); color: var(--parchment); }
.cta--dark .kicker { color: var(--red-light); }
.cta--dark p { color: rgba(253,249,240,0.78); }
.cta h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-bottom: 14px; }
.cta p { margin: 0 auto 26px; }
.cta .btn-row { justify-content: center; }

/* ---------- Member hub lock panel ---------- */

.lock-panel {
  background: var(--black);
  color: var(--parchment);
  text-align: center;
  padding: 90px 0 70px;
}
.lock-icon {
  width: 56px; height: 56px;
  margin: 0 auto 20px;
  color: var(--red-light);
}

/* ---------- Footer ---------- */

footer {
  background: var(--charcoal);
  color: rgba(253,249,240,0.85);
  padding: 70px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-grid h5 {
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red-light);
  margin-bottom: 16px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-grid a:hover { color: var(--parchment); }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer-brand img { width: 38px; height: 38px; }
.footer-tagline { font-style: italic; color: rgba(253,249,240,0.6); max-width: 34ch; }
.footer-bottom {
  margin-top: 54px;
  padding-top: 24px;
  border-top: 1px solid rgba(253,249,240,0.12);
  font-size: 0.8rem;
  color: rgba(253,249,240,0.5);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Forms ---------- */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 36px;
}
.field { display: flex; flex-direction: column; gap: 7px; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
}
.field input,
.field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border: 1.5px solid var(--parchment-line);
  background: var(--parchment);
  border-radius: var(--radius);
}
.field input:focus,
.field textarea:focus { border-color: var(--red); outline: none; }
.toggle-row { display: flex; flex-wrap: wrap; gap: 10px; }
.toggle-btn {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 9px 16px;
  border: 1.5px solid var(--parchment-line);
  background: var(--parchment);
  border-radius: 20px;
  cursor: pointer;
}
.toggle-btn.is-active { background: var(--red); border-color: var(--red); color: var(--parchment); }
.form-status { margin-top: 20px; font-family: var(--font-display); font-weight: 600; }
.form-status.error { color: var(--red); }
.form-status.ok { color: #3a7a3a; }

.confirm-panel { text-align: center; padding: 90px 0; }
.confirm-panel .seal { width: 56px; height: 56px; font-size: 1.7rem; margin: 0 auto 24px; }

/* ---------- News bulletin ---------- */

.filter-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 40px 0 10px; }
.filter-btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 9px 18px;
  border: 1.5px solid var(--ink);
  background: transparent;
  border-radius: 20px;
  cursor: pointer;
}
.filter-btn.is-active { background: var(--ink); color: var(--parchment); }

.post-featured {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-top: 30px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--parchment-line);
}
.post-featured img { border-radius: var(--radius); aspect-ratio: 16/10; object-fit: cover; }
.post-cat {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
}
.post-title { font-size: clamp(1.4rem, 3vw, 2rem); margin-top: 10px; }
.post-meta { color: var(--ink-muted); font-size: 0.88rem; margin-top: 10px; }

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 40px;
}
.post-card img { border-radius: var(--radius); aspect-ratio: 16/10; object-fit: cover; margin-bottom: 16px; }
.post-card h3 { font-size: 1.15rem; margin-top: 8px; }
.read-more { display: inline-block; margin-top: 12px; font-family: var(--font-display); font-weight: 700; font-size: 0.88rem; color: var(--red); }

.post-detail-hero img { border-radius: var(--radius); aspect-ratio: 16/9; object-fit: cover; margin: 30px 0 40px; }
.post-body :is(h2,h3) { font-family: var(--font-display); margin: 1.4em 0 0.5em; }
.post-body p { font-size: 1.1rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 30px; }
.gallery-grid img { aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); }
.back-link { font-family: var(--font-display); font-weight: 700; font-size: 0.9rem; color: var(--red); display: inline-block; margin-bottom: 20px; }

/* ---------- Future items grid (member hub) ---------- */

.future-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 40px;
}
.future-item {
  background: rgba(253,249,240,0.04);
  border: 1px solid rgba(253,249,240,0.12);
  padding: 24px;
  border-radius: var(--radius);
}
.future-item h4 { font-size: 1rem; margin-bottom: 8px; }
.future-item p { font-size: 0.92rem; color: rgba(253,249,240,0.65); }

/* ---------- Utility ---------- */

.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .split { grid-template-columns: 1fr; }
  .split .split-media { order: -1; }
  .steps, .steps--seven { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .post-featured { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .future-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  section { padding: 56px 0; }
  .hero { padding: 60px 0 70px; }
  .form-grid { grid-template-columns: 1fr; }
  .steps, .steps--seven { grid-template-columns: 1fr 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .post-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .future-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .jp-vertical { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
