@font-face {
  font-family: "KHTeka";
  src: url("../assets/fonts/KHTeka-Light.woff2") format("woff2"),
    url("../assets/fonts/KHTeka-Light.woff") format("woff");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "KHTeka";
  src: url("../assets/fonts/KHTeka-Regular.woff2") format("woff2"),
    url("../assets/fonts/KHTeka-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "KHTeka";
  src: url("../assets/fonts/KHTeka-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "KHTekaMono";
  src: url("../assets/fonts/KHTekaMono-Regular.woff2") format("woff2"),
    url("../assets/fonts/KHTekaMono-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --bg: #f4f4f4;
  --card: #fff;
  --text: #111;
  --muted: #1111118c;
  --soft: #1116;
  --line: #1111111a;
  --accent: #d4fc50;
  --accent-hover: #c4ef3c;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "KHTeka", system-ui, -apple-system, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --header-h: 64px;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100%;
  overflow-x: hidden;
}

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

button {
  font: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  backdrop-filter: blur(12px);
  background: #f4f4f4cc;
}

.header-inner {
  max-width: 1120px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.logo img {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
  transition: transform 0.35s var(--ease);
}

.logo:hover img {
  transform: rotate(-6deg) scale(1.05);
}

.menu {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
  max-width: min(720px, 65vw);
  overflow-x: auto;
  scrollbar-width: none;
}

.menu::-webkit-scrollbar {
  display: none;
}

.menu-pill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 999px;
  background: #1111110f;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.4s var(--ease), width 0.4s var(--ease), opacity 0.2s var(--ease);
}

.menu-pill.is-ready {
  opacity: 1;
}

.menu-link {
  position: relative;
  z-index: 1;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.18s var(--ease), transform 0.18s var(--ease);
}

.menu-link:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.menu-link.is-on {
  color: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: #111;
  font-size: 15px;
  font-weight: 500;
  transition: background 0.18s var(--ease), transform 0.18s var(--ease);
}

.btn:hover {
  background: var(--accent-hover);
  transform: scale(1.03);
}

.btn:active {
  transform: scale(0.98);
}

.btn-lg {
  padding: 0.75rem 2rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.main {
  flex: 1;
  width: 100%;
  padding: 40px 24px 48px;
  display: flex;
  justify-content: center;
}

.stack {
  width: min(100%, 1120px);
  display: grid;
  gap: 16px;
}

.card {
  background: var(--card);
  border: 1px solid #fffc;
  border-radius: 28px;
  box-shadow: 0 1px 2px #1111110a, 0 8px 24px #1111110f;
  padding: 32px;
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-title {
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.hero-text {
  max-width: 32rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 1.75rem;
}

.card h2 {
  font-size: clamp(1.5rem, 2.5vw, 1.85rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.lead {
  color: var(--muted);
  line-height: 1.55;
  max-width: 46rem;
  margin-bottom: 8px;
}

.card h3 {
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 6px;
}

.steps {
  list-style: none;
  display: grid;
  gap: 0;
  margin-top: 8px;
}

.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  transition: transform 0.18s var(--ease);
}

.step:hover {
  transform: translateX(4px);
}

.step p,
.row p,
.faq-item p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.step-n {
  font-family: "KHTekaMono", ui-monospace, monospace;
  font-size: 13px;
  color: var(--soft);
  padding-top: 2px;
}

.rows {
  display: grid;
  gap: 18px;
  margin-top: 8px;
}

.row {
  padding-top: 16px;
  border-top: 1px solid var(--line);
  transition: transform 0.18s var(--ease);
}

.row:hover {
  transform: translateY(-2px);
}

.faq {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 4px 16px;
  background: #fff;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), transform 0.18s var(--ease);
}

.faq-item:hover {
  border-color: #1111112e;
  transform: translateY(-1px);
}

.faq-item[open] {
  border-color: #d4fc5080;
  box-shadow: 0 6px 18px #1111110a;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 0;
  font-size: 15px;
  font-weight: 500;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item p {
  padding-bottom: 16px;
  animation: open-soft 0.28s var(--ease);
}

@keyframes open-soft {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.risk {
  margin-top: 12px;
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  display: grid;
  gap: 10px;
}

.risk a {
  text-decoration: underline;
  text-underline-offset: 2px;
  color: var(--text);
}

.card a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.card a.btn {
  text-decoration: none;
}

.fade {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}

.fade.is-in {
  opacity: 1;
  transform: none;
}

.fade-child {
  opacity: 0;
}

.fade.is-in .fade-child {
  animation: child-in 0.4s var(--ease) forwards;
  animation-delay: var(--d, 0ms);
}

@keyframes child-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.in {
  opacity: 0;
  transform: translateY(12px);
  animation: in-up 0.55s var(--ease) forwards;
}

.d1 {
  animation-delay: 0.08s;
}

.d2 {
  animation-delay: 0.16s;
}

@keyframes in-up {
  to {
    opacity: 1;
    transform: none;
  }
}

.footer {
  padding: 40px 24px 48px;
  margin-top: auto;
}

.footer-card {
  max-width: 1080px;
  margin: 0 auto;
  background: var(--card);
  border-radius: 28px;
  box-shadow: 0 1px 2px #1111110a, 0 8px 24px #1111110f;
  padding: 32px 36px;
}

.footer-grid {
  display: grid;
  gap: 28px;
}

.footer-brand {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  display: inline-block;
  margin-bottom: 12px;
  line-height: 1;
}

.footer-label {
  color: var(--soft);
  font-size: 13px;
  margin-bottom: 12px;
  min-height: 1.75rem;
  display: flex;
  align-items: flex-end;
}

.muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  max-width: 40ch;
}

.footer nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer nav a {
  color: var(--muted);
  font-size: 14px;
  transition: color 0.18s var(--ease), transform 0.18s var(--ease);
  display: inline-block;
}

.footer nav a:hover {
  color: var(--text);
  transform: translateX(3px);
}

.footer-bottom {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--soft);
}

.footer-bottom a {
  text-decoration: underline;
  text-underline-offset: 2px;
  color: var(--text);
}

@media (min-width: 760px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(104px, 0.5fr) minmax(124px, 0.65fr) minmax(0, 1.15fr);
    gap: 32px;
  }

  .rows-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }

  .rows-3 .row {
    border-top: none;
    padding-top: 0;
  }
}

@media (max-width: 768px) {
  .header-inner,
  .main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .logo img {
    width: 36px;
    height: 36px;
  }

  .menu-link {
    padding: 8px 10px;
    font-size: 13px;
  }

  .card {
    padding: 18px;
  }

  .footer {
    padding: 24px 16px;
  }

  .footer-card {
    padding: 28px 24px;
  }

  .header {
    backdrop-filter: none;
    background: var(--bg);
  }
}

@media (max-width: 520px) {
  .logo {
    display: none;
  }

  .hero-title {
    font-size: 1.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .fade,
  .fade-child,
  .in,
  .btn,
  .menu-link,
  .menu-pill,
  .logo img,
  .step,
  .row,
  .faq-item,
  .footer nav a {
    transition: none !important;
    animation: none !important;
  }

  .fade,
  .fade-child,
  .in {
    opacity: 1;
    transform: none;
  }

  .btn:hover,
  .menu-link:hover,
  .logo:hover img,
  .step:hover,
  .row:hover,
  .faq-item:hover,
  .footer nav a:hover {
    transform: none;
  }
}
