/* ============================================================
   Manual Hub — Landing Page
   Responsive adaptation of the Manual Hub brand system.
   Tokens (color/font/glow/cards) are reused from the
   presentation brand spec; layout is original & responsive.
   ============================================================ */

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ===== TOKENS ===== */
:root {
  --orange:    #f98125;
  --orange-lt: #fb9b50;
  --navy-dk:   #0e1828;
  --navy:      #162035;
  --blue:      #2c599d;
  --blue-lt:   #5b84c4;
  --blue-pale: #a8c0e0;
  --white:     #ffffff;
  --gray:      #95a3b5; /* muted label text — lightened from brand #7a8799 for WCAG AA on dark */
  --bg:        #060b14;

  --maxw: 1140px;
  --gutter: clamp(20px, 5vw, 80px);
  --radius: 16px;
  --header-h: 68px;

  --sans: 'Noto Sans JP', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

/* ===== BASE ===== */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  background: var(--bg);
  font-family: var(--sans);
  color: var(--white);
  line-height: 1.7;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Fixed background glow, clipped to the viewport so the circles never
   create horizontal scroll. Replaces the per-slide .glow. */
.bg-glow { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.bg-glow::before,
.bg-glow::after { content: ''; position: absolute; border-radius: 50%; }
.bg-glow::before {
  width: min(1100px, 120vw); height: min(1100px, 120vw);
  top: -38vh; right: -22vw;
  background: radial-gradient(circle,
    rgba(249,129,37,.22) 0%, rgba(244,169,106,.08) 40%, transparent 70%);
}
.bg-glow::after {
  width: min(900px, 110vw); height: min(900px, 110vw);
  bottom: -30vh; left: -20vw;
  background: radial-gradient(circle,
    rgba(44,89,157,.26) 0%, rgba(91,132,196,.07) 46%, transparent 72%);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* Accessibility: visible keyboard focus on every interactive element */
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; border-radius: 4px; }

/* Skip-to-content link (visible on keyboard focus) */
.skip-link {
  position: fixed; top: 10px; left: 50%; z-index: 200;
  transform: translate(-50%, -160%);
  background: var(--orange); color: var(--navy-dk);
  font-weight: 700; font-size: 14px; padding: 10px 18px; border-radius: 8px;
  transition: transform .2s ease;
}
.skip-link:focus { transform: translate(-50%, 0); }

/* ===== LAYOUT HELPERS ===== */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
section { position: relative; z-index: 1; padding-block: clamp(56px, 9vw, 110px); }
.section-alt { background: rgba(14,24,40,.45); border-block: 1px solid rgba(91,132,196,.12); }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px; font-weight: 500; letter-spacing: .22em;
  text-transform: uppercase; color: var(--orange);
}
.rule { width: 52px; height: 3px; background: var(--orange); border-radius: 2px; margin: 16px 0 26px; }
.section-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 52px); }

h1, h2, h3 { font-weight: 200; line-height: 1.28; letter-spacing: .005em; }
h2 { font-size: clamp(28px, 4.4vw, 44px); }
h3 { font-size: 20px; font-weight: 500; }
.lead { font-size: clamp(15px, 2vw, 18px); color: var(--blue-pale); font-weight: 300; }
strong { color: var(--white); font-weight: 500; }
em { color: var(--orange); font-style: normal; font-weight: 300; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--sans); font-size: 15px; font-weight: 500;
  padding: 13px 26px; border-radius: 40px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--orange); color: var(--navy-dk); font-weight: 700; }
.btn-primary:hover { background: var(--orange-lt); }
.btn-ghost { background: rgba(91,132,196,.08); color: var(--white); border-color: rgba(91,132,196,.35); }
.btn-ghost:hover { border-color: var(--orange); color: var(--orange-lt); }
.btn-sm { padding: 9px 18px; font-size: 14px; }

