/* ============================================================
   PVCIC — Secure. Zero-Carbon. Efficient.
   Restrained infrastructure aesthetic: hairline rules,
   generous whitespace, mono instrumentation, one signal trace.
   ============================================================ */

:root {
  --ink: #0f172a;
  --ink-8: rgba(15, 23, 42, 0.08);
  --white: #ffffff;
  --paper: #f8fafc;
  --text: #2d3748;
  --text-dark: #e2e8f0;
  --muted: #94a3b8;
  --line: rgba(15, 23, 42, 0.09);
  --line-dark: rgba(255, 255, 255, 0.1);
  /* 60deg isometric hex grid for dark sections — white strokes at ~6% */
  --hex-grid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='35' height='60' viewBox='0 0 35 60'%3E%3Cg fill='none' stroke='%23FFFFFF' stroke-opacity='0.06' stroke-width='1'%3E%3Cpath d='M17.3 0 L32.3 8.7 L32.3 26 L17.3 34.7 L2.3 26 L2.3 8.7 Z'/%3E%3Cpath d='M17.3 30 L32.3 38.7 L32.3 56 L17.3 64.7 L2.3 56 L2.3 38.7 Z'/%3E%3Cpath d='M17.3 -30 L32.3 -21.3 L32.3 -4 L17.3 4.7 L2.3 -4 L2.3 -21.3 Z'/%3E%3C/g%3E%3C/svg%3E");
  --green: #00d084;
  --blue: #00a3ff;
  --gradient: linear-gradient(135deg, #00d084 0%, #00a3ff 100%);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica,
    Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", SFMono-Regular,
    Menlo, Consolas, monospace;
  --container: 1160px;
  --radius: 10px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* Prevent mobile browsers from scroll-anchoring to the bottom when
     async layout settles (webfont/image load); we always want top on load. */
  overflow-anchor: none;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

section {
  scroll-margin-top: 72px;
}

::selection {
  background: rgba(0, 208, 132, 0.22);
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.section {
  padding-block: clamp(88px, 11vw, 132px);
}

/* ---------- Dark sections (Hero, Footer) ---------- */
/* deep navy field with a barely-there white 60deg isometric hex grid */
.dark-section {
  position: relative;
  background-color: var(--ink);
  color: var(--text-dark);
}

.dark-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hex-grid);
  background-size: 38px 66px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

.dark-section > * {
  position: relative;
  z-index: 1;
}

.dark-section .eyebrow {
  color: var(--green);
}

.hero-inner {
  position: relative;
  z-index: 1;
}

/* ---------- Eyebrow / labels ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 28px;
  line-height: 1.8;
}

.eyebrow-line {
  display: inline-block;
  width: 28px;
  height: 2px;
  background: var(--gradient);
  border-radius: 1px;
}

.section-title {
  font-size: clamp(30px, 4.2vw, 48px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 24px;
  max-width: 22ch;
}

.section-lead {
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.65;
  color: var(--text);
  max-width: 64ch;
}

.section-head {
  margin-bottom: 72px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 150ms ease-out, box-shadow 150ms ease-out,
    background-position 300ms var(--ease-out), background-color 150ms ease-out,
    border-color 150ms ease-out;
  white-space: nowrap;
}

.btn-primary {
  color: #0b1f16;
  background: var(--gradient);
  background-size: 160% 160%;
  background-position: 0% 50%;
}

.btn-primary:hover {
  background-position: 100% 50%;
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -10px rgba(0, 180, 160, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
}

/* pill CTA — bold 2px #00D084→#00A3FF gradient ring with white text,
   sitting on the dark glass nav. On hover a faint gradient body and glow. */
.btn-pill {
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  border: 2px solid transparent;
  background:
    linear-gradient(var(--ink), var(--ink)) padding-box,
    var(--gradient) border-box;
}

.btn-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px -12px rgba(0, 163, 255, 0.65);
  background:
    linear-gradient(
        rgba(0, 208, 132, 0.16),
        rgba(0, 163, 255, 0.16)
      )
      padding-box,
    linear-gradient(135deg, #00b874, #008fe6) border-box;
}

.btn-nav-platform {
  margin-right: 4px;
}

/* launch CTA — solid #00D084→#00A3FF gradient body, white text, soft
   ambient glow at rest; used in Hero and on the flagship service card.
   On hover the gradient brightens and the button lifts slightly. */
.btn-launch {
  border-radius: 999px;
  font-weight: 700;
  color: var(--white);
  border: 2px solid transparent;
  background:
    var(--gradient) padding-box,
    var(--gradient) border-box;
  box-shadow: 0 8px 30px rgba(0, 163, 255, 0.28);
}

.btn-launch:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 44px -10px rgba(0, 208, 132, 0.5),
    0 8px 26px -8px rgba(0, 163, 255, 0.4);
  background:
    linear-gradient(135deg, #18d993, #1ab4ff) padding-box,
    linear-gradient(135deg, #18d993, #1ab4ff) border-box;
}

.btn-launch--card {
  margin-top: auto;
  align-self: flex-start;
  padding: 12px 22px;
  font-size: 14px;
}

.btn-lg {
  padding: 16px 34px;
  font-size: 16px;
}

.btn-icon {
  width: 18px;
  height: 18px;
}

/* ---------- Header / Navigation ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: background-color 200ms ease, box-shadow 200ms ease,
    border-color 200ms ease;
}

.site-header.scrolled {
  background: rgba(15, 23, 42, 0.94);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px -18px rgba(0, 0, 0, 0.6);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 27px;
  height: auto;
  filter: drop-shadow(0 0 10px rgba(0, 163, 255, 0.45));
}

.site-footer .brand-mark {
  width: 30px;
  filter: drop-shadow(0 0 10px rgba(0, 163, 255, 0.35));
}

.brand-text {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.06em;
  color: var(--white);
  transition: color 200ms ease;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-link {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted);
  transition: color 150ms ease;
}

.nav-link:hover {
  color: var(--white);
}

/* hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: var(--white);
  transition: transform 200ms ease, background-color 200ms ease;
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 72px;
}

.hero-glow {
  position: absolute;
  right: -12vw;
  bottom: -18vw;
  width: 55vw;
  height: 55vw;
  max-width: 760px;
  max-height: 760px;
  background: radial-gradient(
    circle at 62% 38%,
    rgba(0, 163, 255, 0.16) 0%,
    rgba(0, 208, 132, 0.12) 38%,
    transparent 68%
  );
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  padding-top: clamp(48px, 9vh, 96px);
  padding-bottom: clamp(56px, 8vh, 88px);
}

.hero-title {
  font-size: clamp(44px, 7.5vw, 92px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--white);
  margin: 0;
}

.hero-sub {
  font-size: clamp(16px, 1.7vw, 20px);
  line-height: 1.65;
  color: var(--text-dark);
  max-width: 62ch;
  margin-top: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 40px;
}

/* ---------- About pillars ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.pillar-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 32px 34px;
  overflow: hidden;
  transition: box-shadow 200ms ease, transform 200ms var(--ease-out);
}

/* 2px signal trace on top of pillar cards */
.pillar-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 2px;
  background: var(--gradient);
  opacity: 0.9;
}

.pillar-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -20px rgba(15, 23, 42, 0.18);
}

.pillar-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 12px;
}

