/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg: #0e0b09;
  --bg-2: #15110e;
  --bg-3: #1e1813;
  --cream: #f2ebda;
  --cream-2: #ddd2bc;
  --cream-3: #8b7e68;
  --red: #d3222b;
  --red-2: #a8191f;
  --gold: #c9a24e;
  --line: rgba(242, 235, 218, .12);
  --serif: "Barlow Condensed", "Arial Narrow", "Impact", sans-serif;
  --sans: "Inter", system-ui, sans-serif;
  --jp: "Noto Serif JP", "Yu Mincho", serif;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --nav-h: 112px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
@property --mesh-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font-family: var(--sans); font-size: 16px; line-height: 1.65; background: var(--bg); color: var(--cream); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; list-style: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.02; letter-spacing: -.02em; text-wrap: balance; font-variation-settings: "SOFT" 60; }
em { font-style: italic; }
::selection { background: var(--red); color: var(--cream); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
html.menu-open, html.menu-open body { overflow: hidden; }

/* =============================================================
   3. Utilities
   ============================================================= */
.skip-link { position: fixed; top: -100px; left: 1rem; padding: .6rem 1rem; background: var(--cream); color: var(--bg); z-index: 9999; border-radius: 8px; font-weight: 500; }
.skip-link:focus { top: 1rem; }
.wrap { width: min(1280px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.eyebrow { display: inline-flex; align-items: center; gap: .8rem; font-size: .72rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.eyebrow::before { content: ""; width: 34px; height: 1px; background: var(--red); }
.h2 { font-size: clamp(2.3rem, 5.6vw, 5rem); margin-top: 1rem; max-width: 18ch; }
.h2 em, .app-title em { color: var(--red); }
.h2.big { max-width: 14ch; }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--cream-2); max-width: 62ch; margin-top: 1.4rem; }
.section-head { margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.section-intro { max-width: 58ch; margin-top: 1.2rem; color: var(--cream-2); }
section { position: relative; }
section.wrap, .founder, .quote, .calendar, .contact, .moments { padding-block: clamp(5rem, 10vw, 9rem); }
.moments { padding-block: 0; }

.btn { display: inline-flex; align-items: center; gap: .6rem; padding: 1rem 1.8rem; border-radius: 999px; font-weight: 600; font-size: .92rem; letter-spacing: .02em; transition: transform .4s var(--ease), background .3s, color .3s, border-color .3s, box-shadow .4s var(--ease); }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 10px 30px -10px rgba(211, 34, 43, .7); }
.btn-primary:hover { transform: translateY(-3px); background: #e0323b; box-shadow: 0 16px 36px -10px rgba(211, 34, 43, .9); }
.btn-ghost { border: 1px solid rgba(242, 235, 218, .35); color: var(--cream); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-3px); }

/* Reveal (content visible without JS) */
.js [data-reveal] { opacity: 0; transform: translateY(34px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* =============================================================
   4. Splash + progress
   ============================================================= */
.splash { position: fixed; inset: 0; z-index: 9000; background: var(--bg); display: grid; place-items: center; animation: splashSafety .01s 4.5s forwards; transition: transform .9s var(--ease), opacity .6s; }
.splash-inner { display: grid; justify-items: center; gap: .8rem; }
.splash-inner img { width: 120px; height: 120px; animation: spinIn 1.6s var(--ease) both; }
.splash-glyph { font-family: var(--jp); font-weight: 900; font-size: 2.6rem; color: var(--red); letter-spacing: .3em; margin-right: -.3em; }
.splash-name { font-size: .7rem; letter-spacing: .4em; text-transform: uppercase; color: var(--cream-3); }
.splash.is-out { transform: translateY(-100%); opacity: 0; pointer-events: none; }
@keyframes spinIn { from { transform: rotate(-140deg) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes splashSafety { to { opacity: 0; pointer-events: none; transform: translateY(-100%); } }
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 80; pointer-events: none; }
.progress i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--red), var(--gold)); transform-origin: left; transform: scaleX(0); }

/* =============================================================
   5. Nav
   ============================================================= */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 70; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: .9rem var(--gutter); transition: padding .4s var(--ease); }
.nav::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(14, 11, 9, .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); opacity: 0; transition: opacity .4s; pointer-events: none; }
.nav.is-solid { padding-block: .5rem; }
.nav.is-solid::before, .app-page .nav::before { opacity: 1; }
.brand { display: inline-flex; align-items: center; gap: .8rem; }
.brand-seal { width: 78px; height: 78px; border-radius: 50%; transition: transform .6s var(--ease), width .4s, height .4s; }
.brand:hover .brand-seal { transform: rotate(18deg); }
.nav.is-solid .brand-seal { width: 66px; height: 66px; }
.brand-text { display: grid; line-height: 1; }
.brand-text b { font-family: var(--serif); font-weight: 800; font-size: 1.4rem; letter-spacing: .06em; }
.brand-text small { font-size: .58rem; letter-spacing: .34em; text-transform: uppercase; color: var(--gold); margin-top: .25rem; }
.nav-links { display: flex; align-items: center; gap: 1.6rem; font-size: .84rem; font-weight: 500; }
.nav-links > a:not(.nav-cta), .sub-toggle { position: relative; padding-block: .3rem; opacity: .82; transition: opacity .3s; }
.nav-links > a:not(.nav-cta)::after, .sub-toggle::after { content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%; background: var(--red); transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.nav-links > a:not(.nav-cta):hover, .sub-toggle:hover, .has-sub.is-current .sub-toggle { opacity: 1; }
.nav-links > a:not(.nav-cta):hover::after, .sub-toggle:hover::after, .has-sub.is-current .sub-toggle::after { transform: scaleX(1); transform-origin: left; }
.nav-cta { padding: .6rem 1.3rem; border-radius: 999px; background: var(--red); color: #fff; font-weight: 600; transition: background .3s, transform .4s var(--ease); }
.nav-cta:hover { background: #e0323b; transform: translateY(-2px); }

.has-sub { position: relative; }
.sub-toggle { display: inline-flex; align-items: center; gap: .45rem; }
.sub-toggle i { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .3s var(--ease); }
.has-sub.is-open .sub-toggle i { transform: rotate(225deg) translateY(-2px); }
.sub { position: absolute; top: calc(100% + 14px); left: 50%; min-width: 230px; transform: translate(-50%, 8px); padding: .5rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 50px -16px rgba(0, 0, 0, .8); opacity: 0; visibility: hidden; transition: opacity .3s, transform .4s var(--ease), visibility .3s; }
.sub::before { content: ""; position: absolute; inset: -16px 0 auto 0; height: 16px; }
.has-sub.is-open .sub { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.sub a { display: block; padding: .7rem 1rem; border-radius: 9px; font-size: .86rem; opacity: .85; transition: background .25s, color .25s, opacity .25s; }
.sub a:hover, .sub a[aria-current="page"] { background: rgba(211, 34, 43, .16); color: #fff; opacity: 1; }

.nav-toggle { display: none; width: 44px; height: 44px; position: relative; z-index: 3; }
.nav-toggle span { position: absolute; left: 10px; right: 10px; height: 1.5px; background: var(--cream); transition: transform .4s var(--ease); }
.nav-toggle span:first-child { top: 18px; } .nav-toggle span:last-child { top: 25px; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* =============================================================
   6. Hero
   ============================================================= */
.hero { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: space-between; padding-top: calc(var(--nav-h) + 2rem); overflow: clip; isolation: isolate; background: var(--bg); }
.hero-media { position: absolute; inset: 0; z-index: -4; }
.hero-media video { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.05) contrast(1.05); }
.hero-tint { position: absolute; inset: 0; z-index: -3; background: linear-gradient(180deg, rgba(14, 11, 9, .62) 0%, rgba(14, 11, 9, .28) 38%, rgba(14, 11, 9, .55) 70%, rgba(14, 11, 9, .98) 100%); }
.hero-mesh { position: absolute; inset: -25%; z-index: -2; background: conic-gradient(from var(--mesh-angle) at 70% 40%, rgba(211, 34, 43, .38), transparent 28%, rgba(201, 162, 78, .2) 52%, transparent 74%, rgba(211, 34, 43, .3)); filter: blur(80px); mix-blend-mode: screen; animation: meshSpin 30s linear infinite; opacity: .8; }
@keyframes meshSpin { to { --mesh-angle: 360deg; } }
.hero-grain { position: absolute; inset: 0; z-index: -1; opacity: .09; mix-blend-mode: overlay; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E"); }
.hero-inner { width: min(1100px, 100% - 2 * var(--gutter)); margin-inline: auto; text-align: center; display: grid; justify-items: center; padding-block: 2rem 3rem; }
.hero-meta { display: inline-flex; align-items: center; gap: .7rem; font-size: .72rem; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--cream-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(211, 34, 43, .7); } 70% { box-shadow: 0 0 0 12px rgba(211, 34, 43, 0); } 100% { box-shadow: 0 0 0 0 rgba(211, 34, 43, 0); } }
.hero-glyph { font-family: var(--jp); font-weight: 900; font-size: clamp(3.4rem, 9vw, 7.5rem); line-height: 1; color: var(--red); letter-spacing: .22em; margin: 1.4rem -.22em 0 0; text-shadow: 0 6px 40px rgba(0, 0, 0, .55); will-change: transform; }
.hero-title { font-size: clamp(3.2rem, 11vw, 10rem); line-height: .9; margin-top: .6rem; font-weight: 700; text-shadow: 0 8px 50px rgba(0, 0, 0, .5); }
.hero-title em { color: var(--cream); font-weight: 500; }
.hero-lead { max-width: 56ch; margin-top: 1.6rem; font-size: clamp(1rem, 1.35vw, 1.2rem); color: var(--cream-2); text-shadow: 0 2px 20px rgba(0, 0, 0, .7); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .9rem; margin-top: 2.2rem; }
.hero-foot { width: min(1280px, 100% - 2 * var(--gutter)); margin-inline: auto; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.hero-stat { padding: 1.4rem 1rem 1.8rem; display: grid; gap: .25rem; border-left: 1px solid var(--line); }
.hero-stat:first-child { border-left: 0; padding-left: 0; }
.hero-stat b { font-family: var(--serif); font-weight: 700; font-size: clamp(1.8rem, 3.4vw, 3rem); line-height: 1; color: var(--cream); }
.hero-stat span { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--cream-3); }

.marquee { border-block: 1px solid var(--line); overflow: hidden; background: var(--bg-2); padding: 1.1rem 0; }
.marquee-track { display: flex; width: max-content; gap: 2.5rem; animation: marquee 45s linear infinite; }
.marquee-track span { font-family: var(--serif); font-style: italic; font-size: 1.5rem; color: var(--cream-3); white-space: nowrap; display: inline-flex; align-items: center; gap: 2.5rem; }
.marquee-track span::after { content: "空"; font-family: var(--jp); font-style: normal; font-size: .9rem; color: var(--red); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* =============================================================
   7. Founder
   ============================================================= */
.founder { background: var(--bg-2); overflow: clip; }
.founder-bg { position: absolute; right: -1vw; top: 2rem; pointer-events: none; z-index: 0; }
.founder-bg span { display: block; writing-mode: vertical-rl; font-family: var(--jp); font-weight: 900; font-size: clamp(8rem, 24vw, 22rem); line-height: .9; color: transparent; -webkit-text-stroke: 1px rgba(242, 235, 218, .08); letter-spacing: .05em; }
.founder-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
.founder-fig { position: relative; margin: 0 auto; width: min(100%, 440px); }
.founder-fig::before { content: ""; position: absolute; inset: -6% -16% 8% -16%; z-index: 0; background: radial-gradient(closest-side, rgba(211, 34, 43, .38), transparent 72%); pointer-events: none; }
.founder-frame { position: relative; z-index: 1; aspect-ratio: 768 / 1376; border-radius: 22px; overflow: hidden; border: 1px solid rgba(201, 162, 78, .5); box-shadow: 0 0 0 10px rgba(201, 162, 78, .06), 0 40px 90px -30px rgba(0, 0, 0, .95); background: var(--bg-3); }
.founder-frame img { width: 100%; height: 100%; object-fit: cover; }
.founder-frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(14, 11, 9, .45), transparent 28%); pointer-events: none; }
.founder-fig figcaption { position: relative; z-index: 2; margin-top: 1.2rem; text-align: center; font-family: var(--serif); font-size: 1.3rem; }
.founder-fig figcaption small { display: block; margin-top: .2rem; font-family: var(--sans); font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.founder-copy > p:not(.eyebrow):not(.lead) { margin-top: 1rem; color: var(--cream-2); max-width: 64ch; }
.timeline { margin-top: 2rem; border-left: 1px solid var(--line); display: grid; gap: 1.1rem; padding-left: 1.6rem; }
.timeline li { position: relative; display: grid; grid-template-columns: 4.5rem 1fr; gap: 1rem; align-items: baseline; }
.timeline li::before { content: ""; position: absolute; left: -1.6rem; top: .6rem; width: 9px; height: 9px; border-radius: 50%; background: var(--red); transform: translateX(-4.5px); box-shadow: 0 0 0 4px var(--bg-2); }
.timeline b { font-family: var(--serif); font-size: 1.3rem; color: var(--gold); }
.timeline span { color: var(--cream-2); }
.honors { position: relative; z-index: 1; margin-top: clamp(3rem, 6vw, 5rem); padding-top: 2.5rem; border-top: 1px solid var(--line); }
.honors-title { font-size: 1.6rem; margin-bottom: 1.4rem; }
.honors-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .9rem 2rem; }
.honors-list li { position: relative; padding-left: 1.5rem; color: var(--cream-2); font-size: .95rem; }
.honors-list li::before { content: ""; position: absolute; left: 0; top: .55rem; width: 8px; height: 8px; transform: rotate(45deg); background: var(--red); }
.masters { margin-top: 2rem; color: var(--cream-3); font-size: .9rem; max-width: 90ch; }
.masters b { color: var(--cream-2); font-weight: 600; }

/* Quote */
.quote { overflow: clip; text-align: center; }
.quote-bg { position: absolute; inset: 0; background: linear-gradient(rgba(14, 11, 9, .8), rgba(14, 11, 9, .86)), url("assets/img/dojo-sunset.webp") center / cover; z-index: 0; }
.quote blockquote { position: relative; z-index: 1; max-width: 980px; margin-inline: auto; }
.quote p { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(1.7rem, 4.4vw, 3.6rem); line-height: 1.15; letter-spacing: -.01em; }
.quote cite { display: block; margin-top: 1.6rem; font-style: normal; font-size: .75rem; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }

/* =============================================================
   8. Disciplines
   ============================================================= */
.flips { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
.flip { position: relative; aspect-ratio: 3 / 4; perspective: 1400px; text-align: left; }
.flip-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 1s var(--ease); }
@media (hover: hover) { .flip:hover .flip-inner { transform: rotateY(180deg); } }
.flip.is-flipped .flip-inner { transform: rotateY(180deg); }
.flip-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 18px; border: 1px solid var(--line); padding: 1.6rem; display: flex; flex-direction: column; justify-content: flex-end; gap: .4rem; overflow: hidden; }
.flip-front { background: var(--bg-2); padding: 0; }
.flip-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.flip-front::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(14, 11, 9, .9) 0%, rgba(14, 11, 9, .15) 55%, rgba(211, 34, 43, .22) 100%); pointer-events: none; }
.flip-front > b, .flip-front > small { position: relative; z-index: 2; margin-inline: 1.5rem; }
.flip-front > small { margin-bottom: 1.5rem; }
.flip-glyph { position: absolute; top: 1.1rem; right: 1.2rem; font-family: var(--jp); font-weight: 900; font-size: clamp(2.4rem, 4.4vw, 4.4rem); line-height: 1; color: var(--cream); text-shadow: 0 2px 22px rgba(0, 0, 0, .75), 0 0 2px rgba(211, 34, 43, .9); z-index: 2; white-space: nowrap; }
.flip-front b { font-family: var(--serif); font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 600; }
.flip-front small { font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.flip-back { transform: rotateY(180deg); background: var(--red); border-color: var(--red); justify-content: center; }
.flip-back b { font-family: var(--serif); font-size: 1.5rem; margin-bottom: .4rem; }
.flip-back span { font-size: .95rem; line-height: 1.55; color: rgba(255, 255, 255, .92); }
.reel { position: relative; margin: clamp(2.5rem, 5vw, 4rem) 0 0; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 9; background: #000; }
.reel video { width: 100%; height: 100%; object-fit: cover; }
.reel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(14, 11, 9, .85), transparent 45%); pointer-events: none; }
figcaption.x, .reel figcaption, .slide figcaption { position: absolute; left: clamp(1rem, 3vw, 2.2rem); bottom: clamp(1rem, 3vw, 2rem); z-index: 2; display: grid; gap: .1rem; }
.slide-n { font-size: .7rem; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.reel figcaption b, .slide figcaption b { font-family: var(--serif); font-size: clamp(1.4rem, 2.6vw, 2.2rem); font-weight: 600; }
.reel figcaption em, .slide figcaption em { font-size: .9rem; color: var(--cream-2); font-style: normal; }

/* =============================================================
   9. Moments (auto carousel — page keeps scrolling normally)
   ============================================================= */
.moments { padding-block: clamp(4rem, 9vw, 7rem) clamp(3rem, 6vw, 5rem); background: var(--bg); }
.moments-head { margin-bottom: clamp(1.8rem, 4vw, 3rem); }
.moments-head .h2 { max-width: none; }
.moments-hint { margin-top: .9rem; color: var(--cream-3); font-size: .85rem; }
.carousel { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.carousel::-webkit-scrollbar { display: none; }
.carousel-track { display: flex; gap: clamp(1rem, 2.4vw, 1.8rem); width: max-content; padding: .4rem var(--gutter); }
.slide { position: relative; flex: 0 0 auto; width: clamp(280px, 38vw, 560px); aspect-ratio: 3 / 2; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-3); padding: 0; text-align: left; cursor: zoom-in; transition: border-color .3s, transform .6s var(--ease); }
.slide:hover { border-color: var(--red); transform: translateY(-4px); }
.slide img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.slide:hover img { transform: scale(1.05); }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(14, 11, 9, .8), transparent 50%); pointer-events: none; }
.slide-cap { position: absolute; left: 1.1rem; bottom: .9rem; z-index: 2; display: grid; gap: .1rem; }
.slide-cap b { font-family: var(--serif); font-size: clamp(1.1rem, 2vw, 1.6rem); font-weight: 600; }
.slide-cap em { font-size: .82rem; color: var(--cream-2); font-style: normal; }

