/* ==========================================================================
   RackAI — styles.css
   Theme variables live in :root. Change these to re-theme the whole site.
   ========================================================================== */

:root {
  /* Palette */
  --secure: #2ad1a3;      /* accent / "secure" green */
  --secure-dark: #14b88a;
  --navy: #0b1220;        /* deep background */
  --navy-2: #111b2e;      /* raised surface */
  --navy-3: #18243a;      /* card surface */
  --paper: #f6f8fb;       /* light section bg */
  --ink: #0b1220;         /* dark text on light */
  --text: #e7edf5;        /* light text on dark */
  --muted-text: #9fb0c5;  /* muted on dark */
  --muted-ink: #5a6b82;   /* muted on light */
  --line: rgba(255, 255, 255, 0.08);
  --line-ink: #e2e8f0;

  /* Type */
  --font-head: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  /* Spacing / layout */
  --container: 1140px;
  --radius: 14px;
  --radius-sm: 10px;
  --section-y: 6rem;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--navy);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.15; margin: 0 0 .5em; }
p { margin: 0 0 1rem; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---------- Helpers ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.muted { color: var(--muted-text); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--secure); color: var(--navy); padding: .7rem 1rem; border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* Visible keyboard focus */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--secure);
  outline-offset: 2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; cursor: pointer; border: 0;
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
  padding: .85rem 1.6rem; border-radius: 999px; transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--secure); color: var(--navy); box-shadow: 0 8px 24px rgba(42, 209, 163, .25); }
.btn-primary:hover { background: var(--secure-dark); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--secure); color: var(--secure); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 18, 32, .82);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { font-family: var(--font-head); font-weight: 800; font-size: 1.35rem; letter-spacing: -.02em; }
.logo span { color: var(--secure); }

.nav { display: flex; align-items: center; }
.nav-menu { display: flex; align-items: center; gap: 1.75rem; }
.nav-menu a { color: var(--muted-text); font-weight: 500; transition: color .2s; }
.nav-menu a:hover { color: var(--text); }
.nav-cta { color: var(--navy) !important; padding: .55rem 1.2rem; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--text); transition: .3s; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(4rem, 10vw, 8rem) 0 clamp(3rem, 7vw, 6rem);
  background:
    radial-gradient(60rem 30rem at 70% -10%, rgba(42, 209, 163, .14), transparent 60%),
    radial-gradient(40rem 24rem at 0% 20%, rgba(42, 209, 163, .08), transparent 60%),
    var(--navy);
}
.hero-title { font-size: clamp(2.6rem, 7vw, 4.6rem); font-weight: 800; letter-spacing: -.03em; }
.hero-sub { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--muted-text); max-width: 680px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }

/* ---------- Trust banner ---------- */
.trust { background: var(--navy-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 1.75rem 0; }
.trust-lead { text-align: center; color: var(--muted-text); margin-bottom: .9rem; font-size: .95rem; }
.trust-list { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem 1.75rem; }
.trust-list li { position: relative; padding-left: 1.5rem; font-weight: 600; font-family: var(--font-head); }
.trust-list li::before { content: "✓"; position: absolute; left: 0; color: var(--secure); font-weight: 700; }

/* ---------- Generic section ---------- */
.section { padding: var(--section-y) 0; }
.section-head { max-width: 720px; margin: 0 auto 3rem; text-align: center; }
.eyebrow { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--secure); margin-bottom: .6rem; }
.section h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.section-intro { color: var(--muted-text); font-size: 1.1rem; }

/* Alternating light section */
.problem, .platform, .why, .security {
  background: var(--paper); color: var(--ink);
}
.problem h2, .platform h2, .why h2, .security h2 { color: var(--ink); }
.problem .muted, .platform .muted, .why .muted, .security .muted { color: var(--muted-ink); }
.problem .section-intro, .platform .section-intro, .why .section-intro, .security .section-intro { color: var(--muted-ink); }

/* ---------- Lists ---------- */
.check-list { display: grid; gap: .7rem; margin: 1.5rem 0; }
.check-list.two-col { grid-template-columns: repeat(2, 1fr); }
.check-list li { position: relative; padding-left: 1.9rem; }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--secure-dark); font-weight: 700;
}