.card-text {
  font-size: 15px;
  line-height: 1.65;
  color: #526072;
}

.feature-icon {
  width: 30px;
  height: 30px;
  margin-bottom: 22px;
}

/* ---------- Services ---------- */
.services {
  background: var(--paper);
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.service-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 34px 30px 32px;
  transition: box-shadow 200ms ease, transform 200ms var(--ease-out),
    border-color 200ms ease;
}

.service-card:hover {
  transform: translateY(-3px);
  border-color: rgba(15, 23, 42, 0.16);
  box-shadow: 0 18px 40px -22px rgba(15, 23, 42, 0.2);
}

/* flagship card — AI API Aggregator, stacked (copy on top + full-width
   terminal below). White card identical to the four standard cards: same
   white background, same 1px #E2E8F0 hairline, same hover lift; it is only
   larger in the bento grid (2 cols × 2 rows). No tinted wash / gradient
   border / glow. */
.service-card--flagship {
  flex-direction: column;
  min-width: 0;
}

/* flagship card — stacked layout: copy (top) + full-width code terminal
   (bottom). Copy holds index, title, value sentence, CTA; the dark
   graphite Stripe/Together-style terminal spans the full card width. */
.flagship-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.flagship-copy .card-index {
  order: -1;
  margin-bottom: 14px;
}

