/* ============================================================
   Photon — landing page
   Design system adapted from DESIGN-composio.md
   Flat brand voltage replaced by Photon's wave→particle
   cyan→violet gradient (from the logo).
   ============================================================ */

:root {
  /* Brand — Photon gradient (wave → particle, from logo) */
  --grad-a: #16c8ff;   /* cyan wave */
  --grad-b: #4f6dff;   /* blue transit */
  --grad-c: #a855f7;   /* violet particle */
  --brand-gradient: linear-gradient(105deg, var(--grad-a) 0%, var(--grad-b) 48%, var(--grad-c) 100%);
  --brand: #4f6dff;          /* single voltage for solid CTAs */
  --brand-active: #3f57d6;
  --brand-glow: #4f6dff;

  --accent-cyan: #00d4ff;
  --accent-violet: #7b3aed;

  /* Surface */
  --canvas: #0f0f0f;
  --canvas-deep: #000000;
  --surface-card: #181818;
  --surface-elevated: #222222;
  --surface-strong: #2a2a2a;

  /* Hairlines */
  --hairline: #222222;
  --hairline-soft: #1a1a1a;
  --hairline-strong: #333333;

  /* Text */
  --ink: #ffffff;
  --body: #a8a8a8;
  --body-strong: #ffffff;
  --muted: #888888;
  --muted-soft: #666666;

  /* Semantic */
  --success: #33d17a;
  --error: #ff4d4d;

  /* Radius */
  --r-xs: 4px; --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px; --r-pill: 9999px;

  /* Spacing */
  --s-xxs: 4px; --s-xs: 8px; --s-sm: 12px; --s-base: 16px; --s-md: 20px;
  --s-lg: 24px; --s-xl: 32px; --s-xxl: 48px; --s-section: 96px;

  --font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --max: 1200px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--body);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { color: var(--ink); font-weight: 500; margin: 0; }
p { margin: 0; }
::selection { background: rgba(79,109,255,0.35); color: #fff; }

/* ---------- Utilities ---------- */
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: var(--s-section) 0; position: relative; }
.eyebrow {
  font-size: 11px; font-weight: 600; line-height: 1.4; letter-spacing: 0.88px;
  text-transform: uppercase; color: var(--muted);
  display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand-gradient);
}
.gradient-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hairline { height: 1px; background: var(--hairline); border: 0; margin: 0; }