.pill-list { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.pill-list li {
  background: var(--navy-3); border: 1px solid var(--line); color: var(--text);
  padding: .45rem 1rem; border-radius: 999px; font-size: .9rem; font-weight: 500;
}

/* ---------- Grids ---------- */
.grid { display: grid; gap: 1.25rem; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- Cards ---------- */
.card, .layer-card, .industry-card {
  border-radius: var(--radius);
  padding: 1.6rem;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
/* cards on dark sections */
.solution .card, .industries .industry-card, .vision { }
.solution .card, .industries .industry-card {
  background: var(--navy-3); border: 1px solid var(--line);
}
.solution .card:hover, .industries .industry-card:hover { transform: translateY(-4px); border-color: var(--secure); }
.solution .card h3, .industries .industry-card h3 { color: var(--text); }

/* cards on light sections */
.platform .layer-card, .why .card {
  background: #fff; border: 1px solid var(--line-ink);
  box-shadow: 0 1px 2px rgba(11, 18, 32, .04);
}
.platform .layer-card:hover, .why .card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(11, 18, 32, .10); border-color: var(--secure); }
.platform .layer-card h3, .why .card h3 { color: var(--ink); }
.platform .layer-card p, .why .card p { color: var(--muted-ink); margin-bottom: 0; }

.layer-desc { font-weight: 500; }
.feature-list { margin-top: 1rem; display: grid; gap: .45rem; }
.feature-list li { position: relative; padding-left: 1.4rem; font-size: .95rem; }
.feature-list li::before { content: ""; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; border-radius: 2px; background: var(--secure); }

/* light-section feature lists */
.platform .feature-list li { color: var(--muted-ink); }

.industry-desc { color: var(--muted-text); }
.link-cta { display: inline-block; margin-top: 1.1rem; color: var(--secure); font-weight: 600; font-family: var(--font-head); }
.link-cta:hover { color: var(--secure-dark); }

/* ---------- Vision ---------- */
.vision { background: var(--navy-2); }
.vision-lead { font-family: var(--font-head); font-size: clamp(1.3rem, 3vw, 1.9rem); font-weight: 600; color: var(--text); }

/* ---------- About ---------- */
.about p { font-size: 1.12rem; }

/* ---------- Early Access form ---------- */
.ea-form {
  background: var(--navy-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.5rem);
  display: grid; gap: 1.1rem;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: grid; gap: .4rem; }
.field label { font-size: .85rem; font-weight: 600; color: var(--muted-text); font-family: var(--font-head); }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--text);
  background: var(--navy); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .75rem .85rem; transition: border-color .2s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted-ink); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--secure); }
.field textarea { resize: vertical; }
.field input.invalid, .field select.invalid { border-color: #ff6b6b; }
.form-status { margin: 0; font-size: .95rem; min-height: 1.2em; }
.form-status.ok { color: var(--secure); }
.form-status.err { color: #ff8c8c; }

/* ---------- Contact ---------- */
.contact { background: var(--navy-2); }
.contact-email a { color: var(--secure); font-family: var(--font-head); font-size: 1.4rem; font-weight: 700; }
.contact-email { margin: 1rem 0 1.5rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); border-top: 1px solid var(--line); padding: 3rem 0 1.5rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; }
.footer-tag { color: var(--muted-text); margin: .5rem 0 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; }
.footer-nav a { color: var(--muted-text); font-size: .95rem; }
.footer-nav a:hover { color: var(--secure); }
.footer-legal { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.footer-legal p { color: var(--muted-ink); font-size: .85rem; margin: 0; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy-2); border-bottom: 1px solid var(--line);
    padding: .5rem 1.5rem 1.25rem;
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .nav-menu.open { max-height: 420px; }
  .nav-menu li { padding: .65rem 0; border-bottom: 1px solid var(--line); }
  .nav-cta { text-align: center; margin-top: .5rem; }
}
@media (max-width: 600px) {
  :root { --section-y: 4rem; }
  .grid-4, .grid-3 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .check-list.two-col { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover, .layer-card:hover, .industry-card:hover { transform: none; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
