/* ============================ RESET / TOKENS ============================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #0a0e17;
  --bg-alt: #0d1320;
  --surface: #141b2a;
  --surface-2: #1b2334;
  --border: #26314a;
  --text: #eaf0fb;
  --muted: #9aa7bf;
  --muted-2: #6f7d97;
  --accent: #2f80ff;
  --accent-2: #57a0ff;
  --accent-soft: rgba(47, 128, 255, 0.14);
  --radius: 14px;
  --radius-lg: 20px;
  --wrap: 1140px;
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.7);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 22px;
}

/* ============================ BUTTONS ============================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.2s, box-shadow 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 30px -12px rgba(47, 128, 255, 0.9);
}
.btn-primary:hover {
  background: var(--accent-2);
  transform: translateY(-2px);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-2);
  transform: translateY(-2px);
}
.btn-block {
  width: 100%;
}
.btn-disabled {
  background: var(--surface-2);
  color: var(--muted-2);
  cursor: not-allowed;
  border-color: var(--border);
}
.btn-donate {
  padding: 9px 16px;
  background: var(--accent-soft);
  color: var(--accent-2);
  border-color: rgba(47, 128, 255, 0.35);
}
.btn-donate:hover {
  background: var(--accent);
  color: #fff;
}

/* ============================ HEADER ============================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 14, 23, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
}
.brand-name {
  color: var(--text);
}
.nav {
  display: flex;
  align-items: center;
  gap: 26px;
}
.nav > a:not(.btn) {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.18s;
}
.nav > a:not(.btn):hover {
  color: var(--text);
}
.lang-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
}
.lang-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.lang-btn:hover {
  color: var(--text);
}
.lang-btn[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
}
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.2s;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================ HERO ============================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 12vw, 140px) 0 clamp(60px, 9vw, 110px);
  border-bottom: 1px solid var(--border);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 55% at 72% 12%, rgba(47, 128, 255, 0.22), transparent 60%),
    radial-gradient(50% 50% at 15% 90%, rgba(47, 128, 255, 0.1), transparent 60%),
    linear-gradient(180deg, var(--bg-alt), var(--bg));
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 46px 46px;
  opacity: 0.16;
  mask-image: radial-gradient(70% 60% at 50% 30%, #000 40%, transparent 80%);
}
.hero-inner {
  position: relative;
  text-align: center;
  max-width: 780px;
}
.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: var(--accent-soft);
  border: 1px solid rgba(47, 128, 255, 0.3);
  border-radius: 999px;
}
.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(2.3rem, 6vw, 4rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.accent {
  color: var(--accent-2);
}
.lede {
  margin: 0 auto 32px;
  max-width: 600px;
  font-size: clamp(1.05rem, 2.2vw, 1.28rem);
  color: var(--muted);
}
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-note {
  margin: 26px 0 0;
  font-size: 0.9rem;
  color: var(--muted-2);
}

/* ============================ SECTIONS ============================ */
.section {
  padding: clamp(64px, 9vw, 108px) 0;
}
.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}
.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto clamp(40px, 6vw, 60px);
}
.section-head h2 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

/* ============================ TOOLS GRID ============================ */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 22px;
}
.tool-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.22s var(--ease), border-color 0.22s, box-shadow 0.22s;
}
.tool-card.is-live:hover {
  transform: translateY(-6px);
  border-color: rgba(47, 128, 255, 0.5);
  box-shadow: var(--shadow);
}
.tool-card.is-soon {
  opacity: 0.82;
}
.tool-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--border);
}
.tool-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tool-icon {
  width: 64px;
  height: 64px;
  fill: rgba(255, 255, 255, 0.85);
  color: rgba(255, 255, 255, 0.85);
  opacity: 0.9;
}
.thumb-pvc {
  background: linear-gradient(140deg, #1c2a44, #0f1930);
}
.thumb-chalak {
  background: linear-gradient(140deg, #1e2c46, #10182c);
}
.thumb-frame {
  background: linear-gradient(140deg, #23324e, #121c31);
}
.thumb-kumiko {
  background: linear-gradient(140deg, #1e3350, #101d33);
}
.thumb-box {
  background: linear-gradient(140deg, #202c46, #131d31);
}
.thumb-tray {
  background: linear-gradient(140deg, #1d2a45, #11192e);
}
.tool-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px 20px 22px;
  gap: 10px;
}
.tool-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.tool-title-row h3 {
  margin: 0;
  font-size: 1.16rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.tool-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  flex: 1;
}
.tool-body .btn {
  margin-top: 6px;
}
.badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge-live {
  color: #7ef0b0;
  background: rgba(46, 204, 128, 0.14);
  border: 1px solid rgba(46, 204, 128, 0.35);
}
.badge-soon {
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

/* ============================ FEATURES ============================ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  text-align: center;
}
.feature-ico {
  font-size: 2rem;
  margin-bottom: 12px;
}
.feature h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  font-weight: 700;
}
.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ============================ TUTORIALS ============================ */
.tutorial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
  align-items: start;
}
.tutorial-card {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.tutorial-card img {
  width: 100%;
  height: auto;
}
.tutorial-card figcaption {
  padding: 14px 18px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
}
.tutorial-placeholder .tut-ph {
  aspect-ratio: 3 / 2;
  display: grid;
  place-items: center;
  color: var(--muted-2);
  font-weight: 600;
  background: repeating-linear-gradient(
    45deg,
    var(--surface),
    var(--surface) 14px,
    var(--surface-2) 14px,
    var(--surface-2) 28px
  );
}

/* ============================ SHOP ============================ */
.shop-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  background: linear-gradient(120deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 48px);
}
.shop-copy h2 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  font-weight: 800;
}
.shop-copy p {
  margin: 0;
  color: var(--muted);
}

/* ============================ FOOTER ============================ */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding-top: 54px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 30px;
  padding-bottom: 40px;
}
.footer-brand p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 280px;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links h4 {
  margin: 0 0 4px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-2);
}
.footer-links a {
  color: var(--muted);
  font-size: 0.94rem;
  transition: color 0.18s;
}
.footer-links a:hover {
  color: var(--accent-2);
}
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-block: 22px;
}
.footer-bottom p {
  margin: 0;
  color: var(--muted-2);
  font-size: 0.86rem;
}

/* ============================ RESPONSIVE ============================ */
@media (max-width: 760px) {
  .menu-toggle {
    display: flex;
  }
  .nav {
    position: fixed;
    inset: 66px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(13, 19, 32, 0.98);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 10px 22px 20px;
    transform: translateY(-140%);
    transition: transform 0.3s var(--ease);
  }
  .nav.open {
    transform: translateY(0);
  }
  .nav > a:not(.btn) {
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
  }
  .nav .btn-donate {
    margin-top: 14px;
    justify-content: center;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}