/* =============================================================
   10. Dojos
   ============================================================= */
.dojos-grid { display: grid; grid-template-columns: 1fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
.sedes { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.sedes li { display: inline-flex; align-items: baseline; gap: .5rem; padding: .45rem .9rem; border: 1px solid var(--line); border-radius: 999px; font-size: .8rem; transition: border-color .3s, background .3s; }
.sedes li:hover { border-color: var(--red); background: rgba(211, 34, 43, .1); }
.sedes b { font-weight: 600; color: var(--cream); }
.sedes span { color: var(--gold); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.dojo-logos { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2.4vw, 1.8rem); }
.dojo { margin: 0; text-align: center; }
.dojo-badge { aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--cream); display: grid; place-items: center; border: 3px solid var(--bg-3); box-shadow: 0 0 0 1px var(--line), 0 20px 40px -20px rgba(0, 0, 0, .8); transition: transform .6s var(--ease), box-shadow .6s var(--ease); }
.dojo:hover .dojo-badge { transform: translateY(-6px) rotate(-3deg); box-shadow: 0 0 0 2px var(--red), 0 26px 50px -18px rgba(211, 34, 43, .55); }
.dojo-badge img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dojo figcaption { margin-top: .9rem; font-size: .82rem; color: var(--cream-2); line-height: 1.3; }

/* =============================================================
   11. Calendar
   ============================================================= */
.calendar { background: var(--bg-2); }
.cal-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.cal-card { position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); transition: transform .6s var(--ease), box-shadow .6s var(--ease), border-color .3s; background: var(--bg-3); }
.cal-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease), filter .6s; filter: saturate(.9); }
.cal-card:hover { transform: translateY(-6px); border-color: var(--red); box-shadow: 0 26px 50px -20px rgba(211, 34, 43, .5); }
.cal-card:hover img { transform: scale(1.06); filter: saturate(1.1); }
.cal-card span { position: absolute; right: .7rem; bottom: .7rem; padding: .25rem .7rem; border-radius: 999px; background: rgba(14, 11, 9, .8); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; }
.points { margin-top: clamp(3rem, 6vw, 5rem); display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center; padding: clamp(1.4rem, 3vw, 2.4rem); border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(135deg, rgba(211, 34, 43, .12), transparent 60%), var(--bg-3); }
.points h3 { font-size: clamp(1.8rem, 3.4vw, 2.8rem); margin: .8rem 0 1rem; }
.points p:not(.eyebrow) { color: var(--cream-2); margin-bottom: 1.6rem; max-width: 46ch; }
.points-img { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); transition: transform .6s var(--ease); }
.points-img:hover { transform: scale(1.015); }
.points-img img { width: 100%; }

