/* ===== IpponDojo website — design system ===== */
:root {
  --bg: #0B0C10;
  --bg-alt: #111319;
  --surface: rgba(22, 25, 34, 0.72);
  --surface-solid: #161922;
  --stroke: #272C38;
  --text: #F3F5FA;
  --dim: #9AA3B2;
  --faint: #636B7A;
  --red: #E5342F;
  --magenta: #FF477E;
  --gold: #F5C451;
  --mint: #3FD3B2;
  --blue: #5B8CFF;
  --violet: #8B6CFF;
  --radius: 20px;
  --maxw: 1120px;
}
[data-theme="light"] {
  --bg: #F4F6FB;
  --bg-alt: #ffffff;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-solid: #ffffff;
  --stroke: #E1E6EF;
  --text: #14161D;
  --dim: #5B6472;
  --faint: #98A1B2;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  transition: background .5s ease, color .5s ease;
}
#liquid { position: fixed; inset: 0; z-index: 0; width: 100vw; height: 100vh; }
section, header, footer { position: relative; z-index: 1; }
a { color: inherit; text-decoration: none; }
.muted { color: var(--dim); }
.grad-text {
  background: linear-gradient(120deg, var(--red), var(--magenta));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.grad-gold {
  background: linear-gradient(120deg, var(--gold), #E79A3B);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-weight: 800; letter-spacing: 1px;
}

/* ===== NAV ===== */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 18px;
  padding: 14px clamp(16px, 5vw, 48px);
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--stroke);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; }
.mark {
  width: 38px; height: 38px; border-radius: 12px; object-fit: cover;
  box-shadow: 0 6px 18px rgba(229,52,47,.4);
}
.brand-name { font-size: 18px; letter-spacing: .3px; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--dim); font-weight: 600; font-size: 14px; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: 18px; }
.lang {
  background: var(--surface-solid); color: var(--text);
  border: 1px solid var(--stroke); border-radius: 10px; padding: 7px 10px; font-weight: 600; cursor: pointer;
}
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; cursor: pointer; font-size: 16px;
  background: var(--surface-solid); border: 1px solid var(--stroke); color: var(--text);
  transition: transform .2s;
}
.icon-btn:hover { transform: translateY(-2px) rotate(-8deg); }
@media (max-width: 760px){ .nav-links{ display:none; } }

/* ===== buttons ===== */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 22px; border-radius: 14px; font-weight: 800; cursor: pointer; border: none; transition: transform .2s, box-shadow .2s; }
.btn-primary { background: linear-gradient(135deg, var(--red), var(--magenta)); color: #fff; box-shadow: 0 10px 28px rgba(229,52,47,.4); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(229,52,47,.5); }
.btn-ghost { background: var(--surface); border: 1px solid var(--stroke); color: var(--text); }
.btn-ghost:hover { transform: translateY(-3px); border-color: var(--gold); }

/* ===== glass card ===== */
.glass { background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--radius); backdrop-filter: blur(10px); box-shadow: 0 18px 40px rgba(0,0,0,.28); }

/* ===== HERO ===== */
.hero { max-width: var(--maxw); margin: 0 auto; padding: clamp(48px, 9vw, 110px) clamp(16px,5vw,48px) 40px; text-align: center; }
.pill { display: inline-block; padding: 8px 16px; border-radius: 20px; font-weight: 700; font-size: 13px; color: var(--gold); background: color-mix(in srgb, var(--gold) 14%, transparent); border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); }
.hero-title { font-size: clamp(44px, 9vw, 92px); font-weight: 900; margin: 18px 0 6px; display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; }
.logo-badge { width: clamp(56px,10vw,96px); height: clamp(56px,10vw,96px); border-radius: 26px; object-fit: cover; box-shadow: 0 16px 40px rgba(229,52,47,.5); animation: float 5s ease-in-out infinite; }
.logo-badge.big { width: 90px; height: 90px; border-radius: 28px; object-fit: cover; margin: 0 auto 14px; }
@keyframes float { 0%,100%{ transform: translateY(0) rotate(-3deg);} 50%{ transform: translateY(-12px) rotate(3deg);} }
.hero-tag { font-size: clamp(15px, 2.4vw, 20px); margin-bottom: 16px; }
.hero-sub { max-width: 620px; margin: 0 auto 28px; color: var(--dim); font-size: clamp(14px,2vw,17px); line-height: 1.6; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-stats { display: flex; gap: clamp(18px,5vw,54px); justify-content: center; margin-top: 46px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; align-items: center; }
.stat b { font-size: clamp(28px,5vw,44px); font-weight: 900; background: linear-gradient(135deg,var(--gold),var(--red)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--dim); font-size: 13px; font-weight: 600; }
.hero-ecg { max-width: 720px; margin: 40px auto 0; }
#ecg { width: 100%; height: 120px; }

/* ===== sections ===== */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(50px,9vw,100px) clamp(16px,5vw,48px); }
.section-head { text-align: center; margin-bottom: 44px; }
.kicker { font-weight: 800; letter-spacing: 2px; font-size: 12px; color: var(--red); }
.section-head h2 { font-size: clamp(28px,5vw,46px); font-weight: 900; margin-top: 8px; }
.section-sub { color: var(--dim); margin: 12px auto 0; max-width: 560px; line-height: 1.6; }