/* ===== HEADER ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  background: rgba(6,11,20,.78);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(91,132,196,.14);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 38px; width: auto; }
.brand .wm { display: flex; flex-direction: column; line-height: 1.15; }
.wm-top { font-size: 17px; font-weight: 700; letter-spacing: .16em; color: var(--white); }
.wm-sub { font-family: var(--mono); font-size: 9px; font-weight: 400; letter-spacing: .2em; color: var(--blue-pale); text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: 26px; }
.nav-links { display: flex; gap: 24px; }
.nav-links a {
  font-size: 14px; font-weight: 400; color: var(--blue-pale);
  transition: color .18s ease; position: relative; padding: 4px 0;
  white-space: nowrap; flex-shrink: 0;
}
.nav-links a:hover { color: var(--white); }

.lang-toggle {
  display: inline-flex; border: 1px solid rgba(91,132,196,.3);
  border-radius: 20px; overflow: hidden; font-family: var(--mono);
}
.lang-toggle button, .lang-toggle a {
  background: transparent; border: none; cursor: pointer; text-decoration: none;
  color: var(--gray); font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: .08em; padding: 8px 14px; transition: all .18s ease;
}
.lang-toggle button.active, .lang-toggle a.active { background: var(--orange); color: var(--navy-dk); }

.menu-toggle { display: none; background: none; border: none; color: var(--white); cursor: pointer; }

/* ===== HERO ===== */
.hero { padding-top: clamp(48px, 8vw, 88px); }
.hero-inner { max-width: 1120px; }
.hero h1 { font-size: clamp(32px, 5.5vw, 54px); margin: 18px 0 24px; }
/* keep the emphasized brand phrase from splitting mid-word across a line break */
.hero h1 em { white-space: nowrap; }
.hero .lead { max-width: 680px; margin-bottom: 36px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* ===== CARD GRID ===== */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  background: rgba(22,32,53,.65);
  border: 1px solid rgba(91,132,196,.18);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: rgba(249,129,37,.45); transform: translateY(-3px); }
.card h3 { margin: 18px 0 10px; }
.card p { font-size: 14.5px; color: var(--blue-pale); }

.icon-circle {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(249,129,37,.1); border: 1px solid rgba(249,129,37,.25);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  color: var(--orange);
}

/* ===== FAQ ===== */
.faq-list { display: flex; flex-direction: column; gap: 14px; max-width: 820px; }
.faq-item {
  background: rgba(22,32,53,.65);
  border: 1px solid rgba(91,132,196,.18);
  border-radius: var(--radius);
  padding: 4px 24px;
  transition: border-color .2s ease;
}
.faq-item[open] { border-color: rgba(249,129,37,.45); }
.faq-item summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 0; font-weight: 500; font-size: 16px; color: var(--white);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; flex-shrink: 0;
  font-family: var(--mono); font-size: 22px; line-height: 1; color: var(--orange);
  transition: transform .2s ease;
}
.faq-item[open] summary::after { content: '\2212'; }
.faq-a {
  padding: 0 0 20px; font-size: 14.5px; line-height: 1.85; color: var(--blue-pale);
}

