@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500&display=swap');

:root {
  --b: #3776AB;
  --y: #FFD43B;
  --bg: #080808;
  --w: #fff;
  --g: #A1A1AA;
  --line: #ffffff1a;
  --sf: #111;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--w);
  line-height: 1.65;
  overflow-x: hidden;
}

a {
  color: var(--y);
}

a:hover {
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--y);
  outline-offset: 2px;
}

code,
pre {
  font-family: 'Fira Code', ui-monospace, "JetBrains Mono", Consolas, monospace;
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Navigation */
header.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #080808ee;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

header.top .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 56px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

.logo img {
  width: 28px;
  height: 28px;
  margin-right: 8px;
}

.logo b {
  color: var(--y);
}

nav.main {
  display: flex;
  gap: 18px;
  margin-left: auto;
  align-items: center;
}

nav.main a {
  color: var(--g);
  text-decoration: none;
  font-size: .95rem;
}

nav.main a:hover,
nav.main a[aria-current] {
  color: #fff;
}

.btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--line);
  color: #fff;
  min-height: 44px;
}

nav.main a.btn.p,
.btn.p {
  background: var(--y);
  color: #080808;
  border-color: var(--y);
}

.btn.p:hover {
  background: #fff;
  color: #080808;
}

.btn:hover {
  border-color: var(--b);
}

.btn-square {
  width: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.btn-square .btn-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  pointer-events: none;
}

.btn-square .tooltip {
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: #1e1e20;
  color: #fff;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  border: 1px solid var(--line);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-square .tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: #1e1e20 transparent transparent transparent;
}

.btn-square:hover .tooltip {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

#menu {
  display: none;
  margin-left: auto;
  background: 0;
  border: 1px solid var(--line);
  color: #fff;
  border-radius: 8px;
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
}

/* Hero Section */
.hero {
  padding: 72px 0 56px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 40px;
  align-items: center;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.05;
  margin: 0 0 20px;
  letter-spacing: -.03em;
}

.lead {
  color: var(--g);
  font-size: 1.1rem;
  max-width: 52ch;
}

.cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.cta::before {
  content: "";
  flex-basis: 100%;
  width: 0;
  height: 0;
  order: 1;
}

.cta .btn-square {
  width: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  order: 2;
  margin-top: 8px;
}

/* Code Block */
.code {
  background: var(--sf);
  border: 1px solid var(--line);
  border-top: 2px solid var(--b);
  border-radius: 10px;
  overflow: hidden;
  min-width: 0;
}

.code .bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--g);
  font-size: .8rem;
}

.code pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  font-size: .88rem;
  line-height: 1.6;
}

.copy {
  background: 0;
  border: 1px solid var(--line);
  color: var(--g);
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
}

.copy:hover,
.copy.ok {
  color: var(--y);
  border-color: var(--y);
}

.k {
  color: #6fa8dc;
}

.s {
  color: var(--y);
}

.c {
  color: #71717a;
  font-style: italic;
}

.d {
  color: #b4a7d6;
  font-weight: bold;
}

.f {
  color: #8e7cc3;
}

/* Sections & Components */
section.sec {
  padding: 56px 0;
  border-top: 1px solid var(--line);
}

h2 {
  font-size: 1.8rem;
  margin: 0 0 24px;
  letter-spacing: -.02em;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.pillars h3 {
  margin: 0 0 6px;
  border-left: 3px solid var(--y);
  padding-left: 10px;
}

.pillars p {
  color: var(--g);
  margin: 0;
}

.steps {
  padding-left: 20px;
}

.steps li {
  margin-bottom: 18px;
}

.note {
  border-left: 3px solid var(--y);
  background: #ffd43b12;
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
  color: #e4e4e7;
}

/* Footer */
footer {
  border-top: 1px solid var(--line);
  padding: 36px 0;
  color: var(--g);
  font-size: .9rem;
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
}

footer a {
  color: var(--g);
}

/* Media Queries */
@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 40px;
  }
  
  .pillars {
    grid-template-columns: 1fr 1fr;
  }
  
  #menu {
    display: block;
  }
  
  nav.main {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg);
    padding: 12px 20px;
    border-bottom: 1px solid var(--line);
  }
  
  nav.main.open {
    display: flex;
  }
  
  nav.main a {
    padding: 10px 0;
  }
}

@media (max-width: 480px) {
  .pillars {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