.flagship-copy .card-title {
  font-size: clamp(22px, 2.2vw, 28px);
  margin-bottom: 14px;
}

.flagship-copy .card-text {
  font-size: 15.5px;
  line-height: 1.65;
  margin-bottom: 26px;
  max-width: 640px;
}

.flagship-copy .btn-launch--card {
  margin-top: auto;
  align-self: flex-start;
}

/* dark code terminal — spans full card width below the copy */
.code-terminal {
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 44px -26px rgba(2, 8, 23, 0.75);
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  margin-top: 28px;
  /* round 11: on ≥768 the flagship card is a flex column (copy on top,
     terminal below), so the terminal flexes (flex:1) to fill all remaining
     card height, its bottom edge aligned with the right-hand 2×2 cards.
     On <768 the card is a plain block, so flex is ignored and the terminal
     keeps its natural, content-driven height. */
  flex: 1 1 auto;
  min-height: 0;
}

.code-terminal__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.code-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
  flex: none;
}

.code-dot--red {
  background: #ff5f57;
}

.code-dot--yellow {
  background: #febc2e;
}

.code-dot--green {
  background: #28c840;
}

.code-file {
  margin-left: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: #8b949e;
}

.code-terminal__body {
  margin: 0;
  padding: 24px 28px;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9rem;
  line-height: 1.95;
  color: #e6edf3;
  white-space: pre;
  -webkit-overflow-scrolling: touch;
  /* round 10: on ≥768 the terminal flexes taller; the body fills the
     terminal (flex:1) and centers the code vertically so the empty space
     is split evenly above/below with no bottom void; on <768 the terminal
     is content-height (card is a plain block, flex ignored) and the code
     simply flows from the top bar downward. */
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  justify-content: center;
}

.code-terminal__body code {
  font-family: inherit;
}

/* GitHub-dark inspired syntax tones */
.tk-com {
  color: #8b949e;
}

.tk-kw {
  color: #c792ea;
}

.tk-str {
  color: #7ee787;
}

/* desktop / tablet (≥768): stacked — copy on top, terminal full-width
   below; fluid mono type so the longest code line fits without a
   horizontal scrollbar on wide screens */
@media (min-width: 768px) {
  .service-card--flagship {
    display: flex;
    flex-direction: column;
    padding: 36px;
  }

  .code-terminal {
    margin-top: 30px;
  }
}

/* desktop ≥1200px: 4-column bento makes the flagship terminal only ~2-cols
   wide; use compact mono type so the longest line fits without a horizontal
   scrollbar (code stays un-truncated, terminal keeps its natural height) */
@media (min-width: 1200px) {
  .code-terminal__body {
    font-size: 11px;
    line-height: 1.95;
    padding: 24px 16px;
  }
}

/* bento grid — desktop ≥1200px: 4 columns, flagship spans 2 cols × 2 rows
   (left), four standard cards fill the 2×2 on the right. The 4-column
   layout only kicks in once there is real width; below that the 2-column
   tablet layout keeps the flagship terminal wide enough to render the code
   with no horizontal scroll. */