/* ===== ARTICLE / COLUMN ===== */
.article { padding-top: 48px; padding-bottom: 24px; }
.article-wrap { width: 100%; max-width: 760px; margin-inline: auto; padding-inline: var(--gutter); }
.breadcrumb { font-family: var(--mono); font-size: 12px; color: var(--gray); margin-bottom: 20px; display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb a { color: var(--blue-pale); }
.breadcrumb a:hover { color: var(--orange-lt); }
.article-head { margin-bottom: 28px; }
.article-cover { width: 100%; height: auto; display: block; border-radius: var(--radius); border: 1px solid rgba(91,132,196,.18); margin-bottom: 40px; }
.article h1 { font-size: clamp(27px, 4vw, 40px); line-height: 1.28; margin: 6px 0 16px; }
.article-meta { font-family: var(--mono); font-size: 12.5px; color: var(--gray); display: flex; gap: 16px; flex-wrap: wrap; }
.article-body > * + * { margin-top: 20px; }
.article-body h2 { font-size: clamp(20px, 2.6vw, 26px); line-height: 1.35; margin-top: 52px; }
.article-body h3 { font-size: 18px; margin-top: 32px; }
.article-body p, .article-body li { font-size: 16px; line-height: 1.95; color: var(--blue-pale); }
.article-body strong { color: var(--white); font-weight: 500; }
.article-body ul, .article-body ol { padding-left: 1.35em; }
.article-body li + li { margin-top: 8px; }
.article-body a { color: var(--orange-lt); text-decoration: underline; text-underline-offset: 3px; }
.callout { border-left: 4px solid var(--orange); background: rgba(249,129,37,.07); border-radius: 0 12px 12px 0; padding: 18px 22px; }
.callout .callout-label { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); margin-bottom: 8px; }
.callout p { margin: 0; }
.sources { margin-top: 56px; border-top: 1px solid rgba(91,132,196,.18); padding-top: 24px; }
.sources h2 { font-size: 13px; font-family: var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--gray); margin: 0 0 14px; }
.sources ol { padding-left: 1.3em; }
.sources li { font-size: 13px; color: var(--gray); line-height: 1.7; }
.article-cta { margin-top: 52px; background: rgba(22,32,53,.65); border: 1px solid rgba(91,132,196,.18); border-radius: var(--radius); padding: clamp(26px, 4vw, 40px); text-align: center; }
.article-cta h2 { margin: 0 0 10px; }
.article-cta p { color: var(--blue-pale); margin: 0 0 22px; }

/* column index */
.col-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.col-card { display: block; background: rgba(22,32,53,.65); border: 1px solid rgba(91,132,196,.18); border-radius: var(--radius); padding: 24px 26px; transition: border-color .2s ease, transform .2s ease; }
.col-card:hover { border-color: rgba(249,129,37,.45); transform: translateY(-2px); }
.col-card .col-tag { display: inline-block; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); margin-bottom: 10px; }
.col-card h2 { font-size: 19px; line-height: 1.4; margin: 0 0 8px; }
.col-card p { font-size: 14px; color: var(--blue-pale); margin: 0; }

/* ===== ABOUT ===== */
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 64px); align-items: center; }
.about-points { display: flex; flex-direction: column; gap: 14px; }
.about-point {
  display: flex; gap: 16px; align-items: flex-start;
  background: rgba(22,32,53,.55);
  border: 1px solid rgba(91,132,196,.18);
  border-left: 3px solid rgba(91,132,196,.4);
  border-radius: 0 12px 12px 0; padding: 18px 22px;
}
.about-point:hover { border-left-color: var(--orange); }
.about-point .ap-title { font-size: 15px; font-weight: 500; margin-bottom: 4px; }
.about-point .ap-body { font-size: 13.5px; color: var(--blue-pale); }

/* ===== CHANNEL ===== */
.episode-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.episode {
  display: flex; flex-direction: column;
  background: rgba(22,32,53,.65);
  border: 1px solid rgba(91,132,196,.18);
  border-radius: 14px; overflow: hidden;
  transition: border-color .2s ease, transform .2s ease;
}
.episode:hover { border-color: rgba(249,129,37,.45); transform: translateY(-3px); }
.episode-thumb {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, rgba(44,89,157,.35), rgba(14,24,40,.9));
  display: flex; align-items: center; justify-content: center; color: var(--orange);
  border-bottom: 1px solid rgba(91,132,196,.18);
}
.episode-body { padding: 16px 18px; }
.episode .ep-tag { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; color: var(--gray); text-transform: uppercase; }
.episode .ep-title { font-size: 14.5px; font-weight: 400; color: var(--white); margin-top: 6px; line-height: 1.5; }
.channel-cta { margin-top: 38px; display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

/* ===== PAIN POINTS / INQUIRY HOOK ===== */
.pain-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 34px; }
.pain-item {
  display: flex; gap: 14px; align-items: flex-start;
  background: rgba(22,32,53,.5);
  border: 1px solid rgba(91,132,196,.16);
  border-radius: 12px; padding: 16px 20px;
  font-size: 14.5px; color: var(--blue-pale);
}
.pain-item iconify-icon { color: var(--orange); flex-shrink: 0; margin-top: 3px; }
.key-msg {
  background: rgba(249,129,37,.12);
  border: 1px solid rgba(249,129,37,.30);
  border-left: 4px solid var(--orange);
  border-radius: 0 10px 10px 0;
  padding: 16px 24px; font-size: 16px; font-weight: 500; color: var(--orange-lt);
  margin-bottom: 28px;
}