/* ===== features ===== */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.feature { padding: 26px; border-radius: var(--radius); position: relative; overflow: hidden; }
.feature .fi { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; margin-bottom: 16px; box-shadow: 0 10px 24px rgba(0,0,0,.25); }
.feature h3 { font-size: 19px; margin-bottom: 8px; }
.feature p { color: var(--dim); font-size: 14px; line-height: 1.55; }
.feature::after { content:""; position:absolute; right:-40px; top:-40px; width:120px; height:120px; border-radius:50%; background: currentColor; opacity:.06; }
.feature:hover { transform: translateY(-6px); box-shadow: 0 24px 50px rgba(0,0,0,.36); transition: transform .3s, box-shadow .3s; }

/* ===== puls ===== */
.puls-wrap { max-width: 860px; margin: 0 auto; }
.puls-head { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; padding: 22px; margin-bottom: 20px; position: relative; }
.heart { font-size: 44px; color: var(--red); filter: drop-shadow(0 0 12px rgba(229,52,47,.6)); animation: beat 1s ease-in-out infinite; }
@keyframes beat { 0%,60%,100%{ transform: scale(1);} 12%{ transform: scale(1.22);} 26%{ transform: scale(1.12);} }
.puls-max .label { font-size: 12px; font-weight: 700; letter-spacing: .5px; color: var(--dim); }
.puls-max b { font-size: 34px; font-weight: 900; }
.puls-max em { color: var(--dim); font-style: normal; font-size: 13px; }
.range { grid-column: 1 / -1; width: 100%; accent-color: var(--red); height: 6px; cursor: pointer; }
.zones { display: grid; gap: 12px; }
.zone { padding: 16px 18px; border-radius: 16px; }
.zone-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.zone-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; }
.zone-name { font-weight: 800; }
.zone-pct { font-size: 12px; }
.zone-range { margin-left: auto; font-weight: 900; }
.zone-range em { display: block; font-style: normal; font-size: 10px; color: var(--dim); font-weight: 600; text-align: right; }
.gauge { height: 12px; border-radius: 8px; background: var(--surface-solid); position: relative; overflow: hidden; border: 1px solid var(--stroke); }
.gauge-fill { position: absolute; top: 0; height: 100%; border-radius: 8px; transition: left .6s cubic-bezier(.2,.7,.2,1), width .6s cubic-bezier(.2,.7,.2,1); }
.gauge-mark { position: absolute; top: -3px; width: 2px; height: 18px; background: var(--gold); transition: left .6s; }

/* ===== matrix ===== */
.matrix { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.tile { border-radius: 16px; padding: 12px; min-height: 96px; display: flex; flex-direction: column; color: #fff; cursor: pointer; transition: transform .2s, box-shadow .2s; position: relative; overflow: hidden; }
.tile:hover { transform: translateY(-5px) scale(1.02); box-shadow: 0 16px 30px rgba(0,0,0,.4); }
.tile .code { font-weight: 900; font-size: 13px; letter-spacing: .5px; }
.tile .tname { margin-top: auto; font-size: 11.5px; font-weight: 600; line-height: 1.2; }

/* ===== motivation ===== */
.mot-wrap { display: grid; grid-template-columns: 320px 1fr; gap: 30px; align-items: center; }
#radar { max-width: 100%; margin: 0 auto; }
.subscales { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 12px; }
.sub { padding: 14px 16px; border-radius: 14px; border-left: 3px solid var(--red); }
.sub b { font-size: 15px; }
.sub p { color: var(--dim); font-size: 12.5px; margin-top: 4px; line-height: 1.45; }
@media (max-width: 720px){ .mot-wrap{ grid-template-columns: 1fr; } }

/* ===== roles ===== */
.roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 18px; }
.role { padding: 26px; border-radius: var(--radius); text-align: center; }
.role .ri { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; font-size: 30px; margin: 0 auto 16px; }
.role h3 { font-size: 20px; margin-bottom: 8px; }
.role p { color: var(--dim); font-size: 14px; line-height: 1.5; }

/* ===== cta ===== */
.cta { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(16px,5vw,48px) 40px; }
.cta-card { text-align: center; padding: clamp(36px,7vw,70px) 24px; border-radius: 30px; background: linear-gradient(135deg, color-mix(in srgb, var(--red) 22%, var(--bg)), color-mix(in srgb, var(--violet) 22%, var(--bg))); border: 1px solid var(--stroke); }
.cta-card h2 { font-size: clamp(26px,5vw,40px); font-weight: 900; }
.cta-card p { color: var(--dim); margin: 12px 0 24px; }

/* ===== footer ===== */
.footer { max-width: var(--maxw); margin: 0 auto; padding: 30px clamp(16px,5vw,48px) 50px; display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--stroke); color: var(--dim); font-size: 14px; flex-wrap: wrap; }

/* ===== download ===== */
.downloads { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; max-width: 760px; margin: 0 auto; }
.dl-card { display: flex; align-items: center; gap: 16px; padding: 22px; border-radius: var(--radius); transition: transform .25s, box-shadow .25s, border-color .25s; }
.dl-card:hover { transform: translateY(-5px); box-shadow: 0 22px 46px rgba(0,0,0,.35); border-color: var(--gold); }
.dl-ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; box-shadow: 0 10px 24px rgba(0,0,0,.25); }
.dl-card h3 { font-size: 17px; } .dl-card p { color: var(--dim); font-size: 13px; margin-top: 3px; }
.dl-arrow { margin-left: auto; font-size: 24px; color: var(--gold); animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(5px);} }
.dl-note { text-align: center; margin-top: 18px; font-size: 12.5px; max-width: 640px; margin-left: auto; margin-right: auto; }

/* ===== reveal ===== */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