/* =============================================================
   12. Referees
   ============================================================= */
.refs-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(.9rem, 2vw, 1.6rem); }
.ref { position: relative; }
.ref-photo { position: relative; aspect-ratio: 589 / 909; border-radius: 16px; overflow: hidden; background: var(--bg-3); border: 1px solid var(--line); transition: transform .6s var(--ease), border-color .3s, box-shadow .6s var(--ease); }
.ref-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.55) contrast(1.05); transition: filter .6s, transform 1s var(--ease); }
.ref:hover .ref-photo { transform: translateY(-6px); border-color: var(--red); box-shadow: 0 26px 50px -22px rgba(211, 34, 43, .55); }
.ref:hover .ref-photo img { filter: none; transform: scale(1.04); }
.ref-ph { width: 100%; height: 100%; display: grid; place-items: center; background: radial-gradient(90% 70% at 50% 0%, rgba(211, 34, 43, .3), transparent 70%), repeating-linear-gradient(135deg, rgba(242, 235, 218, .035) 0 10px, transparent 10px 20px), var(--bg-3); }
.ref-ph span { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(3rem, 7vw, 5rem); color: var(--cream-3); letter-spacing: -.03em; }
.ref h3 { margin-top: .9rem; font-size: clamp(.95rem, 1.5vw, 1.15rem); line-height: 1.15; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
.ref ul { margin-top: .4rem; display: grid; gap: .15rem; }
.ref li { font-size: .72rem; letter-spacing: .06em; color: var(--gold); text-transform: uppercase; line-height: 1.35; }

/* =============================================================
   13. Contact
   ============================================================= */
.contact { overflow: clip; }
.contact-bg { position: absolute; inset: 0; z-index: 0; background: linear-gradient(90deg, rgba(14, 11, 9, .96) 0%, rgba(14, 11, 9, .82) 55%, rgba(14, 11, 9, .6) 100%), url("assets/img/dojo-sunset.webp") center / cover; }
.contact-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.contact-list { margin-top: 2.2rem; display: grid; gap: .8rem; }
.contact-list a { display: flex; align-items: center; gap: 1rem; padding: .9rem 1.1rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(14, 11, 9, .55); transition: border-color .3s, transform .5s var(--ease), background .3s; }
.contact-list a:hover { border-color: var(--red); transform: translateX(6px); background: rgba(211, 34, 43, .1); }
.contact-list svg { width: 26px; height: 26px; flex: none; fill: none; stroke: var(--red); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.contact-list span { display: grid; line-height: 1.25; font-weight: 500; word-break: break-word; }
.contact-list small { font-size: .66rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.form { display: grid; gap: 1.2rem; padding: clamp(1.4rem, 3vw, 2.4rem); border: 1px solid var(--line); border-radius: 24px; background: rgba(21, 17, 14, .92); box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .9); }
.form h3 { font-size: 1.8rem; }
.form label span { display: block; font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--cream-3); margin-bottom: .35rem; font-weight: 600; }
.form input, .form textarea { width: 100%; background: transparent; border: 0; border-bottom: 1px solid rgba(242, 235, 218, .25); color: var(--cream); font: inherit; font-size: 1.05rem; padding: .6rem 0; resize: vertical; transition: border-color .3s; }
.form input:focus, .form textarea:focus { outline: 0; border-color: var(--red); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.form .btn { justify-self: start; }
.form-msg { min-height: 1.5em; font-size: .95rem; color: var(--gold); }
.form-msg.err { color: #ff8b7a; }
.form.is-sent .btn { background: #1f7a45; box-shadow: none; }

/* =============================================================
   14. Footer
   ============================================================= */
.footer { background: #0a0807; border-top: 1px solid var(--line); padding-top: clamp(3rem, 6vw, 5rem); }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem 2rem; }
.footer-brand { grid-column: 1 / -1; }
.footer-seals { display: flex; gap: 1rem; }
.footer-seals img { width: 84px; height: 84px; border-radius: 50%; }
.footer-brand p { margin-top: 1rem; color: var(--cream-3); max-width: 38ch; font-size: .9rem; }
.footer-col { display: grid; align-content: start; gap: .55rem; }
.footer-col h4 { font-family: var(--sans); font-size: .68rem; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); margin-bottom: .5rem; font-weight: 600; }
.footer-col a { color: var(--cream-2); font-size: .9rem; word-break: break-word; transition: color .25s; }
.footer-col a:hover { color: var(--red); }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: clamp(2.5rem, 5vw, 4rem); padding-block: 1.6rem; border-top: 1px solid var(--line); font-size: .78rem; color: var(--cream-3); }
.footer-base a:hover { color: var(--red); }

/* =============================================================
   15. App pages
   ============================================================= */
.app-page { background: var(--bg); }
.app-head { padding: calc(var(--nav-h) + 3rem) 0 2rem; background: radial-gradient(70% 120% at 85% 0%, rgba(211, 34, 43, .18), transparent 60%), var(--bg); border-bottom: 1px solid var(--line); }
.app-head-inner { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1.6rem; }
.app-title { font-size: clamp(2rem, 4.6vw, 3.8rem); margin-top: .8rem; }
.app-desc { margin-top: .8rem; max-width: 60ch; color: var(--cream-2); }
.app-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.app-frame { position: relative; padding-block: 1.5rem 3.5rem; height: calc(100vh - 140px); height: calc(100svh - 140px); min-height: 680px; }
.app-frame iframe { width: 100%; height: 100%; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .9); }
.app-loading { position: absolute; inset: 1.5rem 0 3.5rem; display: grid; place-content: center; justify-items: center; gap: .8rem; border-radius: 18px; background: var(--bg-2); color: var(--cream-3); font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; z-index: 2; transition: opacity .5s, visibility .5s; }
.app-loading i { width: 34px; height: 34px; border: 2px solid var(--line); border-top-color: var(--red); border-radius: 50%; animation: spin 0.9s linear infinite; }
.app-loading.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.app-page .footer { margin-top: 0; }

/* Lightbox (centered, full-screen feel) */
.lightbox { margin: auto; padding: 0; border: 0; background: transparent; width: fit-content; height: fit-content; max-width: 100vw; max-height: 100vh; overflow: visible; color: var(--cream); }
.lightbox::backdrop { background: rgba(5, 4, 3, .93); }
.lb-fig { position: relative; margin: 0; display: grid; place-items: center; }
.lb-fig img { display: block; max-width: min(96vw, 1700px); max-height: 86vh; width: auto; height: auto; border-radius: 12px; box-shadow: 0 40px 100px rgba(0, 0, 0, .8); }
.lb-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; background: var(--red); color: #fff; font-size: 1.8rem; line-height: 1; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0, 0, 0, .5); transition: transform .3s var(--ease), background .3s; }
.lb-close:hover { transform: rotate(90deg); background: #e0323b; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; background: rgba(14, 11, 9, .72); border: 1px solid rgba(242, 235, 218, .3); color: var(--cream); font-size: 2rem; line-height: 1; display: grid; place-items: center; padding-bottom: .2rem; transition: background .3s, border-color .3s; }
.lb-nav:hover { background: var(--red); border-color: var(--red); }
.lb-nav[hidden] { display: none; }
.lb-prev { left: 12px; } .lb-next { right: 12px; }
.lb-fig figcaption { position: absolute; left: 0; right: 0; bottom: -2.3rem; text-align: center; font-size: .85rem; letter-spacing: .04em; color: var(--cream-2); }
@media (max-width: 539px) { .lb-nav { width: 40px; height: 40px; } .lb-fig figcaption { bottom: -2rem; font-size: .78rem; } }

/* =============================================================
   16. Responsive
   ============================================================= */
@media (min-width: 540px) { .refs-grid { grid-template-columns: repeat(3, 1fr); } .cal-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 720px) { .flips { grid-template-columns: repeat(4, 1fr); } .footer-grid { grid-template-columns: repeat(4, 1fr); } .footer-brand { grid-column: auto; } }
@media (min-width: 960px) {
  .founder-grid { grid-template-columns: .85fr 1.15fr; }
  .dojos-grid { grid-template-columns: 1fr 1fr; }
  .points { grid-template-columns: .9fr 1.1fr; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .refs-grid { grid-template-columns: repeat(4, 1fr); }
  .cal-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1280px) { .refs-grid { grid-template-columns: repeat(5, 1fr); } }

@media (max-width: 959px) {
  :root { --nav-h: 96px; }
  .nav-toggle { display: block; }
  .nav-links { position: fixed; inset: 0; height: 100vh; height: 100dvh; flex-direction: column; justify-content: center; gap: 1.2rem; font-family: var(--serif); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 2.1rem; background: rgba(14, 11, 9, .985); opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s; overflow-y: auto; padding: 5rem 1rem 3rem; }
  .nav-links.is-open { opacity: 1; visibility: visible; }
  .nav-links > a:not(.nav-cta), .sub-toggle { opacity: 1; }
  .has-sub { text-align: center; }
  .sub { position: static; transform: none; opacity: 1; visibility: visible; display: none; margin-top: .6rem; background: transparent; border: 0; box-shadow: none; min-width: 0; padding: 0; }
  .sub::before { display: none; }
  .has-sub.is-open .sub { display: block; transform: none; }
  .sub a { font-family: var(--sans); font-size: 1rem; padding: .55rem 1rem; color: var(--cream-2); }
  .nav-cta { margin-top: .6rem; font-family: var(--sans); font-size: 1rem; }
  .hero-foot { grid-template-columns: repeat(2, 1fr); }
  .hero-stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .hero-stat { border-top: 1px solid var(--line); }
  .hero-stat:nth-child(-n + 2) { border-top: 0; }
}
@media (max-width: 539px) {
  .btn { width: 100%; justify-content: center; }
  .hero-actions { width: 100%; }
  .app-actions .btn { width: auto; }
  .founder-bg { opacity: .6; }
  .dojo-logos { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 3.6rem 1fr; }
}

/* =============================================================
   17. Reduced-motion (only INTRUSIVE effects)
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .hero-mesh { animation: none; }
  .marquee-track { animation-duration: 140s; }
  html { scroll-behavior: auto; }
}

.dojo-logos .dojo:last-child:nth-child(3n + 1) { grid-column: 2; }
@media (max-width: 539px) { .dojo-logos .dojo:last-child:nth-child(3n + 1) { grid-column: auto; } .dojo-logos .dojo:last-child:nth-child(2n + 1) { grid-column: 1 / -1; width: 50%; justify-self: center; } }

/* fixes */
.hero-stat b span { font: inherit; letter-spacing: inherit; text-transform: none; color: inherit; }
.app-frame { min-height: 760px; }
@media (max-width: 959px) { .app-frame { min-height: 640px; height: calc(100svh - 120px); } }

/* App pages: iframe grows to the app's full height (no inner scroll) */
.app-frame { height: auto; min-height: 0; }
.app-frame iframe { display: block; height: 720px; }
@media (max-width: 959px) { .app-frame { height: auto; min-height: 0; } }

/* =============================================================
   Aplicaciones en portada
   ============================================================= */
.apps-home { padding-block: clamp(4rem, 9vw, 8rem); background: var(--bg-2); border-block: 1px solid var(--line); }
.apps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: clamp(1rem, 2vw, 1.6rem); }
.app-card { position: relative; display: flex; flex-direction: column; gap: 1rem; padding: clamp(1.5rem, 3vw, 2.2rem); background: var(--bg-3); border: 1px solid var(--line); border-radius: 18px; transition: transform .5s var(--ease), border-color .3s, box-shadow .5s var(--ease); }
.app-card:hover { transform: translateY(-6px); border-color: var(--gold); box-shadow: 0 24px 50px -22px rgba(0, 0, 0, .9); }
.app-card-n { font-family: var(--serif); font-size: .85rem; letter-spacing: .24em; color: var(--red); }
.app-card h3 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); }
.app-card p { color: var(--cream-2); font-size: .95rem; }
.app-card p b { display: block; margin-bottom: .2rem; font-size: .68rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.app-card .btn { margin-top: auto; align-self: flex-start; }

/* =============================================================
   Tipografía deportiva (estilo calendario): gruesa, inclinada, mayúsculas
   Para volver a la letra romana: restaurar tools/respaldo-letra-romana/
   ============================================================= */
h1, h2, h3, h4, .brand-text b, .flip-front b, .flip-back b, .reel figcaption b, .slide figcaption b, .slide-cap b, .hero-stat b, .timeline b, .founder-fig figcaption, .app-card-n {
  font-style: italic; font-weight: 800; text-transform: uppercase; letter-spacing: .01em; font-variation-settings: normal; line-height: .95;
}
.h2 { font-size: clamp(2.8rem, 6.6vw, 5.8rem); max-width: 16ch; }
.hero-title { font-size: clamp(3.8rem, 13vw, 11.5rem); font-weight: 800; line-height: .88; }
.hero-title em, .h2 em { font-weight: 800; }
.hero-title em { color: var(--cream); }
.brand-text b { font-size: 1.7rem; letter-spacing: .04em; }
.hero-stat b { font-size: clamp(2.2rem, 4vw, 3.5rem); }
.flip-front b { font-size: clamp(2.2rem, 3.6vw, 3.1rem); }
.flip-back b { font-size: 1.8rem; }
.reel figcaption b, .slide figcaption b { font-size: clamp(1.7rem, 3.1vw, 2.7rem); }
.slide-cap b { font-size: clamp(1.4rem, 2.4vw, 2rem); }
.timeline b, .founder-fig figcaption { font-size: 1.6rem; }
.app-card h3 { font-size: clamp(1.9rem, 3vw, 2.4rem); }
.quote p { font-weight: 600; text-transform: uppercase; font-size: clamp(1.9rem, 4.6vw, 3.8rem); line-height: 1.05; letter-spacing: .01em; }
.marquee-track span { font-weight: 700; text-transform: uppercase; font-size: 1.7rem; letter-spacing: .04em; }
.ref-ph span { font-weight: 800; }

/* Título de portada en una sola línea */
.hero-title { white-space: nowrap; font-size: clamp(2.1rem, 10.2vw, 8.6rem); }
.hero-title span, .hero-title em { display: inline; }
/* Sello grande en portada */
.quote-seal { display: block; width: clamp(150px, 20vw, 240px); height: auto; margin: 0 auto 2.2rem; border-radius: 50%; filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .6)); }

