/* =====================================================================
   SQUAD — AI program template
   Direction: midnight observatory. Deep ink background, an aurora glow
   as the single signature element, restrained warm-cyan accent.
   Display: Space Grotesk · Body: Inter · Mono utility: Space Mono
   ===================================================================== */

:root {
  --ink:        #0b0e1a;
  --ink-2:      #11152a;
  --surface:    #161b34;
  --surface-2:  #1e2647;
  --line:       rgba(255,255,255,0.08);
  --line-2:     rgba(255,255,255,0.14);
  --text:       #e7e9f5;
  --muted:      #9aa0c4;
  --aurora-1:   #7c5cff;   /* violet */
  --aurora-2:   #2bd9c8;   /* cyan   */
  --accent:     #ffb47e;   /* warm coral / solar glow, used sparingly */
  --danger:     #ff6b8a;
  --ok:         #57e0a8;
  --radius:     16px;
  --radius-sm:  10px;
  --maxw:       1140px;
  --ease:       cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-glow: 0 8px 30px rgba(124,92,255,0.35);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--ink);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--aurora-1); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 999px; border: 2px solid var(--ink); }
::-webkit-scrollbar-thumb:hover { background: var(--aurora-1); }
html { scrollbar-color: var(--surface-2) var(--ink); scrollbar-width: thin; }

:focus-visible {
  outline: 2px solid var(--aurora-2);
  outline-offset: 3px;
  border-radius: 4px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

h1,h2,h3,h4,.display {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--aurora-2);
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: 15px; cursor: pointer;
  border: 1px solid transparent;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
  font-family: 'Space Grotesk', sans-serif;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary {
  color: #0b0e1a;
  background: linear-gradient(120deg, var(--aurora-2), var(--aurora-1));
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { box-shadow: 0 10px 36px rgba(124,92,255,0.45); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--aurora-2); background: rgba(43,217,200,0.06); }
.btn-block { width: 100%; justify-content: center; }
.btn-google {
  background: #fff; color: #1f2430; width: 100%; justify-content: center;
  border: 1px solid #dadce0;
}
.btn-google:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.18); }

