/* Pentuple Ltd. — mobile-first stylesheet */

@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../assets/fonts/jetbrains-mono-var.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --bg: #0b1220;
  --bg-alt: #0e1729;
  --surface: #121c31;
  --surface-2: #17233d;
  --border: rgba(148, 178, 220, 0.14);
  --text: #e6edf7;
  --muted: #9aabc4;
  --cyan: #00a8eb;
  --blue: #4da3ff;
  --deep: #0568b2;
  --green: #c7e19d;
  --grad: linear-gradient(90deg, var(--cyan), var(--green));
  --radius: 16px;
  --shadow: 0 10px 40px -12px rgba(0, 0, 0, 0.6);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(0, 168, 235, 0.16), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(199, 225, 157, 0.07), transparent 60%),
    var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--green); }

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.6em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.1rem, 7vw, 3.75rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 650; }
p { margin: 0 0 1em; }

.container { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(760px, 100% - 2.5rem); }
.center { text-align: center; }

.icon {
  width: 1.25em; height: 1.25em;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--cyan);
  margin-bottom: 0.9rem;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--cyan); color: #00131f; padding: 0.6rem 1rem; z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 48px; /* comfortable touch target */
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  font: inherit; font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--cyan), #3fc3ff);
  color: #00131f;
  box-shadow: 0 8px 24px -8px rgba(0, 168, 235, 0.7);
}
.btn-primary:hover { color: #00131f; transform: translateY(-2px); box-shadow: 0 12px 30px -8px rgba(0, 168, 235, 0.85); }
.btn-ghost { border-color: var(--border); color: var(--text); background: rgba(255, 255, 255, 0.03); }
.btn-ghost:hover { color: var(--text); border-color: var(--cyan); }
.btn-sm { min-height: 40px; padding: 0.5rem 1.1rem; font-size: 0.92rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: wait; transform: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(11, 18, 32, 0.7);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.site-header.scrolled { border-bottom-color: var(--border); background: rgba(11, 18, 32, 0.92); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand img { width: 150px; height: auto; }

.nav-toggle {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 10px;
  background: none; border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.25s, opacity 0.25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav: slide-down panel */
.site-nav {
  position: absolute; top: var(--header-h); left: 0; right: 0;
  display: flex; flex-direction: column; gap: 0.25rem;
  padding: 1rem 1.25rem 1.5rem;
  background: rgba(11, 18, 32, 0.98);
  border-bottom: 1px solid var(--border);
  transform: translateY(-8px); opacity: 0; visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.site-nav.open { transform: none; opacity: 1; visibility: visible; }
.site-nav a { color: var(--text); padding: 0.75rem 0.25rem; font-weight: 500; }
.site-nav a:not(.btn):hover { color: var(--cyan); }
.site-nav .btn { margin-top: 0.5rem; }

/* ---------- Hero ---------- */
.hero { padding: 2.5rem 0 3.5rem; position: relative; }
.hero::before { /* subtle grid */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(148, 178, 220, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 178, 220, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 60% 30%, #000 20%, transparent 70%);
  mask-image: radial-gradient(ellipse at 60% 30%, #000 20%, transparent 70%);
}
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
.lead { font-size: clamp(1.02rem, 2.4vw, 1.18rem); color: var(--muted); max-width: 40rem; }
.hero-cta { display: flex; flex-direction: column; gap: 0.75rem; margin: 1.75rem 0; }
.hero-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; color: var(--muted); font-size: 0.95rem; }
.hero-points li { display: flex; align-items: center; gap: 0.6rem; }
.hero-points .icon { color: var(--green); }

.hero-visual { max-width: 520px; width: 100%; margin-inline: auto; }
.flow .nodes rect { fill: var(--surface); stroke: var(--border); }
.flow .nodes text {
  fill: var(--text); font-family: var(--mono); font-size: 12.5px; text-anchor: middle;
}
.flow .hub { fill: var(--surface-2); stroke: url(#g-line); stroke-width: 2; }
.flow .base { fill: none; stroke: rgba(148, 178, 220, 0.16); stroke-width: 1.5; }
.flow .pulse {
  fill: none; stroke: url(#g-line); stroke-width: 2.5; stroke-linecap: round;
  stroke-dasharray: 18 260;
  animation: flow 3.2s linear infinite;
}
.flow .d2 { animation-delay: -0.8s; }
.flow .d3 { animation-delay: -1.6s; }
.flow .d4 { animation-delay: -2.4s; }
@keyframes flow { from { stroke-dashoffset: 278; } to { stroke-dashoffset: 0; } }

/* ---------- Sections ---------- */
.section { padding: 4rem 0; }
.section.alt { background: linear-gradient(180deg, transparent, var(--bg-alt) 15%, var(--bg-alt) 85%, transparent); }
.section-head { max-width: 46rem; margin-bottom: 2.5rem; }
.sub { color: var(--muted); font-size: 1.05rem; }

/* Problem */
.problem { padding-top: 2rem; }
.pain-list { list-style: none; padding: 0; margin: 1.5rem 0 2rem; display: grid; gap: 0.75rem; text-align: left; }
.pain-list li {
  position: relative; padding: 0.9rem 1rem 0.9rem 2.75rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; color: var(--muted);
}
.pain-list li::before {
  content: "×"; position: absolute; left: 1rem; top: 0.78rem;
  color: #ff8a8a; font-weight: 700; font-size: 1.15rem;
}
.kicker { font-size: 1.12rem; }
.kicker strong { color: var(--green); }

/* Service cards */
.cards { display: grid; gap: 1.25rem; }
.card {
  position: relative;
  padding: 1.6rem;
  background: linear-gradient(180deg, var(--surface), rgba(18, 28, 49, 0.6));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.card::after { /* gradient edge on hover */
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: var(--grad); opacity: 0; transition: opacity 0.25s ease;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card:hover::after { opacity: 0.8; }
.card p { color: var(--muted); font-size: 0.97rem; }
.card-icon {
  display: grid; place-items: center;
  width: 48px; height: 48px; margin-bottom: 1.1rem;
  border-radius: 12px;
  background: rgba(0, 168, 235, 0.12);
  color: var(--cyan);
}
.card-icon .icon { width: 24px; height: 24px; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; font-size: 0.9rem; }
.ticks li { position: relative; padding-left: 1.4rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--grad);
}

/* Why */
.why-grid { display: grid; gap: 1.25rem; }
.why { padding: 1.5rem; border-left: 2px solid var(--deep); background: rgba(18, 28, 49, 0.5); border-radius: 0 12px 12px 0; }
.why p { color: var(--muted); margin: 0; }
.why-num { display: block; font-family: var(--mono); font-size: 0.85rem; color: var(--cyan); margin-bottom: 0.5rem; }

/* Stack */
.stack {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.6rem;
}
.stack li {
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  padding: 1.1rem 0.5rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  font-size: 0.82rem; color: var(--muted);
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.stack img { width: 32px; height: 32px; filter: invert(1); opacity: 0.75; transition: opacity 0.2s; }
.stack li:hover { border-color: rgba(0, 168, 235, 0.5); color: var(--text); transform: translateY(-2px); }
.stack li:hover img { opacity: 1; }

/* Contact */
.contact { padding-bottom: 5rem; }
.contact-grid { display: grid; gap: 2.5rem; }
.assurances { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1rem; }
.assurances li { display: flex; gap: 0.85rem; color: var(--muted); }
.assurances .icon { color: var(--green); margin-top: 0.2rem; }
.assurances strong { color: var(--text); }

.contact-form {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.field-row { display: grid; gap: 0 1rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: 0.9rem; font-weight: 550; margin-bottom: 0.4rem; }
.opt { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  font: inherit;
  font-size: 16px; /* prevents iOS zoom-on-focus */
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%;
  background-size: 5px 5px; background-repeat: no-repeat;
  padding-right: 2.5rem;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0, 168, 235, 0.2);
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #ff8a8a; }
.field ::placeholder { color: #5f708a; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-status { min-height: 1.5em; margin: 0.9rem 0 0; font-size: 0.95rem; }
.form-status.success { color: var(--green); }
.form-status.error { color: #ff8a8a; }
.fine { font-size: 0.8rem; color: #6f819c; margin: 0.5rem 0 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 2rem 0; color: var(--muted); font-size: 0.9rem; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; text-align: center; }
.footer-inner p { margin: 0; }
.footer-inner img { width: 130px; height: auto; margin-bottom: 0.5rem; }
.copy { font-size: 0.82rem; }

/* Scroll reveal (only when JS is active) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

/* ---------- Breakpoints ---------- */
@media (min-width: 480px) {
  .hero-cta { flex-direction: row; flex-wrap: wrap; }
}

@media (min-width: 640px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 1fr 1fr; }
  .contact-form { padding: 2rem; }
  .hero-points { grid-auto-flow: column; justify-content: start; gap: 1.5rem; }
}

@media (min-width: 880px) {
  :root { --header-h: 76px; }
  .brand img { width: 180px; }
  .nav-toggle { display: none; }
  .site-nav {
    position: static; flex-direction: row; align-items: center; gap: 1.75rem;
    padding: 0; background: none; border: 0;
    transform: none; opacity: 1; visibility: visible;
  }
  .site-nav a { padding: 0; font-size: 0.95rem; }
  .site-nav .btn { margin-top: 0; }
  .hero { padding: 5rem 0 6rem; }
  .hero-grid { grid-template-columns: 1.1fr 1fr; gap: 3rem; }
  .section { padding: 6rem 0; }
  .stack { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .contact-grid { grid-template-columns: 1fr 1.15fr; gap: 4rem; align-items: start; }
  .footer-inner { flex-direction: row; justify-content: space-between; text-align: left; }
  .footer-inner img { margin: 0; }
}

@media (min-width: 1080px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .why-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Very small screens: tighten diagram labels */
@media (max-width: 380px) {
  .flow .nodes text { font-size: 11px; }
  .container, .narrow { width: calc(100% - 1.75rem); }
  .stack li { font-size: 0.72rem; padding: 0.9rem 0.25rem; }
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
.nf-logo { margin: 0 auto 2rem; }
