/* ══════════════════════════════════════════════════════════════
   Rekz Dev — v3
   Dark, atmospheric, developer-native. Ember accent (re-themable).
   ══════════════════════════════════════════════════════════════ */

/* ── Reset & base ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

:root {
  /* Accent — Ember (default). Re-theme by overriding these six. */
  --accent:       #F97316;
  --accent-soft:  #ffb27a;
  --accent-ink:   #0A0A0A;   /* text on accent */
  --accent-glow:  rgba(249,115,22,.46);
  --accent-beam:  rgba(249,115,22,.16);
  --hero-bg:      radial-gradient(118% 100% at 76% 42%, #2a1206 0%, #140b09 40%, #09090b 74%);

  /* Neutrals */
  --bg:        #09090b;
  --bg-alt:    #0c0c0f;
  --card:      #111114;
  --heading:   #F6F3F0;
  --text:      #E8EEFF;
  --body:      #a9a9b5;
  --body-dim:  #9a9aa6;
  --body-warm: #a4a4b0;
  --muted:     #8a8a99;
  --muted-2:   #7f7f8c;
  --muted-3:   #71717e;

  /* Type */
  --font-display: 'Space Grotesk', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Layout */
  --maxw:  1160px;
  --pad-y: clamp(72px, 11vh, 128px);
  --pad-x: clamp(20px, 5vw, 56px);
  --nav-h: 71px;
}

/* Signal (blue) accent — reference variant, not shipped. Enable with
   <div data-accent="signal"> on a wrapper, or set on :root. */