/* Títulos en dos renglones: blanco arriba, rojo abajo */
.h2.two-lines { max-width: none; white-space: nowrap; font-size: clamp(1.7rem, 8.6vw, 5.8rem); }
.h2.two-lines em { display: block; }

/* Menú del teléfono: el botón «Aplicaciones» hereda la misma letra que el resto */
.sub-toggle { font: inherit; font-style: inherit; font-weight: inherit; text-transform: inherit; letter-spacing: inherit; color: inherit; }

@media (max-width: 959px) {
  .nav-links { justify-content: safe center; overflow-y: auto; gap: .3rem; padding: calc(var(--nav-h) + .5rem) 1.5rem 2rem; font-size: clamp(1.6rem, 6.2vw, 2rem); }
  .nav-links > a:not(.nav-cta), .sub-toggle { padding-block: .35rem; }
  .sub a { font-style: normal; font-weight: 500; text-transform: none; }
}

/* Dojos afiliados por ciudad */
.sedes-cities { margin-top: 2rem; display: grid; grid-template-columns: 1fr; gap: 1.6rem 2rem; }
.sede-city h4 { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 .6rem; padding-bottom: .45rem; border-bottom: 1px solid var(--line); color: var(--gold); font-size: .78rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.sede-city h4 small { color: var(--cream-2); font-size: .72rem; letter-spacing: .08em; }
.sede-city ul { display: grid; gap: .5rem; }
.sede-city li { display: flex; flex-direction: column; gap: .05rem; }
.sede-city li b { font-weight: 600; color: var(--cream); font-size: .9rem; line-height: 1.25; }
.sede-city li span { color: var(--cream-2); font-size: .76rem; }
@media (min-width: 540px) { .sedes-cities { grid-template-columns: 1fr 1fr; } }