/* ===== CONTACT ===== */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: clamp(28px, 4vw, 40px); align-items: start; }
.contact-aside { max-width: 100%; }
.contact-aside .lead { margin-bottom: 0; white-space: nowrap; }
.contact-direct {
  background: rgba(22,32,53,.55); border: 1px solid rgba(91,132,196,.18);
  border-radius: 14px; padding: 22px 24px; display: flex; flex-direction: column; gap: 16px;
}
.contact-direct .cd-row { display: flex; align-items: center; gap: 14px; }
.contact-direct .cd-label { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--gray); margin-bottom: 2px; }
.contact-direct .cd-val { font-size: 15px; font-weight: 500; color: var(--blue-pale); }
.contact-direct a.cd-val:hover { color: var(--orange-lt); }

.form {
  background: rgba(22,32,53,.65);
  border: 1px solid rgba(91,132,196,.2);
  border-radius: var(--radius); padding: clamp(24px, 4vw, 38px);
  display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(20px, 3vw, 32px);
  align-content: start;
}
.field-full, .form .btn-primary, .form-status, .form-privacy { grid-column: 1 / -1; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 500; color: var(--white); margin-bottom: 7px; }
.field .req { color: var(--orange); margin-left: 4px; }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--sans); font-size: 15px; font-weight: 300;
  color: var(--white); background: rgba(6,11,20,.6);
  border: 1px solid rgba(91,132,196,.28); border-radius: 10px;
  padding: 12px 14px; transition: border-color .18s ease, box-shadow .18s ease;
}
.field input::placeholder, .field textarea::placeholder { color: var(--gray); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(249,129,37,.14);
}
.field textarea { resize: vertical; min-height: 120px; }
.field select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2395a3b5' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px;
}
/* honeypot */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form .btn-primary { width: 100%; justify-content: center; margin-top: 6px; }
.form-status { margin-top: 16px; font-size: 14px; border-radius: 10px; padding: 0; max-height: 0; overflow: hidden; transition: all .25s ease; }
.form-status.show { padding: 13px 16px; max-height: 120px; }
.form-status.ok { background: rgba(40,160,90,.14); border: 1px solid rgba(40,160,90,.4); color: rgba(170,235,195,.95); }
.form-status.err { background: rgba(200,70,70,.14); border: 1px solid rgba(200,70,70,.4); color: rgba(245,190,190,.95); }
.form-privacy { margin: 8px 0 20px; font-size: 12px; line-height: 1.7; color: var(--gray); }
.form-privacy a { color: var(--orange-lt); text-decoration: underline; }