:root[data-accent="signal"], [data-accent="signal"] {
  --accent:       #3D8EFF;
  --accent-soft:  #8fbaff;
  --accent-ink:   #04122b;
  --accent-glow:  rgba(61,142,255,.4);
  --accent-beam:  rgba(61,142,255,.14);
  --hero-bg:      radial-gradient(118% 100% at 76% 42%, #0b1c33 0%, #0a1119 42%, #07090d 76%);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-soft); }
::selection { background: var(--accent); color: #0A0A0A; }

/* ── Keyframes ────────────────────────────────────── */
@keyframes rk-rise    { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes rk-breathe { 0%,100% { opacity: .58; transform: scale(1); } 50% { opacity: .92; transform: scale(1.07); } }
@keyframes rk-drift   { 0% { transform: translate(0,0); opacity: 0; } 20% { opacity: .7; } 80% { opacity: .4; } 100% { transform: translate(-6px,-72px); opacity: 0; } }
@keyframes rk-pulse   { 0%,100% { opacity: .4; } 50% { opacity: 1; } }
@keyframes rk-float   { 0%,100% { transform: translateY(-50%); } 50% { transform: translateY(calc(-50% - 9px)); } }
@keyframes rk-draw    { to { stroke-dashoffset: 0; } }

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

/* ── Shared utilities ─────────────────────────────── */
.container { max-width: var(--maxw); margin: 0 auto; padding: var(--pad-y) var(--pad-x); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-head { margin-bottom: clamp(40px, 6vh, 64px); max-width: 640px; }
.section-head h2 {
  font-size: clamp(32px, 4.4vw, 54px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -.025em;
  color: var(--heading);
}

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 15px;
  border-radius: 11px;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s ease, color .2s ease;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); font-weight: 700; padding: 15px 28px; border: none; }
.btn-primary:hover { background: var(--accent-soft); color: var(--accent-ink); transform: translateY(-1px); }
.btn-ghost { border: 1px solid #ffffff2b; color: var(--text); padding: 15px 26px; }
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }

/* ── Nav ──────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--pad-x);
  background: rgba(9,9,11,.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #ffffff12;
}
.nav-logo img { height: 34px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 32px);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--text); }
/* a.nav-cta needs to outrank .nav-links a / .nav-links a:hover,
   which otherwise win on specificity and paint the CTA text grey. */
.nav-links a.nav-cta, .nav-links a.nav-cta:hover {
  color: var(--accent-ink);
  background: var(--accent);
  padding: 9px 18px;
  border-radius: 9px;
  font-weight: 700;
}
.nav-links a.nav-cta:hover { background: var(--accent-soft); }

/* ── Hero ─────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100svh - var(--nav-h));
  overflow: hidden;
  background: var(--hero-bg);
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(#ffffff0a 1px, transparent 1px),
    linear-gradient(90deg, #ffffff0a 1px, transparent 1px);
  background-size: 52px 52px;
}
.hero-beam {
  position: absolute; top: -10%; right: 4%;
  width: 52%; height: 120%;
  background: linear-gradient(200deg, var(--accent-beam), transparent 55%);
  transform: rotate(4deg);
  filter: blur(8px);
}
.hero-glow {
  position: absolute;
  width: 44vw; max-width: 720px; aspect-ratio: 1;
  right: 3%; top: 50%; transform: translateY(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, rgba(0,0,0,0) 66%);
  animation: rk-breathe 8s ease-in-out infinite;
}
.hero-dog {
  position: absolute; right: 5%; top: 52%;
  transform: translateY(-50%);
  width: auto;                    /* override the width/height attr hints so the image scales proportionally */
  height: min(74vh, 640px);
  height: min(74svh, 640px);
  filter: brightness(1.16)
          drop-shadow(0 0 3px rgba(255,190,140,.5))
          drop-shadow(0 0 30px var(--accent-glow));
  animation: rk-float 10s ease-in-out infinite;
}
.hero-mote { position: absolute; border-radius: 50%; background: var(--accent-soft); }
.hero-mote-1 { left: 64%; top: 44%; width: 3px; height: 3px; box-shadow: 0 0 7px var(--accent); animation: rk-drift 9s ease-in-out infinite; }
.hero-mote-2 { left: 70%; top: 38%; width: 2px; height: 2px; box-shadow: 0 0 6px var(--accent); animation: rk-drift 11s ease-in-out 2.5s infinite; }
.hero-scrim-bottom {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 180px;
  background: linear-gradient(180deg, transparent, #09090b);
  z-index: 1; pointer-events: none;
}
/* Mobile-only scrim behind the copy (see mobile query) */
.hero-scrim-copy { display: none; }

.hero-inner {
  position: relative; z-index: 2;
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(48px, 9vh, 120px) var(--pad-x) 40px;
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
  animation: rk-rise .7s ease both;
}
.hero h1 {
  font-size: clamp(48px, 8vw, 92px);
  line-height: .94; font-weight: 700; letter-spacing: -.03em;
  color: var(--heading); max-width: 12ch;
  animation: rk-rise .8s ease .08s both;
}
.hero-sub {
  margin-top: 26px;
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.6; color: var(--body); max-width: 460px;
  animation: rk-rise .8s ease .2s both;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 34px; animation: rk-rise .8s ease .32s both; }
.hero-cred { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 44px; animation: rk-rise .8s ease .44s both; }
.hero-avail {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-soft);
}
.hero-avail-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: rk-pulse 1.6s ease-in-out infinite; }
.hero-cred-divider { width: 1px; height: 16px; background: #ffffff22; }
.hero-chips {
  display: flex; gap: 10px; flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted-2);
}
.hero-chips span { border: 1px solid #ffffff1c; padding: 6px 11px; border-radius: 7px; }

/* ── Dark gradient section (Why / About) ──────────── */
.section-alt {
  background: linear-gradient(180deg, #09090b, #0c0c0f 16%, #0c0c0f 84%, #09090b);
}

/* ── What we do (#capabilities) ───────────────────── */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 18px;
}
.card {
  background: var(--card);
  border: 1px solid #ffffff14;
  border-radius: 16px;
  padding: 30px 28px;
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card-index {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: 22px;
}
.card h3 { font-size: 23px; font-weight: 600; color: var(--heading); margin-bottom: 10px; }
.card p { font-size: 15.5px; line-height: 1.6; color: var(--body-dim); margin-bottom: 18px; }
.tags {
  display: flex; gap: 8px; flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted-3);
}
.tags span { border: 1px solid #ffffff16; padding: 5px 10px; border-radius: 6px; }

/* ── Why us (#why) ────────────────────────────────── */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(24px, 4vw, 56px);
}
.why-bar { display: block; height: 3px; width: 40px; background: var(--accent); border-radius: 2px; margin-bottom: 22px; }
.why-item h3 { font-size: 21px; font-weight: 600; color: var(--heading); margin-bottom: 10px; }
.why-item p { font-size: 15.5px; line-height: 1.65; color: var(--body-dim); }

/* ── Process (#process) ───────────────────────────── */
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
}
.process-step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.process-index {
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 700; letter-spacing: .1em;
  color: var(--accent);
}
.process-rule { flex: 1; height: 1px; background: linear-gradient(90deg, var(--accent), transparent); }
.process-rule--end { background: linear-gradient(90deg, transparent, transparent); }
.process-step h3 { font-size: 19px; font-weight: 600; color: var(--heading); margin-bottom: 8px; }
.process-step p { font-size: 14.5px; line-height: 1.6; color: var(--body-dim); }

/* ── About (#about) ───────────────────────────────── */
.about { position: relative; overflow: hidden; }
.about-watermark {
  position: absolute; right: -40px; bottom: -30px;
  height: min(70%, 460px); width: auto;
  opacity: .06; filter: invert(1);
  pointer-events: none;
}
.about-inner { position: relative; z-index: 1; }
.about-copy { max-width: 720px; }
.about-copy h2 {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08; font-weight: 700; letter-spacing: -.025em;
  color: var(--heading);
  margin-bottom: 26px;
}
.about-copy p {
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.7; color: var(--body-warm);
  margin-bottom: 18px;
}
.about-copy p:last-child { margin-bottom: 0; }

/* ── Contact (#contact) ───────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
.contact-copy h2 {
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.02; font-weight: 700; letter-spacing: -.025em;
  color: var(--heading);
  margin-bottom: 20px;
}
.contact-copy p { font-size: 17px; line-height: 1.65; color: var(--body-dim); max-width: 400px; }

.contact-form { display: flex; flex-direction: column; gap: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
}
.field input, .field textarea {
  background: #0e0e11;
  border: 1px solid #ffffff1c;
  border-radius: 9px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 15px;
  padding: 13px 15px;
  outline: none;
  transition: border-color .2s ease;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.contact-form .btn { align-self: flex-start; }
.form-error { color: #ff6b6b; font-size: 14px; }
.form-success h3 { font-size: 21px; font-weight: 600; color: var(--heading); margin-bottom: 8px; }
.form-success p { font-size: 16px; line-height: 1.6; color: var(--body-dim); }

/* ── Footer ───────────────────────────────────────── */
.footer { border-top: 1px solid #ffffff12; background: var(--bg); }
.footer-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 44px var(--pad-x);
  display: flex; flex-wrap: wrap; gap: 28px;
  align-items: center; justify-content: space-between;
}
.footer-logo img { height: 30px; width: auto; }
.footer-nav { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.footer-links { display: flex; gap: 26px; flex-wrap: wrap; justify-content: center; }
.footer-links a, .footer-privacy {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
}
.footer-links a:hover, .footer-privacy:hover { color: var(--text); }
.footer-privacy { color: var(--muted-2); }
.footer-copy {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .08em;
  color: #5f5f6b;
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 768px) {
  /* Mobile nav: logo + CTA only */
  .nav-links a:not(.nav-cta) { display: none; }
  .nav-logo img { height: 28px; }
  .nav-cta { white-space: nowrap; }

  /* Hero: demote the dog to an atmospheric backdrop behind the copy */
  .hero { min-height: auto; }
  .hero-inner { padding: clamp(40px, 12vh, 84px) var(--pad-x) 64px; }
  .hero-dog {
    height: min(52svh, 420px);
    right: -12%;
    opacity: .42;
  }
  .hero-glow { right: -10%; width: 78vw; }
  .hero-scrim-copy {
    display: block;
    position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(90deg, #09090b 28%, rgba(9,9,11,.55) 62%, rgba(9,9,11,0) 100%);
    pointer-events: none;
  }

  /* Contact form: single-column name/email on narrow screens */
  .field-row { grid-template-columns: 1fr; }

  /* Footer: stack and center */
  .footer-inner { flex-direction: column; text-align: center; gap: 22px; }
}

/* ── Reduced motion ───────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}
