/* ---------- Reset & base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #130d19;
  --bg-elevated: #1c1424;
  --bg-panel: #201829;
  --purple: #6a4f92;
  --purple-deep: #3a2a4d;
  --cream: #F4F0EA;
  --cream-dim: #b6acc4;
  --cream-faint: #8a7f9c;
  --gold: #cc9f4e;
  --gold-bright: #e6bc6a;
  --line: rgba(244, 240, 234, 0.1);
  --line-strong: rgba(244, 240, 234, 0.18);
  --max-width: 1180px;
  --radius: 4px;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Hanken Grotesk', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--cream);
  background-color: var(--bg);
  background-image: radial-gradient(rgba(244, 240, 234, 0.055) 1px, transparent 1px);
  background-size: 26px 26px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

.page-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 500;
  background: radial-gradient(420px circle at var(--x, 50%) var(--y, 40%), rgba(204, 159, 78, 0.14), transparent 70%);
  transition: opacity 0.2s ease;
  opacity: 0;
}
.page-glow.active { opacity: 1; }

/* film-grain overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 18px;
}
.eyebrow::before { content: "//"; color: var(--purple); opacity: 0.9; }

section { padding: 128px 0; position: relative; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(30px, 4.4vw, 46px);
  margin-bottom: 18px;
}
h2 em, h1 em {
  font-style: italic;
  font-optical-sizing: auto;
  color: var(--gold-bright);
}

.section-head {
  max-width: 620px;
  margin: 0 auto 64px;
  text-align: center;
}
.section-head .eyebrow { justify-content: center; }
.section-head p { color: var(--cream-dim); font-size: 17px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 26px 14px 22px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.25s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
  font-family: var(--font-body);
}
.btn::before { content: ">"; font-family: var(--font-mono); opacity: 0.75; }
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--gold);
  color: #1a1220;
  border-color: var(--gold);
}
.btn-primary:hover { background: var(--gold-bright); box-shadow: 0 0 0 1px var(--gold-bright), 0 18px 40px -14px rgba(230, 188, 106, 0.55); }

.btn-ghost {
  background: transparent;
  color: var(--cream);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--gold-bright); color: var(--gold-bright); }

/* ---------- Header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(19, 13, 25, 0.78);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-display);
  font-size: 21px;
  letter-spacing: 0.01em;
  color: var(--cream);
}
.brand img { height: 48px; width: auto; }
.brand::after { content: "_"; color: var(--gold-bright); animation: blink 1.1s steps(1) infinite; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--cream-dim);
  text-transform: lowercase;
  position: relative;
  padding-bottom: 4px;
  transition: color 0.15s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0%;
  height: 1px;
  background: var(--gold-bright);
  transition: width 0.2s ease;
}
.nav-links a:hover { color: var(--cream); }
.nav-links a:hover::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 20px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--cream);
  margin: 6px 0;
  transition: 0.2s ease;
}

/* ---------- Hero ---------- */
.hero {
  padding: 76px 0 120px;
  overflow: hidden;
  position: relative;
}
.hero-atmosphere {
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 700px;
  pointer-events: none;
  background:
    radial-gradient(480px 380px at 15% 10%, rgba(106, 79, 146, 0.35), transparent 70%),
    radial-gradient(420px 340px at 85% 30%, rgba(204, 159, 78, 0.12), transparent 70%);
  filter: blur(10px);
  z-index: 0;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.hero-inner > * {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.hero-inner > *:nth-child(1) { animation-delay: 0.05s; }
.hero-inner > *:nth-child(2) { animation-delay: 0.16s; }
.hero-inner > *:nth-child(3) { animation-delay: 0.30s; }
.hero-inner > *:nth-child(4) { animation-delay: 0.42s; }
.hero-inner > *:nth-child(5) { animation-delay: 0.54s; }

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.hero h1 {
  font-size: clamp(38px, 4.6vw, 60px);
  margin-bottom: 24px;
  max-width: 620px;
}

.hero p.lead {
  font-size: 18px;
  color: var(--cream-dim);
  max-width: 500px;
  margin-bottom: 38px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 60px; }

.hero-stats {
  display: flex;
  gap: 44px;
  flex-wrap: wrap;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.hero-stats div strong {
  display: block;
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--cream);
}
.hero-stats div span {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cream-faint);
  letter-spacing: 0.02em;
}

/* ---------- Hero visual: schematic + terminal ---------- */
.hero-visual {
  position: relative;
  z-index: 1;
  height: 520px;
}
.schematic {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.65;
}
.schematic .flow {
  animation: dash 3.5s linear infinite;
}
@keyframes dash {
  to { stroke-dashoffset: -160; }
}

.terminal {
  position: absolute;
  bottom: 18px;
  right: 0;
  width: 320px;
  background: rgba(28, 20, 36, 0.9);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  opacity: 0;
  animation: fadeUp 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: 0.6s;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.terminal-bar .dot { width: 8px; height: 8px; border-radius: 50%; }
.dot.red { background: #c9636b; }
.dot.amber { background: #d1a35a; }
.dot.green { background: #7fae7a; }
.terminal-title {
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cream-faint);
}
.terminal-body { padding: 16px 16px 18px; }
.terminal-body .tl {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--cream-dim);
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  animation: typeLine 1s steps(28, end) forwards;
  margin-bottom: 9px;
}
.tl-1 { color: var(--cream-faint); animation-delay: 1.0s; }
.tl-2 { color: var(--gold-bright); animation-delay: 2.1s; }
.tl-3 { animation-delay: 3.2s; }
.tl-4 { animation-delay: 4.0s; margin-bottom: 0; }
.tl-5 { color: var(--cream); animation-delay: 4.8s; }
@keyframes typeLine { to { width: 100%; } }
.cursor {
  display: inline-block;
  width: 7px;
  height: 13px;
  background: var(--gold-bright);
  margin-left: 3px;
  vertical-align: -2px;
  animation: blink 0.9s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.service-card {
  background: var(--bg);
  padding: 44px 40px;
  transition: background 0.25s ease;
  position: relative;
}
.service-card:hover { background: var(--bg-elevated); }
.service-card:hover .service-icon { border-color: var(--gold-bright); color: var(--gold-bright); }

.service-index {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cream-faint);
  margin-bottom: 20px;
  display: block;
}

.service-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: var(--cream-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.service-card h3 {
  font-size: 21px;
  margin-bottom: 12px;
  color: var(--cream);
  font-weight: 400;
}

.service-card p {
  color: var(--cream-dim);
  font-size: 15px;
  margin-bottom: 18px;
}

.service-card ul li {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--cream-faint);
  padding-left: 18px;
  position: relative;
  margin-bottom: 8px;
}
.service-card ul li::before {
  content: "\2192";
  position: absolute;
  left: 0;
  color: var(--gold);
}

/* ---------- Approach ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.step {
  padding: 34px 26px;
  background: var(--bg);
  transition: background 0.25s ease, border-color 0.25s ease;
  border-top: 2px solid transparent;
}
.step:hover { background: var(--bg-elevated); border-top-color: var(--gold); }
.step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.step .num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--gold-bright);
}
.step-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cream-faint);
  border: 1px solid var(--line-strong);
  padding: 3px 8px;
  border-radius: 2px;
}
.step h4 { font-size: 19px; margin-bottom: 10px; font-weight: 400; }
.step p { font-size: 14px; color: var(--cream-dim); }

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 72px;
  align-items: center;
}
.about-visual {
  aspect-ratio: 4 / 5;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(circle at 30% 20%, rgba(106, 79, 146, 0.28), transparent 60%),
    var(--bg-elevated);
}
.about-visual::before,
.about-visual::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 1px solid var(--gold-bright);
}
.about-visual::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.about-visual::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.about-visual img { width: 58%; opacity: 0.95; position: relative; z-index: 1; }

.about-copy p { color: var(--cream-dim); margin-bottom: 16px; font-size: 16px; }

.about-points {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}
.about-points div {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
  color: var(--cream);
}
.about-points div span.mark {
  flex: none;
  font-family: var(--font-mono);
  color: var(--gold-bright);
  margin-top: 2px;
}

/* ---------- CTA ---------- */
.cta {
  position: relative;
  border: 1px solid var(--line-strong);
  padding: 76px 48px;
  text-align: center;
  background:
    radial-gradient(560px 260px at 50% 0%, rgba(106, 79, 146, 0.28), transparent 70%),
    var(--bg-elevated);
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px transparent;
  border-top: 2px solid var(--gold);
}
.cta h2 { color: var(--cream); max-width: 560px; margin: 0 auto 18px; }
.cta p { color: var(--cream-dim); max-width: 520px; margin: 0 auto 40px; font-size: 17px; }
.cta-actions { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}
.contact-info h3 { color: var(--cream); font-size: 26px; margin-bottom: 16px; font-weight: 400; }
.contact-info p { color: var(--cream-dim); margin-bottom: 28px; }
.contact-detail {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--cream-dim);
}
.contact-detail .ic {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-strong);
  color: var(--gold-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

form.contact-form {
  background: var(--bg-elevated);
  border: 1px solid var(--line-strong);
  padding: 34px;
  display: grid;
  gap: 18px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--cream-faint);
  margin-bottom: 8px;
  display: block;
  text-transform: lowercase;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 2px;
  border: 1px solid var(--line-strong);
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--bg);
  color: var(--cream);
}
.contact-form textarea { resize: vertical; min-height: 100px; }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 1px var(--gold-bright);
}
.form-note { font-family: var(--font-mono); font-size: 12px; color: var(--cream-faint); }