/* ===== FOOTER ===== */
.site-footer {
  position: relative; z-index: 1;
  border-top: 1px solid rgba(91,132,196,.16);
  padding-block: 48px 32px;
  background: rgba(6,11,20,.6);
}
.footer-top { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; margin-bottom: 32px; }
.footer-brand { max-width: 440px; }
.footer-brand .wm-top { font-size: 18px; }
.footer-brand p { font-size: 13.5px; color: var(--gray); margin-top: 12px; }
.footer-cols { display: flex; gap: clamp(32px, 6vw, 64px); flex-wrap: wrap; }
.footer-col h4 { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gray); margin-bottom: 14px; font-weight: 500; }
.footer-col a, .footer-col span { display: block; font-size: 14px; color: var(--blue-pale); margin-bottom: 9px; }
.footer-col a:hover { color: var(--orange-lt); }
.footer-social { display: flex; gap: 14px; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(91,132,196,.28); color: var(--blue-pale);
  display: flex; align-items: center; justify-content: center; margin: 0;
  transition: border-color .18s ease, color .18s ease;
}
.footer-social a:hover { border-color: var(--orange); color: var(--orange); }
.footer-bottom {
  border-top: 1px solid rgba(91,132,196,.12); padding-top: 22px;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  font-size: 12px; color: var(--gray);
}

/* ===== REVEAL ANIMATION (progressive enhancement) =====
   Content is visible by default. Only when JS is active (.js on <html>)
   do we hide-then-reveal, so a JS failure never blanks the page. */
.reveal { transition: opacity .6s ease, transform .6s ease; }
.js .reveal { opacity: 0; transform: translateY(20px); }
.js .reveal.in { opacity: 1; transform: none; }

/* Staggered children — hero elements & card grids cascade in.
   Mirrors the video motion: ~0.5s fade-up, power2.out easing, ~0.1s stagger. */
.js .stagger > * {
  opacity: 0; transform: translateY(18px);
  transition: opacity .5s ease, transform .5s cubic-bezier(.22,.61,.36,1);
}
.js .stagger.in > * { opacity: 1; transform: none; }
.js .stagger.in > *:nth-child(1) { transition-delay: .02s; }
.js .stagger.in > *:nth-child(2) { transition-delay: .12s; }
.js .stagger.in > *:nth-child(3) { transition-delay: .22s; }
.js .stagger.in > *:nth-child(4) { transition-delay: .32s; }
.js .stagger.in > *:nth-child(5) { transition-delay: .42s; }
.js .stagger.in > *:nth-child(6) { transition-delay: .52s; }
.js .stagger.in > *:nth-child(7) { transition-delay: .62s; }
.js .stagger.in > *:nth-child(8) { transition-delay: .72s; }

/* Slow, subtle background-glow drift (decorative). */
@keyframes glow-drift-a { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-3%, 2.5%); } }
@keyframes glow-drift-b { 0%,100% { transform: translate(0,0); } 50% { transform: translate(3%, -2.5%); } }
.bg-glow::before { animation: glow-drift-a 26s ease-in-out infinite; }
.bg-glow::after  { animation: glow-drift-b 32s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .js .reveal,
  .js .stagger > * { opacity: 1; transform: none; transition: none; }
  .bg-glow::before, .bg-glow::after { animation: none; }
  .btn:hover, .card:hover, .episode:hover { transform: none; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 920px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .episode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-grid { gap: 36px; }
  .contact-aside .lead { white-space: normal; }
}
/* Collapse nav links into the hamburger before they wrap (~988px).
   The language toggle stays visible at every width. */
@media (max-width: 992px) {
  .nav-links { display: none; }
  .nav { gap: 10px; }
  .nav > .btn { display: none; } /* header CTA redundant with the menu + hero CTA */
  .menu-toggle { display: inline-flex; padding: 9px; margin-right: -9px; } /* 44x44 tap target */
  .nav.open .nav-links {
    display: flex; flex-direction: column; gap: 4px;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: rgba(6,11,20,.97); border-bottom: 1px solid rgba(91,132,196,.18);
    padding: 12px var(--gutter) 20px;
  }
  .nav.open .nav-links a { padding: 10px 0; border-bottom: 1px solid rgba(91,132,196,.1); }
}
@media (max-width: 760px) {
  .wm-sub { display: none; }
}
@media (max-width: 560px) {
  .grid-3, .grid-2, .episode-grid, .pain-list { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
  .hero-cta .btn { flex: 1 1 100%; justify-content: center; }
}
