/* ==========================================================================
   CrabKing's Lair — starter stylesheet
   Palette: deep abyss navy with coral + gold accents.
   ========================================================================== */

/* --- Design tokens ------------------------------------------------------- */
:root {
  --abyss:        #060b14;
  --abyss-soft:   #0b1524;
  --surface:      rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --line:         rgba(255, 255, 255, 0.09);
  --line-strong:  rgba(255, 255, 255, 0.16);

  --coral:        #ff6b4a;
  --coral-soft:   #ff8f74;
  --gold:         #f4c15d;

  --text:         #e9eff8;
  --text-muted:   #93a3b8;

  --radius:       18px;
  --radius-sm:    12px;
  --container:    1120px;

  --shadow:       0 24px 60px -30px rgba(0, 0, 0, 0.9);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;
}

/* --- Reset --------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--abyss);
  background-image:
    radial-gradient(1100px 600px at 80% -10%, rgba(255, 107, 74, 0.14), transparent 60%),
    radial-gradient(900px 600px at 0% 10%,  rgba(64, 138, 255, 0.10), transparent 60%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 700;
}

p { margin: 0; }

ul { margin: 0; padding: 0; list-style: none; }

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

/* --- Layout helpers ------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.container.narrow { max-width: 760px; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: 8px; left: 8px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--coral);
  color: #1a0d08;
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform 0.2s ease;
}

.skip-link:focus-visible { transform: translateY(0); }

/* --- Typography ---------------------------------------------------------- */
.eyebrow {
  margin-bottom: 14px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--coral-soft);
}

.accent {
  background: linear-gradient(100deg, var(--coral) 10%, var(--gold) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede,
.section-lede {
  max-width: 56ch;
  color: var(--text-muted);
  font-size: 1.06rem;
}

/* --- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease,
              border-color 0.18s ease, box-shadow 0.18s ease;
}

.btn-primary {
  background: linear-gradient(100deg, var(--coral), var(--gold));
  color: #1a0d08;
  box-shadow: 0 14px 34px -16px rgba(255, 107, 74, 0.9);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px -16px rgba(255, 107, 74, 0.95);
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--text);
  background: transparent;
}

.btn-ghost:hover {
  background: var(--surface-hover);
  border-color: var(--text-muted);
}

/* --- Header -------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(6, 11, 20, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 11px;
  color: var(--coral);
  background: rgba(255, 107, 74, 0.14);
  border: 1px solid rgba(255, 107, 74, 0.28);
}

.brand-mark svg { width: 20px; height: 20px; }

.brand-text em {
  font-style: normal;
  color: var(--coral);
}

/* Nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-list a {
  font-size: 0.94rem;
  color: var(--text-muted);
  transition: color 0.18s ease;
}

.nav-list a:hover { color: var(--text); }

.nav-cta { padding: 11px 20px; font-size: 0.9rem; }

/* Mobile toggle */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px; height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: relative;
}

.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after  { top: 4px; }

.nav-open .nav-toggle-bars { background: transparent; }
.nav-open .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle-bars::after  { transform: translateY(-4px) rotate(-45deg); }

/* --- Hero ---------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 12vw, 140px) 0 clamp(64px, 10vw, 120px);
}

.hero-glow {
  position: absolute;
  top: -30%; left: 50%;
  width: min(900px, 120vw);
  aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255, 107, 74, 0.22), transparent 62%);
  filter: blur(20px);
  pointer-events: none;
}

.hero-inner { position: relative; }

.hero-title {
  font-size: clamp(2.6rem, 8.2vw, 5rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.035em;
  max-width: 16ch;
}

.hero .lede {
  margin-top: 24px;
  font-size: clamp(1.02rem, 1.6vw, 1.15rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin: clamp(48px, 7vw, 72px) 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.stat dt {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stat dd {
  margin: 6px 0 0;
  font-size: 1.05rem;
  font-weight: 600;
}

/* --- Sections ------------------------------------------------------------ */
.section { padding: clamp(56px, 9vw, 100px) 0; }

.section-head { margin-bottom: 44px; }

.section-head h2,
.container.narrow h2,
.cta-panel h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  max-width: 22ch;
}

.container.narrow .section-lede,
.section-head + .card-grid { margin-top: 20px; }

/* --- Cards --------------------------------------------------------------- */
.card-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  padding: 28px 26px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.2s ease, background-color 0.2s ease,
              border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  background: var(--surface-hover);
  border-color: var(--line-strong);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  margin-bottom: 20px;
  border-radius: 14px;
  color: var(--coral);
  background: rgba(255, 107, 74, 0.12);
  border: 1px solid rgba(255, 107, 74, 0.24);
}

.card-icon svg { width: 22px; height: 22px; }

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.card p {
  color: var(--text-muted);
  font-size: 0.96rem;
}

/* --- CTA panel ----------------------------------------------------------- */
.cta-panel {
  display: grid;
  gap: 32px;
  align-items: center;
  grid-template-columns: 1.1fr 1fr;
  padding: clamp(32px, 5vw, 56px);
  border: 1px solid var(--line-strong);
  border-radius: calc(var(--radius) + 6px);
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(244, 193, 93, 0.14), transparent 65%),
    var(--abyss-soft);
  box-shadow: var(--shadow);
}

.cta-panel .section-lede { margin-top: 16px; }

.signup {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.signup input {
  flex: 1 1 220px;
  min-width: 0;
  padding: 14px 18px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.signup input::placeholder { color: rgba(147, 163, 184, 0.75); }

.signup input:focus {
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(255, 107, 74, 0.22);
}

/* --- Footer -------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.24);
  padding-top: clamp(48px, 7vw, 72px);
}

.footer-inner {
  display: grid;
  gap: 40px;
  grid-template-columns: 1.2fr 2fr;
}

.footer-brand .brand-text {
  font-size: 1.1rem;
  font-weight: 700;
}

.footer-brand .brand-text em { font-style: normal; color: var(--coral); }

.footer-brand p {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.footer-nav {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.footer-nav h3 {
  margin-bottom: 14px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.footer-nav li + li { margin-top: 10px; }

.footer-nav a {
  font-size: 0.94rem;
  color: var(--text);
  opacity: 0.85;
  transition: opacity 0.18s ease, color 0.18s ease;
}

.footer-nav a:hover { opacity: 1; color: var(--coral-soft); }

.footer-base {
  margin-top: clamp(40px, 6vw, 64px);
  padding-block: 24px;
  border-top: 1px solid var(--line);
}

.footer-base p {
  font-size: 0.86rem;
  color: var(--text-muted);
}

/* --- Focus styles -------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 900px) {
  .cta-panel { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 16px 24px 24px;
    background: rgba(6, 11, 20, 0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);

    /* Collapsed by default */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }

  .nav-open .site-nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-list a {
    display: block;
    padding: 14px 4px;
    font-size: 1rem;
    color: var(--text);
    border-bottom: 1px solid var(--line);
  }

  .nav-cta {
    margin-top: 18px;
    padding: 14px 20px;
    font-size: 0.95rem;
  }

  .hero-stats { gap: 28px; }

  .signup .btn { width: 100%; }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }

  .btn-primary:hover,
  .card:hover { transform: none; }
}
