/* ==========================================================================
   The Platypus Order — main.css
   ========================================================================== */

:root {
  --orange: #D96628;
  --orange-dark: #C2561C;
  --ink: #212121;
  --ink-2: #2B2B2B;
  --gray-bg: #F4F4F4;
  --text-muted: #555555;
  --line: #E6E6E6;
  --light: #F5F5F5;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #FFFFFF;
  color: var(--ink);
  font-family: 'LINE Seed JP', 'Segoe UI', system-ui, sans-serif;
  overflow-wrap: break-word;
  hyphens: auto;
  -webkit-font-smoothing: antialiased;
}

img { display: block; }

a { color: var(--ink); }
a:hover { color: var(--orange); }

/* якоря не прячутся под шапку */
section[id] { scroll-margin-top: 72px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--orange); color: #FFFFFF; }
.btn-primary:hover { background: var(--orange-dark); color: #FFFFFF; box-shadow: 0 8px 20px rgba(217,102,40,.28); }

.btn-ghost { border: 1px solid #D4D4D4; color: var(--ink); }
.btn-ghost:hover { border-color: var(--orange); color: var(--orange); }

.btn-dark { background: var(--ink); color: #FFFFFF; }
.btn-dark:hover { background: #FFFFFF; color: var(--ink); }

.btn-ghost-light { border: 1.5px solid #FFFFFF; color: #FFFFFF; }
.btn-ghost-light:hover { background: #FFFFFF; color: var(--orange); }

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

.accent { color: var(--orange); }

/* ---------- Shared headings ---------- */
.h2 {
  margin: 0;
  max-width: 900px;
  font-size: clamp(34px, 4.6vw, 60px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.lead {
  margin: 0;
  max-width: 720px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-muted);
}
.head-group { display: flex; flex-direction: column; gap: 20px; }

.wrap { max-width: 1200px; margin: 0 auto; }
.wrap-wide { max-width: 1248px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

.num-thin { font-weight: 100; color: var(--orange); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,0.94);
  border-bottom: 1px solid #ECECEC;
  transition: transform 0.35s ease;
}
body.header-hidden .site-header { transform: translateY(-100%); }

.nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 32px; height: 31px; }
.brand span { font-size: 17px; font-weight: 800; }

.nav-links { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; font-size: 14px; }
.nav-link { text-decoration: none; color: #4A4A4A; transition: color .2s ease; }

.nav-cta { min-height: 44px; padding: 0 20px; font-size: 14px; }

.burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid #E2E2E2;
  background: #FFFFFF;
  color: var(--ink);
  cursor: pointer;
  padding: 0;
}
.burger .icon-close { display: none; }
body.menu-open .burger .icon-open { display: none; }
body.menu-open .burger .icon-close { display: block; }

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  gap: 4px;
  padding: 8px 24px 24px;
  border-top: 1px solid #ECECEC;
  border-bottom: 1px solid #ECECEC;
  background: rgba(255,255,255,0.94);
  box-shadow: 0 16px 32px rgba(0,0,0,0.08);
}
.mobile-menu > a:not(.btn) {
  padding: 14px 0;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid #F0F0F0;
}
.mobile-menu .btn { margin-top: 16px; justify-content: center; }

/* ---------- Hero ---------- */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 24px 96px;
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: center;
}
.hero-text { flex: 999 1 500px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.hero h1 {
  margin: 0;
  font-size: clamp(44px, 6.2vw, 80px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.hero-text p {
  margin: 0;
  max-width: 540px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-muted);
  text-wrap: pretty;
}
.hero-visual { flex: 1 1 400px; min-width: 0; }
.hero-card {
  position: relative;
  height: 480px;
  border-radius: 40px;
  background: var(--gray-bg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-card img {
  width: 340px;
  height: 340px;
  max-width: 80%;
  object-fit: contain;
  transform: rotate(-8deg);
  filter: drop-shadow(0 14px 22px rgba(0,0,0,0.16));
}
.chip { position: absolute; padding: 12px 18px; border-radius: 10000px; }
.chip-before {
  left: 24px; top: 32px;
  background: #FFFFFF;
  border: 1px solid #E2E2E2;
  font-size: 15px;
  color: #6B6B6B;
  text-decoration: line-through;
  transform: rotate(-3deg);
}
.chip-after {
  right: 24px; bottom: 32px;
  background: var(--orange);
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 700;
  transform: rotate(3deg);
}

/* ---------- About (dark) ---------- */
.about { padding-bottom: 112px; }
.dark-panel {
  border-radius: 40px;
  background: var(--ink);
  color: var(--light);
  padding: clamp(24px, 6vw, 80px);
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.dark-panel .lead { color: #C4C4C4; }
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 12px;
}
.about-card {
  padding: 28px;
  border-radius: 28px;
  background: var(--ink-2);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 180px;
}
.about-card .num-thin { font-size: 56px; line-height: 1; }
.about-card strong { font-size: 22px; line-height: 1.3; }
.about-card span:last-child { font-size: 15px; line-height: 1.5; color: #BDBDBD; }

/* ---------- What we do ---------- */
.what { padding: 0 24px 112px; display: flex; flex-direction: column; gap: 40px; }
.what-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}
.what-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.what-list .num-thin { width: 64px; font-size: 32px; }
.what-list strong { flex: 1 1 360px; font-size: clamp(22px, 2.4vw, 32px); font-weight: 700; line-height: 1.3; }

/* ---------- Track ---------- */
.track { background: #FFFFFF; }
.track-head { padding: 24px 24px 56px; }
.track-body {
  padding: 0 24px 112px;
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: flex-start;
}
.track-list {
  flex: 999 1 520px;
  min-width: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.stage {
  min-height: 260px;
  padding: 40px 0;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 28px;
  transition: opacity 0.35s ease;
}
.stage-num {
  flex: 0 0 auto;
  width: 96px;
  font-size: 64px;
  font-weight: 100;
  line-height: 0.9;
  color: #BDBDBD;
  transition: color 0.35s ease;
}
.stage-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.stage-body strong { font-size: clamp(26px, 2.8vw, 36px); font-weight: 800; line-height: 1.2; }
.stage-body span { max-width: 560px; font-size: 17px; line-height: 1.6; color: var(--text-muted); }

.track-list.started .stage { opacity: 0.32; }
.track-list.started .stage.is-active { opacity: 1; }
.track-list.started .stage.is-active .stage-num { color: var(--orange); }

.track-aside {
  display: block;
  flex: 1 1 340px;
  min-width: 0;
  position: sticky;
  top: 96px;
  transition: top 0.35s ease;
}
body.header-hidden .track-aside { top: 24px; }
.aside-card {
  border-radius: 36px;
  background: var(--ink);
  color: var(--light);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.aside-img-wrap {
  border-radius: 28px;
  background: var(--ink-2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.aside-img-wrap img { width: 200px; height: 200px; object-fit: contain; }
.aside-block { display: flex; flex-direction: column; gap: 8px; }
.aside-label { font-size: 14px; color: #A8A8A8; }
.aside-help { font-size: 17px; line-height: 1.5; color: var(--light); }
.aside-enters { display: flex; flex-direction: column; gap: 10px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { padding: 6px 12px; border-radius: 10000px; background: var(--orange); color: #FFFFFF; font-size: 13px; }
[hidden] { display: none !important; }

/* мобильная плашка трека */
.track-mobile {
  display: none;
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 15;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 10px;
  border-radius: 22px;
  background: var(--ink);
  color: var(--light);
  box-shadow: 0 12px 30px rgba(0,0,0,0.22);
  opacity: 0;
  transform: translateY(24px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
body.in-track .track-mobile { opacity: 1; transform: translateY(0); }
.track-mobile img { flex: 0 0 auto; width: 56px; height: 56px; object-fit: contain; }
.track-mobile-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.track-mobile-label { font-size: 12px; color: #A8A8A8; }
.track-mobile-help { font-size: 13px; line-height: 1.4; }
.track-mobile .tags { gap: 4px; }
.track-mobile .tag { padding: 3px 8px; font-size: 11px; }

/* ---------- Levels ---------- */
.levels { background: var(--gray-bg); }
.levels-inner { padding: 112px 24px; display: flex; flex-direction: column; gap: 40px; }
.levels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 12px;
}
.level-card {
  padding: clamp(24px, 4vw, 32px);
  border-radius: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.level-card > span:first-child { font-size: 14px; }
.level-card strong { font-size: 30px; font-weight: 800; line-height: 1.2; }
.level-card > span:last-child { font-size: 15px; line-height: 1.55; }
.level-light { background: #FFFFFF; }
.level-light > span:first-child { color: #6B6B6B; }
.level-light > span:last-child { color: var(--text-muted); }
.level-orange { background: var(--orange); color: #FFFFFF; }
.level-dark { background: var(--ink); color: var(--light); }
.level-dark > span:first-child { color: #BDBDBD; }
.level-dark > span:last-child { color: #C4C4C4; }

/* ---------- University ---------- */
.university { padding-top: 112px; padding-bottom: 16px; }
.gray-panel {
  border-radius: 40px;
  background: var(--gray-bg);
  padding: clamp(24px, 6vw, 80px);
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.uni-head { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; align-items: flex-start; }
.uni-head .head-group { flex: 999 1 520px; min-width: 0; }
.uni-head .h2 { max-width: 860px; }
.uni-logo { flex: 0 0 auto; width: 120px; height: 120px; border-radius: 50%; background: #FFFFFF; }
.grid-420 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
  gap: 12px;
}
.uni-card {
  padding: clamp(20px, 4vw, 32px);
  border-radius: 28px;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.uni-card .num-thin { font-size: 32px; }
.uni-card strong, .legacy-item strong { font-size: clamp(18px, 4.6vw, 22px); line-height: 1.35; }

.legacy { padding-bottom: 112px; }
.legacy .dark-panel { position: relative; overflow: hidden; }
.legacy-mark {
  position: absolute;
  right: -60px;
  top: -50px;
  width: 360px;
  height: 345px;
  opacity: 0.14;
  transform: rotate(10deg);
}
.legacy .h2 { position: relative; max-width: 860px; }
.legacy-grid { position: relative; gap: 32px 48px; }
.legacy-item { display: flex; flex-direction: column; gap: 10px; padding-top: 20px; border-top: 1px solid #434343; }
.legacy-item span { font-size: 15px; line-height: 1.55; color: #BDBDBD; }

/* ---------- Join ---------- */
.join { padding-bottom: 112px; }
.join-panel {
  position: relative;
  border-radius: 40px;
  background: var(--orange);
  color: #FFFFFF;
  padding: clamp(24px, 6vw, 80px) clamp(24px, 6vw, 80px) clamp(24px, 3vw, 40px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.join-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; text-wrap: initial; max-width: none; }
.join-title .strike { color: rgba(255,255,255,0.62); text-decoration: line-through; text-decoration-thickness: 3px; }
.join-title .done { padding: 2px 18px 6px; border-radius: 18px; background: var(--ink); color: #FFFFFF; transform: rotate(-2deg); }
.join-row { display: flex; flex-wrap: wrap; gap: 24px 32px; align-items: flex-end; justify-content: space-between; }
.join-text {
  flex: 999 1 480px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: flex-start;
  padding-bottom: clamp(8px, 3vw, 40px);
}
.join-text p { margin: 0; max-width: 600px; font-size: 18px; line-height: 1.55; }
.join-img {
  flex: 0 1 280px;
  max-width: 280px;
  width: 100%;
  height: auto;
  margin-left: auto;
  margin-right: auto;
  transform: rotate(8deg);
  filter: drop-shadow(0 14px 22px rgba(0,0,0,0.2));
}

/* ---------- Founder ---------- */
.founder { padding-bottom: 112px; }
.founder-card {
  border-radius: 40px;
  border: 1px solid var(--line);
  padding: clamp(20px, 4vw, 40px);
  display: flex;
  flex-wrap: wrap;
  gap: 24px 40px;
  align-items: center;
}
.founder-photo { flex: 0 0 auto; width: 160px; height: 160px; border-radius: 32px; object-fit: cover; transform: rotate(-3deg); }
.founder-text { flex: 999 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.founder-text h2 {
  margin: 0;
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.founder-text span { font-size: 17px; line-height: 1.5; color: var(--text-muted); }
.founder-text span strong { color: var(--ink); }
.founder-card .btn { flex: 0 0 auto; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--light); }
.footer-inner {
  padding: 56px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
  justify-content: space-between;
}
.footer-brand { display: flex; align-items: center; gap: 20px; }
.footer-brand img { width: 96px; height: 90px; }
.footer-brand div { display: flex; flex-direction: column; gap: 6px; }
.footer-brand strong { font-size: 18px; font-weight: 800; }
.footer-brand span { font-size: 14px; color: #A8A8A8; }
.footer-uni { display: flex; align-items: center; gap: 14px; }
.footer-uni img { width: 56px; height: 56px; border-radius: 50%; background: #FFFFFF; }
.footer-uni span { font-size: 15px; color: #D6D6D6; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; font-size: 14px; }
.footer-links .nav-link { color: #D6D6D6; }
.footer-links .nav-link:hover { color: var(--orange); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .track-aside { display: none; }
  .track-mobile { display: flex; }
}

@media (max-width: 760px) {
  .nav-links, .nav-cta { display: none; }
  .burger { display: inline-flex; }
  body.menu-open .mobile-menu { display: flex; }
}

/* ==========================================================================
   Анимации
   ========================================================================== */
:root { --ease-out: cubic-bezier(.2, .7, .2, 1); }

/* появление при прокрутке (класс .js ставится до отрисовки; без JS всё видно) */
.js .rv:not(.done) {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.js .rv.in:not(.done) { opacity: 1; transform: none; }

/* маскот на первом экране — лёгкое «парение» */
@keyframes float {
  0%, 100% { transform: rotate(-8deg) translateY(0); }
  50%      { transform: rotate(-6deg) translateY(-10px); }
}
.hero-card img { animation: float 6s ease-in-out infinite; }

/* бейджи на первом экране — мягкое появление */
@keyframes chip-in-l { from { opacity: 0; transform: rotate(-3deg) translateY(10px); } to { opacity: 1; transform: rotate(-3deg); } }
@keyframes chip-in-r { from { opacity: 0; transform: rotate(3deg) translateY(10px); }  to { opacity: 1; transform: rotate(3deg); } }
.chip-before { animation: chip-in-l .6s var(--ease-out) .5s both; }
.chip-after  { animation: chip-in-r .6s var(--ease-out) .8s both; }

/* hover-эффекты — только у кликабельного (.btn, .nav-link, ссылки); см. блоки выше */

/* смена картинки/текста в карточке трека */
@keyframes swap-in { from { opacity: 0; transform: scale(.92) translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes text-in { from { opacity: 0; } to { opacity: 1; } }
.swap-img  { animation: swap-in .4s var(--ease-out); }
.swap-text { animation: text-in .35s ease; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .rv:not(.done) { opacity: 1; transform: none; }
}