.form-status {
  display: none;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #e08a8a;
  background: rgba(224, 138, 138, 0.1);
  border: 1px solid rgba(224, 138, 138, 0.35);
  padding: 10px 14px;
  border-radius: 2px;
}
.form-status.show { display: block; }

.field-error {
  display: none;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #e08a8a;
  margin-top: 6px;
}
.contact-form.attempted input:invalid,
.contact-form.attempted textarea:invalid {
  border-color: #e08a8a;
  box-shadow: 0 0 0 1px #e08a8a;
}
.contact-form.attempted input:invalid ~ .field-error,
.contact-form.attempted textarea:invalid ~ .field-error {
  display: block;
}

/* ---------- Footer ---------- */
footer {
  padding: 64px 0 28px;
  border-top: 1px solid var(--line);
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--line);
}
.footer-brand { display: inline-flex; align-items: center; gap: 3px; }
.footer-brand img { height: 48px; opacity: 0.9; }
.footer-brand::after { content: "_"; font-family: var(--font-display); font-size: 21px; color: var(--gold-bright); animation: blink 1.1s steps(1) infinite; }
.footer-tag { font-size: 14px; max-width: 260px; margin-top: 14px; color: var(--cream-faint); }
.footer-links { display: flex; gap: 72px; flex-wrap: wrap; }
.footer-links h5 {
  font-family: var(--font-mono);
  color: var(--cream-faint);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  margin-bottom: 16px;
  font-weight: 500;
}
.footer-links ul li { margin-bottom: 11px; font-size: 14px; color: var(--cream-dim); }
.footer-links ul li a:hover { color: var(--gold-bright); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 26px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cream-faint);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-socials { display: flex; gap: 14px; }
.footer-socials a {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cream-dim);
}
.footer-socials a:hover { border-color: var(--gold-bright); color: var(--gold-bright); }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  filter: blur(3px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.7s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); filter: blur(0); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .services-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .about { grid-template-columns: 1fr; }
  .about-visual { max-width: 320px; margin: 0 auto; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-links, .nav-actions .btn-ghost { display: none; }
  .nav-toggle { display: block; }
  header.open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    padding: 22px 28px;
    gap: 20px;
    border-bottom: 1px solid var(--line);
  }
  section { padding: 76px 0; }
  .hero { padding: 56px 0 64px; }
  .hero-stats { gap: 30px; }
  .form-row { grid-template-columns: 1fr; }
  .cta { padding: 52px 26px; }
  .steps { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; }
}