/* Badge pill */
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface-elevated); color: var(--body-strong);
  font-size: 11px; font-weight: 600; letter-spacing: 0.88px; text-transform: uppercase;
  border-radius: var(--r-pill); padding: 5px 12px;
  border: 1px solid var(--hairline-strong);
}
.badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--success); box-shadow: 0 0 8px var(--success);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-sans); font-size: 14px; font-weight: 500; line-height: 1;
  height: 40px; padding: 0 18px; border-radius: var(--r-md);
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  color: #fff; background: var(--brand); position: relative;
  background-image: var(--brand-gradient); background-size: 160% 160%;
  box-shadow: 0 0 0 rgba(79,109,255,0);
}
.btn-primary:hover {
  box-shadow: 0 8px 30px -8px rgba(79,109,255,0.6);
  animation: gradientShift 3s ease infinite;
}
@keyframes gradientShift {
  0%,100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.btn-secondary {
  color: var(--body-strong); background: var(--surface-elevated);
  border-color: var(--hairline-strong);
}
.btn-secondary:hover { background: var(--surface-strong); border-color: #444; }
.btn-outline {
  color: var(--body-strong); background: transparent; border-color: var(--hairline-strong);
}
.btn-outline:hover { border-color: #555; background: rgba(255,255,255,0.03); }
.btn-lg { height: 46px; padding: 0 24px; font-size: 15px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; height: 64px;
  background: rgba(15,15,15,0.72); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline-soft);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; color: #fff; letter-spacing: -0.02em; }
.brand img { height: 30px; width: auto; }
.brand .wordmark { font-size: 18px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--body); transition: color .15s ease; }
.nav-links a:hover { color: #fff; }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: #fff; margin: 4px 0; transition: .25s; border-radius: 2px; }

/* ---------- Hero ---------- */
.hero { padding-top: 80px; padding-bottom: 80px; text-align: center; position: relative; overflow: hidden; }
.spotlight {
  position: absolute; left: 50%; top: 6%; transform: translateX(-50%);
  width: 900px; height: 700px; pointer-events: none; z-index: 0;
  background: radial-gradient(closest-side,
    rgba(79,109,255,0.28), rgba(168,85,247,0.12) 45%, transparent 72%);
  filter: blur(8px);
}
.hero .container { position: relative; z-index: 1; }
.hero h1 {
  font-size: clamp(38px, 7vw, 72px); line-height: 1.04; letter-spacing: -0.03em;
  margin: 22px auto 0; max-width: 15ch;
}
.hero .sub {
  font-size: clamp(16px, 2.2vw, 19px); color: var(--body);
  max-width: 60ch; margin: 22px auto 0; line-height: 1.55;
}
.hero-cta { display: flex; gap: 12px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.hero-meta {
  display: flex; gap: 28px; justify-content: center; margin-top: 40px; flex-wrap: wrap;
  color: var(--muted); font-size: 13px;
}
.hero-meta b { color: #fff; font-weight: 600; }

/* ---------- Terminal mockup (2x2) ---------- */
.terminal-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  background: var(--canvas-deep); border: 1px solid var(--hairline);
  border-radius: var(--r-xl); padding: 20px; margin: 56px auto 0; max-width: 940px;
  box-shadow: 0 40px 120px -40px rgba(79,109,255,0.35);
}
.pane {
  background: var(--surface-card); border: 1px solid var(--hairline);
  border-radius: var(--r-lg); padding: 16px 18px; text-align: left;
  font-family: var(--font-mono); font-size: 13px; line-height: 1.55;
  overflow: hidden; min-height: 168px;
}
.pane-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
  color: var(--muted); font-size: 11px; letter-spacing: 0.4px;
}
.pane-dots { display: flex; gap: 6px; }
.pane-dots i { width: 9px; height: 9px; border-radius: 50%; background: #333; display: block; }
.pane-dots i:nth-child(1){ background:#ff5f57; } .pane-dots i:nth-child(2){ background:#febc2e; } .pane-dots i:nth-child(3){ background:#28c840; }
.pane code { display: block; white-space: pre; color: var(--body); }
.code-line { display: block; }
.c-key { color: #7b9dff; } .c-str { color: #57d6a0; } .c-num { color: #d6a057; }
.c-com { color: #5a5a5a; } .c-fn { color: #b78cff; } .c-cyan { color: var(--accent-cyan); }
.cursor { display:inline-block; width:8px; height:15px; background: var(--accent-cyan);
  vertical-align: text-bottom; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.bar { height: 6px; border-radius: 3px; background: var(--surface-elevated); margin: 7px 0; overflow: hidden; }
.bar > span { display:block; height:100%; background: var(--brand-gradient); width: 0; border-radius:3px; }

/* ---------- Marquee (logos / values) ---------- */
.marquee { border-top: 1px solid var(--hairline-soft); border-bottom: 1px solid var(--hairline-soft); padding: 22px 0; overflow: hidden; }
.marquee-track { display: flex; gap: 56px; width: max-content; animation: scrollX 28s linear infinite; color: var(--muted); font-family: var(--font-mono); font-size: 13px; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { display:inline-flex; align-items:center; gap:10px; white-space: nowrap; }
.marquee-track span::before { content:"//"; color: var(--brand); }
@keyframes scrollX { to { transform: translateX(-50%); } }

/* ---------- Section headers ---------- */
.section-head { max-width: 720px; }
.section-head.center { margin: 0 auto; text-align: center; }
.section-head h2 { font-size: clamp(28px, 4vw, 44px); line-height: 1.1; letter-spacing: -0.02em; margin-top: 16px; }
.section-head p { color: var(--body); margin-top: 16px; font-size: 17px; }

/* ---------- Edge / process ---------- */
.edge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 56px; }
.card {
  background: var(--surface-card); border: 1px solid var(--hairline);
  border-radius: var(--r-xl); padding: 28px;
  transition: border-color .25s ease, transform .25s ease, background .25s ease;
}
.card:hover { border-color: var(--hairline-strong); transform: translateY(-3px); }
.card .ic {
  width: 44px; height: 44px; border-radius: var(--r-md);
  background: var(--surface-elevated); border: 1px solid var(--hairline-strong);
  display: grid; place-items: center; margin-bottom: 18px; color: #fff;
}
.card .ic svg { width: 22px; height: 22px; }
.card h3 { font-size: 18px; font-weight: 600; color: #fff; }
.card p { margin-top: 10px; font-size: 15px; line-height: 1.55; }

/* ---------- Process steps ---------- */
.steps { margin-top: 56px; display: grid; gap: 0; border: 1px solid var(--hairline); border-radius: var(--r-xl); overflow: hidden; }
.step { display: grid; grid-template-columns: 88px 1fr; gap: 24px; padding: 28px 32px; border-bottom: 1px solid var(--hairline); background: var(--surface-card); transition: background .25s; }
.step:last-child { border-bottom: 0; }
.step:hover { background: #1c1c1c; }
.step-n { font-family: var(--font-mono); font-size: 28px; font-weight: 500; }
.step-body h3 { font-size: 19px; font-weight: 600; color: #fff; }
.step-body p { margin-top: 8px; font-size: 15px; max-width: 62ch; }

/* ---------- Portfolio ---------- */
.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 56px; }
.proj {
  background: var(--surface-card); border: 1px solid var(--hairline);
  border-radius: var(--r-xl); overflow: hidden; display: flex; flex-direction: column;
  transition: border-color .25s, transform .25s;
}
.proj:hover { border-color: var(--hairline-strong); transform: translateY(-3px); }
.proj-top { padding: 22px 24px 0; }
.proj-tag { font-family: var(--font-mono); font-size: 11px; color: var(--brand); letter-spacing: .5px; }
.proj h3 { font-size: 21px; font-weight: 600; color: #fff; margin-top: 12px; }
.proj p { padding: 12px 24px 0; font-size: 14.5px; line-height: 1.6; flex: 1; }
.proj .placeholder { color: var(--muted-soft); font-style: italic; }
.proj-foot { padding: 20px 24px 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 11px; font-family: var(--font-mono); color: var(--body); background: var(--surface-elevated); border: 1px solid var(--hairline-strong); border-radius: var(--r-sm); padding: 4px 9px; }
.proj-visual { height: 158px; margin: 20px 24px 0; border-radius: var(--r-lg); border: 1px solid var(--hairline); background: var(--canvas-deep); position: relative; overflow: hidden; }
.proj-visual img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; transition: transform .5s cubic-bezier(.22,1,.36,1); }
.proj:hover .proj-visual img { transform: scale(1.04); }
.proj-visual::after { content:""; position:absolute; inset:0; pointer-events:none; background: linear-gradient(to bottom, transparent 55%, rgba(15,15,15,0.55)); }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; position: relative; overflow: hidden; border-top: 1px solid var(--hairline-soft); }
.cta-band .spotlight { top: -20%; opacity: .9; }
.cta-band h2 { font-size: clamp(30px, 4.5vw, 46px); line-height: 1.1; letter-spacing: -0.02em; max-width: 20ch; margin: 0 auto; }
.cta-band p { color: var(--body); margin: 18px auto 0; max-width: 52ch; font-size: 17px; }
.cta-band .hero-cta { margin-top: 30px; }

/* ---------- Footer ---------- */
.footer { background: var(--canvas); border-top: 1px solid var(--hairline); padding: 56px 0 40px; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.footer .brand { margin-bottom: 14px; }
.footer .about { font-size: 14px; max-width: 40ch; }
.footer h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .88px; color: var(--muted); font-weight: 600; margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer ul a, .footer ul li { font-size: 14px; color: var(--body); }
.footer ul a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--hairline); color: var(--muted); font-size: 13px; flex-wrap: wrap; gap: 12px; }

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

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .edge-grid, .portfolio-grid { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .section { padding: 64px 0; }
  .nav-links, .nav-cta .btn-outline { display: none; }
  .nav-toggle { display: block; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--canvas); border-bottom: 1px solid var(--hairline); padding: 20px 24px; gap: 18px;
  }
  .terminal-grid { grid-template-columns: 1fr; }
  .pane:nth-child(n+3) { display: none; }
  .edge-grid, .portfolio-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .step { grid-template-columns: 1fr; gap: 8px; padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
