/* ==========================================================================
   HOVERAP — Design System
   Palette: brand red #ED1C24, near-black, white
   ========================================================================== */
:root {
  --red: #ED1C24;
  --red-600: #c9151c;
  --red-glow: rgba(237, 28, 36, .35);

  --bg: #0a0b0d;
  --bg-2: #101216;
  --surface: #14171c;
  --surface-2: #1b1f26;
  --border: #262b33;

  --text: #eef0f3;
  --muted: #9aa0aa;
  --muted-2: #6b7280;

  --white: #ffffff;

  --maxw: 1180px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, .7);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", "Fira Code", Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.02em; font-weight: 800; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.section { padding: 96px 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: .78rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--red);
  margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--red); display: inline-block; }
.section-head { max-width: 640px; margin-bottom: 54px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
.section-head p { color: var(--muted); font-size: 1.08rem; margin: 0; }
.text-red { color: var(--red); }

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px;
  font-weight: 700; font-size: .95rem; cursor: pointer;
  border: 1px solid transparent; transition: transform .18s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 10px 30px -10px var(--red-glow); }
.btn-primary:hover { background: var(--red-600); box-shadow: 0 14px 36px -8px var(--red-glow); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--red); color: #fff; }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(4px); }

/* Header ----------------------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(10, 11, 13, .82);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.nav .logo img { height: 30px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 34px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-size: .92rem; font-weight: 600; color: var(--muted); position: relative; padding: 6px 0;
  transition: color .2s ease;
}
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 100%; height: 2px; background: var(--red);
}
.nav-cta { display: flex; align-items: center; gap: 16px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: .25s; }

/* Hero ------------------------------------------------------------------- */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  padding: 120px 0 80px; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 90% at 20% 30%, rgba(237,28,36,.14), transparent 55%),
    linear-gradient(180deg, rgba(10,11,13,.72) 0%, rgba(10,11,13,.86) 55%, var(--bg) 100%);
}
.hero-inner { max-width: 780px; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 5rem); margin-bottom: 22px; }
.hero h1 .accent { color: var(--red); }
.hero p { font-size: clamp(1.05rem, 2vw, 1.3rem); color: #cfd3da; max-width: 560px; margin-bottom: 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-stats { display: flex; gap: 44px; margin-top: 64px; flex-wrap: wrap; }
.hero-stats .stat strong { display: block; font-size: 2rem; font-weight: 800; }
.hero-stats .stat span { color: var(--muted); font-size: .9rem; }
.scroll-cue {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: .72rem; letter-spacing: .2em; color: var(--muted-2);
  text-transform: uppercase;
}

/* Marquee / trust strip -------------------------------------------------- */
.strip { border-block: 1px solid var(--border); background: var(--bg-2); padding: 26px 0; }
.strip-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.strip-inner .label { font-family: var(--mono); font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-2); }
.strip-logos { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.strip-logos img { height: 30px; width: auto; background: #fff; padding: 8px 14px; border-radius: 8px; opacity: .9; transition: opacity .2s; }
.strip-logos img:hover { opacity: 1; }

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

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-6px); border-color: #33404f; box-shadow: var(--shadow); }

.service-card .media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.service-card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.service-card:hover .media img { transform: scale(1.06); }
.service-card .media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(20,23,28,.9)); }
.service-card .body { padding: 28px; }
.service-card .icon {
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px;
  background: rgba(237,28,36,.12); color: var(--red); margin-bottom: 18px; margin-top: -58px; position: relative;
  border: 1px solid rgba(237,28,36,.3); backdrop-filter: blur(4px);
}
.service-card h3 { font-size: 1.4rem; }
.service-card p { color: var(--muted); margin-bottom: 20px; }
.service-card ul { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 10px; }
.service-card li { display: flex; gap: 10px; align-items: flex-start; color: #c4c9d2; font-size: .95rem; }
.service-card li::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: 8px; border-radius: 50%; background: var(--red); }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 700; font-size: .92rem; }
.link-arrow .arrow { color: var(--red); transition: transform .2s ease; }
.link-arrow:hover .arrow { transform: translateX(5px); }