/* ---------- NAVBAR ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(11,14,26,0.72);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(0,0,0,0.2);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; font-family:'Space Grotesk'; font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.brand .dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: linear-gradient(120deg, var(--aurora-2), var(--aurora-1));
  box-shadow: 0 0 18px var(--aurora-1);
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { position: relative; color: var(--muted); font-size: 15px; transition: color .2s var(--ease); }
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: linear-gradient(120deg, var(--aurora-2), var(--aurora-1));
  transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-cta { display: flex; gap: 12px; align-items: center; }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); font-size: 26px; cursor: pointer; }

/* ---------- HERO (signature: aurora) ---------- */
.hero { position: relative; padding: 110px 0 90px; overflow: hidden; }
.aurora {
  position: absolute; inset: -20% -10% auto -10%; height: 620px; z-index: 0;
  background:
    radial-gradient(40% 55% at 25% 30%, rgba(124,92,255,0.45), transparent 70%),
    radial-gradient(45% 60% at 75% 25%, rgba(43,217,200,0.40), transparent 70%),
    radial-gradient(28% 38% at 58% 60%, rgba(255,180,126,0.30), transparent 70%);
  filter: blur(40px);
  animation: drift 16s ease-in-out infinite alternate;
}
@keyframes drift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(0,-30px,0) scale(1.08); }
}
.hero-inner { position: relative; z-index: 1; max-width: 760px; }
.hero h1 { font-size: clamp(40px, 6vw, 72px); margin: 18px 0 22px; }
.hero h1 .grad {
  background: linear-gradient(120deg, var(--aurora-2), var(--aurora-1));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { font-size: 20px; color: var(--muted); max-width: 600px; margin-bottom: 34px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.stats { display: flex; gap: 48px; margin-top: 64px; flex-wrap: wrap; position: relative; z-index: 1; }
.stat .num { font-family:'Space Grotesk'; font-size: 34px; font-weight: 700; }
.stat .lbl { color: var(--muted); font-size: 14px; }

/* ---------- SECTIONS ---------- */
.section { padding: 84px 0; }
.section-head { max-width: 620px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(28px, 4vw, 44px); margin: 14px 0; }
.section-head p { color: var(--muted); font-size: 17px; }

.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: linear-gradient(180deg, var(--surface), var(--ink-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: rgba(43,217,200,0.4); box-shadow: 0 20px 50px rgba(0,0,0,0.35); }
.card .ico {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(124,92,255,0.15); color: var(--aurora-2); font-size: 22px; margin-bottom: 16px;
}
.card h3 { font-size: 20px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15px; }

/* ---------- AUTH PAGES ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; position: relative; }
.auth-card {
  width: 100%; max-width: 440px; position: relative; z-index: 1;
  background: linear-gradient(180deg, var(--surface), var(--ink-2));
  border: 1px solid var(--line); border-radius: 20px; padding: 38px 34px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
}
.auth-card h1 { font-size: 28px; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); font-size: 15px; margin-bottom: 26px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; }
.field input {
  width: 100%; padding: 13px 15px; border-radius: 12px;
  background: var(--ink); border: 1px solid var(--line); color: var(--text); font-size: 15px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field input:hover { border-color: var(--line-2); }
.field input:focus {
  outline: none; border-color: var(--aurora-2);
  box-shadow: 0 0 0 3px rgba(43,217,200,0.18);
}
.field input:invalid:not(:placeholder-shown) { border-color: var(--danger); }
.field input::placeholder { color: var(--muted); opacity: .7; }
.divider { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; margin: 22px 0; }
.divider::before, .divider::after { content:''; flex: 1; height: 1px; background: var(--line); }
.auth-foot { text-align: center; margin-top: 22px; color: var(--muted); font-size: 14px; }
.auth-foot a { color: var(--aurora-2); }

/* ---------- ALERTS ---------- */
.alert { padding: 12px 16px; border-radius: 12px; font-size: 14px; margin-bottom: 18px; border: 1px solid; border-left-width: 3px; }
.alert-error { background: rgba(255,107,138,0.1); border-color: rgba(255,107,138,0.4); border-left-color: var(--danger); color: #ffc2cf; }
.alert-ok    { background: rgba(87,224,168,0.1); border-color: rgba(87,224,168,0.4); border-left-color: var(--ok); color: #b6f5d8; }

/* ---------- DASHBOARD ---------- */
.dash { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.side {
  background: var(--ink-2); border-right: 1px solid var(--line); padding: 26px 20px;
  display: flex; flex-direction: column; gap: 6px;
}
.side .brand { margin-bottom: 26px; }
.side a {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 10px;
  color: var(--muted); font-size: 15px; transition: background .2s var(--ease), color .2s var(--ease);
}
.side a:hover, .side a.active { background: var(--surface-2); color: var(--text); }
.side .spacer { flex: 1; }
.dash-main { padding: 30px 36px; }
.dash-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; flex-wrap: wrap; gap: 16px; }
.welcome h1 { font-size: 26px; }
.welcome p { color: var(--muted); }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(120deg, var(--aurora-2), var(--aurora-1)); color: #0b0e1a; font-weight: 700;
  font-family:'Space Grotesk'; overflow: hidden; box-shadow: 0 4px 16px rgba(124,92,255,0.3);
}
.tiles { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; margin-bottom: 26px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; transition: border-color .2s var(--ease); }
.tile:hover { border-color: var(--line-2); }
.tile .k { color: var(--muted); font-size: 13px; }
.tile .v { font-family:'Space Grotesk'; font-size: 28px; font-weight: 700; margin-top: 6px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.panel h3 { margin-bottom: 14px; }
.kv { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--muted); }

/* ---------- SOCIAL SHARE ---------- */
.share { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.share-btn {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--text); font-size: 17px; transition: transform .15s, background .2s, border-color .2s;
}
.share-btn:hover { transform: translateY(-3px); border-color: var(--aurora-2); }

/* ---------- CONTACT FORM / ARTICLES ---------- */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
textarea {
  width: 100%; padding: 13px 15px; border-radius: 12px; min-height: 140px; resize: vertical;
  background: var(--ink); border: 1px solid var(--line); color: var(--text); font-family: inherit; font-size: 15px;
}
textarea:focus { outline: none; border-color: var(--aurora-2); box-shadow: 0 0 0 3px rgba(43,217,200,0.18); }
.article {
  background: linear-gradient(180deg, var(--surface), var(--ink-2));
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .2s, border-color .2s;
}
.article:hover { transform: translateY(-4px); border-color: rgba(43,217,200,0.4); }
.article .body { padding: 22px; }
.article .tag { font-family:'Space Mono'; font-size: 11px; letter-spacing: .12em; color: var(--aurora-2); text-transform: uppercase; }
.article h3 { font-size: 19px; margin: 8px 0; }
.article p { color: var(--muted); font-size: 14px; }
.article .thumb { height: 150px; background: linear-gradient(120deg, var(--aurora-1), var(--aurora-2)); opacity: .85; }

/* ---------- PRICING (product page) ---------- */
.price { font-family:'Space Grotesk'; font-size: 40px; font-weight: 700; }
.price small { font-size: 15px; color: var(--muted); font-weight: 400; }
.plan.featured { border-color: var(--aurora-2); box-shadow: 0 0 0 1px var(--aurora-2), 0 20px 60px rgba(43,217,200,0.15); }
.plan ul { list-style: none; margin: 18px 0; }
.plan li { padding: 8px 0; color: var(--muted); font-size: 14px; display: flex; gap: 10px; }
.plan li::before { content: '→'; color: var(--aurora-2); }

/* ---------- FOOTER ---------- */
.footer { border-top: 1px solid var(--line); padding: 50px 0 30px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
.footer h4 { font-size: 14px; margin-bottom: 14px; color: var(--text); }
.footer a { color: var(--muted); font-size: 14px; display: block; padding: 4px 0; }
.footer a:hover { color: var(--aurora-2); }
.footer .copy { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; text-align: center; }

/* ---------- POPUP MODAL ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(5,7,15,0.78); backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-overlay.show { display: flex; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  position: relative; width: 100%; max-width: 460px; text-align: center;
  background: linear-gradient(180deg, var(--surface), var(--ink-2));
  border: 1px solid var(--line); border-radius: 20px; padding: 40px 34px;
  box-shadow: 0 40px 100px rgba(0,0,0,0.55); animation: pop .3s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes pop { from { transform: scale(.9) translateY(10px); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal .ico { font-size: 38px; margin-bottom: 12px; }
.modal h3 { font-size: 24px; margin-bottom: 10px; }
.modal p { color: var(--muted); margin-bottom: 22px; }
.modal .close {
  position: absolute; top: 14px; right: 16px; background: none; border: 0;
  color: var(--muted); font-size: 24px; cursor: pointer; line-height: 1;
}
.modal .close:hover { color: var(--text); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .tiles { grid-template-columns: 1fr; }
  .dash { grid-template-columns: 1fr; }
  .side { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); }
  .side .spacer { display: none; }
  .nav-links { display: none; position: absolute; top: 70px; left: 0; right: 0; flex-direction: column; background: var(--ink-2); padding: 20px 24px; border-bottom: 1px solid var(--line); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .form-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
}