@media (min-width: 1200px) {
  .services-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 1fr;
  }
  .service-card--flagship {
    grid-column: span 2;
    grid-row: span 2;
  }
  .service-card--flagship .card-text {
    font-size: 16px;
  }
}

/* tablet 768–1199px: two columns, flagship spans both across the top */
@media (min-width: 768px) and (max-width: 1199px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .service-card--flagship {
    grid-column: span 2;
  }
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 6px;
}

.card-index {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: #b6c0ce;
}

.card-title {
  font-size: 18.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 12px;
}

/* ---------- Contact ---------- */
.contact-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-inner .section-title {
  margin-inline: auto;
}

.contact-lead {
  margin-bottom: 40px;
}

.contact-note {
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: #8a96a8;
}
.contact-web {
  margin-top: 10px;
  letter-spacing: 0.04em;
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: 72px 36px;
  overflow: hidden;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line-dark);
}

.footer-company {
  margin-top: 18px;
  font-size: 15px;
  font-weight: 500;
  color: var(--white);
}

.footer-tagline {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.footer-tagline span {
  color: var(--green);
  margin-inline: 8px;
}

.footer-links {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  padding-top: 8px;
}

.footer-links a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted);
  transition: color 150ms ease;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 32px;
  font-size: 13px;
  color: var(--muted);
}

.footer-legal {
  display: flex;
  gap: 24px;
}

.footer-legal a {
  color: var(--muted);
  transition: color 150ms ease;
}

.footer-legal a:hover {
  color: var(--white);
}

/* ---------- Scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 150ms ease-out, transform 150ms ease-out;
  will-change: opacity, transform;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn,
  .pillar-card,
  .service-card {
    transition: none;
  }
}

/* ---------- Responsive: tablet ---------- */
@media (max-width: 1023px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line-dark);
    box-shadow: 0 24px 40px -20px rgba(0, 0, 0, 0.6);
    padding: 8px 24px 20px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 260ms var(--ease-out), opacity 200ms ease,
      padding 260ms var(--ease-out), visibility 0s linear 260ms;
    padding-top: 0;
    padding-bottom: 0;
  }

  .nav-links.open {
    max-height: 320px;
    opacity: 1;
    visibility: visible;
    padding-top: 8px;
    padding-bottom: 20px;
    transition: max-height 260ms var(--ease-out), opacity 200ms ease,
      padding 260ms var(--ease-out), visibility 0s;
  }

  .nav-links .nav-link {
    color: var(--white);
    padding: 14px 4px;
    border-bottom: 1px solid var(--line-dark);
    font-size: 15px;
  }

  /* dropdown panel is dark — the pill CTA spans full width */
  .nav-links .btn {
    width: 100%;
  }

  .nav-links .btn-nav-platform {
    margin-top: 18px;
    padding-block: 13px;
    background:
      linear-gradient(
          rgba(0, 208, 132, 0.14),
          rgba(0, 163, 255, 0.14)
        )
        padding-box,
      var(--gradient) border-box;
  }

  .pillars {
    grid-template-columns: 1fr;
    max-width: 560px;
  }
}

/* ---------- Responsive: mobile ---------- */
@media (max-width: 767px) {
  .container {
    padding-inline: 20px;
  }

  /* Hero has a single launch CTA; it takes a full-width row on mobile */
  .hero-actions {
    gap: 12px;
  }

  .hero-actions .btn-launch {
    flex: 0 0 100%;
    width: 100%;
    text-align: center;
  }

  /* flagship card stacks: copy on top, full-width code terminal below;
     narrow screens keep overflow-x:auto as a fallback for the code */
  .service-card--flagship {
    padding: 28px 22px;
  }

  .code-terminal {
    margin-top: 24px;
  }

  .code-terminal__body {
    font-size: 11px;
    line-height: 1.7;
    padding: 18px 18px 20px;
    overflow-x: auto;
  }

  .footer-links {
    flex-direction: column;
    gap: 16px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