/* Feature (project) ------------------------------------------------------ */
.feature { display: grid; grid-template-columns: 1.05fr 1fr; gap: 60px; align-items: center; }
.feature .media { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); position: relative; }
.feature .media img { width: 100%; height: 100%; object-fit: cover; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  background: rgba(255,255,255,.06); border: 1px solid var(--border); font-size: .78rem; color: var(--muted);
  font-family: var(--mono); letter-spacing: .04em; margin-bottom: 20px;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: #37d67a; }
.feature h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.feature p { color: var(--muted); }
.partners { display: flex; align-items: center; gap: 16px; margin-top: 26px; flex-wrap: wrap; }
.partners img { height: 32px; width: auto; background: #fff; padding: 8px 14px; border-radius: 8px; }
.feature.reverse .media { order: 2; }
.lead-list { list-style: none; padding: 0; margin: 22px 0 26px; display: grid; gap: 12px; }
.lead-list li { display: flex; gap: 12px; align-items: flex-start; color: #c8cdd5; }
.lead-list li::before { content: none; }
.lead-list li svg { flex: none; margin-top: 3px; color: var(--red); }

/* Project grid card ------------------------------------------------------ */
.project-card { display: flex; flex-direction: column; }
.project-card .media { aspect-ratio: 16 / 9; overflow: hidden; }
.project-card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.project-card:hover .media img { transform: scale(1.05); }
.project-card .body { padding: 28px; display: flex; flex-direction: column; flex: 1; }
.project-card .badge { margin-bottom: 16px; }
.project-card h3 { font-size: 1.5rem; margin-bottom: 10px; }
.project-card p { color: var(--muted); margin-bottom: 22px; }
.project-card .link-arrow { margin-top: auto; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tag { font-family: var(--mono); font-size: .72rem; letter-spacing: .05em; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; }

/* Contribution teaser ---------------------------------------------------- */
.cta-band {
  position: relative; border: 1px solid var(--border); border-radius: 20px; overflow: hidden;
  background: linear-gradient(135deg, var(--surface) 0%, var(--bg-2) 100%);
  padding: 54px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center;
}
.cta-band::before {
  content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px;
  background: radial-gradient(circle, var(--red-glow), transparent 65%); pointer-events: none;
}
.cta-band h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.cta-band p { color: var(--muted); margin: 0; }
.cta-band .actions { display: flex; justify-content: flex-end; }

/* Contact ---------------------------------------------------------------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.contact-info h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.contact-info p { color: var(--muted); }
.info-list { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 22px; }
.info-list li { display: flex; gap: 16px; align-items: flex-start; }
.info-list .ico { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); color: var(--red); }
.info-list .k { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted-2); }
.info-list .v { color: var(--text); font-weight: 600; }
.form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .82rem; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
.field input, .field textarea {
  width: 100%; padding: 13px 15px; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font: inherit; transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(237,28,36,.15); }
.form .btn { width: 100%; justify-content: center; }
.form-note { font-size: .8rem; color: var(--muted-2); margin: 14px 0 0; text-align: center; }

/* Footer ----------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-2); padding: 60px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 44px; }
.footer-brand img { height: 30px; margin-bottom: 18px; }
.footer-brand p { color: var(--muted); max-width: 300px; font-size: .95rem; }
.footer-col h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted-2); margin-bottom: 18px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.footer-col a { color: var(--muted); font-size: .95rem; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 26px; border-top: 1px solid var(--border); color: var(--muted-2); font-size: .85rem; flex-wrap: wrap; gap: 12px; }

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

/* Article (Contribution / project detail) -------------------------------- */
.page-hero { padding: 150px 0 60px; border-bottom: 1px solid var(--border); position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(80% 100% at 80% 0%, rgba(237,28,36,.12), transparent 60%); }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.page-hero .lead { color: var(--muted); font-size: 1.15rem; max-width: 640px; }
.breadcrumb { font-family: var(--mono); font-size: .78rem; color: var(--muted-2); margin-bottom: 20px; letter-spacing: .04em; }
.breadcrumb a:hover { color: var(--red); }
.article { max-width: 760px; margin-inline: auto; }
.article h2 { font-size: 1.6rem; margin-top: 2em; }
.article h3 { font-size: 1.25rem; margin-top: 1.6em; }
.article p, .article li { color: #c8cdd5; font-size: 1.05rem; }
.article a { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.article code { font-family: var(--mono); background: var(--surface-2); padding: 2px 7px; border-radius: 6px; font-size: .9em; color: #ffb3b6; }
.article pre { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 20px; overflow-x: auto; }
.article pre code { background: none; padding: 0; color: #d7dbe2; }
.article blockquote { border-left: 3px solid var(--red); margin: 1.6em 0; padding: 4px 0 4px 22px; color: var(--muted); font-style: italic; }
.meta-row { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 26px; color: var(--muted); font-size: .9rem; }
.meta-row .k { color: var(--muted-2); font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; display: block; }

/* Responsive ------------------------------------------------------------- */
@media (max-width: 960px) {
  .feature, .contact, .cta-band { grid-template-columns: 1fr; }
  .cta-band { padding: 40px; }
  .cta-band .actions { justify-content: flex-start; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .section { padding: 72px 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .nav-links {
    position: fixed; inset: 76px 0 auto 0; flex-direction: column; gap: 0;
    background: rgba(10,11,13,.97); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border);
    padding: 10px 24px 24px; transform: translateY(-120%); transition: transform .3s ease; pointer-events: none;
  }
  .nav-links.open { transform: none; pointer-events: auto; }
  .nav-links a { padding: 16px 0; width: 100%; border-bottom: 1px solid var(--border); font-size: 1.05rem; }
  .nav-toggle { display: block; }
  .nav-cta .btn { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 28px; }
}
