/* ============================================================
   Plyn — landing styles
   Dark tech aesthetic · single cold accent · "flow" motif
   ============================================================ */

:root {
  --bg:        #0A0E14;
  --bg-2:      #0C111A;
  --surface:   #111824;
  --surface-2: #141C2A;
  --border:    rgba(255, 255, 255, 0.08);
  --border-2:  rgba(255, 255, 255, 0.14);

  --text:      #E7ECF3;
  --text-dim:  #94A0B3;
  --text-mut:  #6B7688;

  --accent:    #2DD4BF;
  --accent-2:  #3B82F6;
  --accent-soft: rgba(45, 212, 191, 0.12);
  --accent-line: rgba(45, 212, 191, 0.35);

  --maxw: 1140px;
  --radius: 16px;
  --radius-sm: 10px;

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Space Grotesk", var(--font-body);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.6);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font: inherit; cursor: pointer; }

::selection { background: var(--accent); color: #04181a; }

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

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 1000;
  background: var(--accent); color: #04181a; font-weight: 600;
  padding: 10px 16px; border-radius: 8px; transition: top .2s var(--ease);
}
.skip-link:focus { top: 16px; }

/* ============================================================
   Decorative background flow
   ============================================================ */
.bg-flow {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.bg-flow::after {
  /* faint grid */
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
.bg-glow {
  position: absolute; top: -22%; left: 50%; transform: translateX(-50%);
  width: 1100px; height: 740px;
  background: radial-gradient(closest-side, rgba(45,212,191,.16), rgba(59,130,246,.07) 55%, transparent 75%);
}
.flow-svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; }
.flow-lines path { stroke-width: 1.5; stroke-dasharray: 8 380; }
.flow-lines path:nth-child(1) { animation: flow 17s linear infinite; }
.flow-lines path:nth-child(2) { animation: flow 22s linear infinite; opacity: .8; }
.flow-lines path:nth-child(3) { animation: flow 19s linear infinite reverse; }
.flow-lines path:nth-child(4) { animation: flow 26s linear infinite; opacity: .7; }
@keyframes flow { to { stroke-dashoffset: -388; } }

main, .site-header, .site-footer { position: relative; z-index: 1; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 10px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; transition: transform .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(180deg, #34e0cb, var(--accent));
  color: #04181a;
  box-shadow: 0 10px 30px -12px rgba(45, 212, 191, .6);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -12px rgba(45, 212, 191, .7); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-2); }
.btn-ghost:hover { border-color: var(--accent-line); background: var(--accent-soft); transform: translateY(-2px); }
.btn-block { width: 100%; }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 14, 20, 0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--border); background: rgba(10, 14, 20, 0.88); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 68px; }

.logo { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-head); font-weight: 700; font-size: 20px; letter-spacing: -.01em; }
.logo-mark { overflow: visible; }
.logo-mark path { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; }
.logo-text { color: var(--text); }

.nav { display: flex; align-items: center; gap: 30px; }
.nav > a { color: var(--text-dim); font-size: 15px; font-weight: 500; transition: color .2s var(--ease); }
.nav > a:hover { color: var(--text); }
.nav-cta { display: none; }

.header-actions { display: flex; align-items: center; gap: 16px; }

.lang-switch { display: inline-flex; align-items: center; gap: 8px; }
.lang-switch button {
  background: none; border: 0; color: var(--text-mut); font-size: 14px; font-weight: 600;
  padding: 4px 2px; transition: color .2s var(--ease); letter-spacing: .02em;
}
.lang-switch button:hover { color: var(--text-dim); }
.lang-switch button[aria-pressed="true"] { color: var(--accent); }
.lang-sep { width: 1px; height: 14px; background: var(--border-2); }

.menu-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 8px; }
.menu-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s var(--ease), opacity .25s var(--ease); }

/* ============================================================
   Sections / shared heads
   ============================================================ */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-alt { background: linear-gradient(180deg, transparent, var(--bg-2) 18%, var(--bg-2) 82%, transparent); }

.section-head { max-width: 660px; margin-bottom: clamp(36px, 5vw, 60px); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-size: 13px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 16px;
}
.eyebrow::before { content: ""; width: 22px; height: 1.5px; background: var(--accent-line); }
.section-title {
  font-family: var(--font-head); font-weight: 600; letter-spacing: -.02em;
  font-size: clamp(28px, 4.4vw, 44px); line-height: 1.1; color: var(--text);
}
.section-lead { margin-top: 16px; color: var(--text-dim); font-size: clamp(16px, 1.5vw, 18px); }

/* ============================================================
   Hero
   ============================================================ */
.hero { padding: clamp(72px, 13vw, 150px) 0 clamp(56px, 9vw, 104px); }
.hero-inner { max-width: 820px; }
.hero-title {
  font-family: var(--font-head); font-weight: 700; letter-spacing: -.03em;
  font-size: clamp(40px, 7vw, 76px); line-height: 1.04; margin: 6px 0 0;
  background: linear-gradient(180deg, #fff 30%, #c4cdda);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-subtitle { margin-top: 24px; font-size: clamp(17px, 1.9vw, 21px); color: var(--text-dim); max-width: 640px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hero-meta { margin-top: 28px; font-size: 14px; color: var(--text-mut); letter-spacing: .01em; }

/* ============================================================
   Cards grid
   ============================================================ */
.cards-grid { display: grid; gap: 20px; }
.services-grid { grid-template-columns: repeat(3, 1fr); }
.services-extra { grid-template-columns: repeat(2, 1fr); margin-top: 20px; }
.cases-grid { grid-template-columns: repeat(3, 1fr); }

.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; position: relative; overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(160deg, var(--accent-line), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .3s var(--ease); pointer-events: none;
}
.card:hover { transform: translateY(-5px); border-color: var(--border-2); box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }

.card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 12px; margin-bottom: 20px;
  background: var(--accent-soft); border: 1px solid var(--accent-line); flex-shrink: 0;
}
.card-icon svg { width: 23px; height: 23px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card-title { font-family: var(--font-head); font-weight: 600; font-size: 19px; letter-spacing: -.01em; color: var(--text); }
.card-desc { margin-top: 10px; color: var(--text-dim); font-size: 15px; }
.card-list { margin-top: 18px; display: grid; gap: 10px; }
.card-list li { position: relative; padding-left: 22px; color: var(--text-dim); font-size: 14.5px; }
.card-list li::before {
  content: ""; position: absolute; left: 0; top: 9px; width: 9px; height: 9px;
  border-right: 1.5px solid var(--accent); border-bottom: 1.5px solid var(--accent);
  transform: rotate(-45deg);
}

.card-sm { display: flex; align-items: flex-start; gap: 18px; padding: 24px 26px; }
.card-sm .card-icon { margin-bottom: 0; }

/* ============================================================
   Process
   ============================================================ */
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; counter-reset: step; }
.process-step { position: relative; padding: 24px 22px 24px 0; }
.process-step::before {
  content: ""; position: absolute; top: 16px; left: 0; right: 18px; height: 1px;
  background: linear-gradient(90deg, var(--accent-line), transparent);
}
.process-step::after {
  content: ""; position: absolute; top: 13px; left: 0; width: 7px; height: 7px;
  border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft);
}
.process-num { display: block; font-family: var(--font-head); font-size: 13px; font-weight: 600; color: var(--accent); letter-spacing: .1em; margin-top: 22px; }
.process-title { font-family: var(--font-head); font-weight: 600; font-size: 18px; margin-top: 12px; color: var(--text); }
.process-desc { margin-top: 8px; color: var(--text-dim); font-size: 15px; }

/* ============================================================
   Cases
   ============================================================ */
.case { display: flex; flex-direction: column; }
.case-tag {
  display: inline-block; align-self: flex-start; font-size: 12.5px; font-weight: 600;
  letter-spacing: .03em; color: var(--text-dim);
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 20px;
}
.case-metric {
  font-family: var(--font-head); font-weight: 700; font-size: 34px; letter-spacing: -.02em;
  color: var(--accent); line-height: 1.05; margin-bottom: 22px;
}
.case-metric span { display: block; font-family: var(--font-body); font-weight: 500; font-size: 14px; letter-spacing: 0; color: var(--text-dim); margin-top: 6px; }
.case-block + .case-block { margin-top: 16px; }
.case-label {
  display: block; font-family: var(--font-head); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .12em; color: var(--text-mut); margin-bottom: 5px;
}
.case-block p { color: var(--text-dim); font-size: 14.5px; }

/* ============================================================
   Why
   ============================================================ */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.why-item {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 26px;
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.why-item:hover { transform: translateY(-4px); border-color: var(--border-2); }
.why-icon { display: inline-flex; width: 42px; height: 42px; border-radius: 11px; align-items: center; justify-content: center; background: var(--accent-soft); border: 1px solid var(--accent-line); margin-bottom: 18px; }
.why-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.why-item-title { font-family: var(--font-head); font-weight: 600; font-size: 17px; color: var(--text); }
.why-item-desc { margin-top: 8px; color: var(--text-dim); font-size: 15px; }

/* ============================================================
   Tech
   ============================================================ */
.section-tech { padding-top: clamp(40px, 6vw, 72px); }
.tech-list { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.tech-list li {
  font-family: var(--font-head); font-weight: 500; font-size: 15px; color: var(--text-dim);
  background: var(--surface); border: 1px solid var(--border);
  padding: 9px 18px; border-radius: 999px; transition: color .2s var(--ease), border-color .2s var(--ease);
}
.tech-list li:hover { color: var(--text); border-color: var(--accent-line); }

/* ============================================================
   Contact
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.contact-details { margin-top: 36px; display: grid; gap: 18px; }
.contact-details li { display: grid; gap: 3px; }
.contact-key { font-family: var(--font-head); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--text-mut); }
.contact-details a { color: var(--text); border-bottom: 1px solid var(--accent-line); width: fit-content; transition: color .2s var(--ease); }
.contact-details a:hover { color: var(--accent); }

.contact-form-wrap {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: clamp(24px, 3vw, 34px); position: relative;
}
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 8px; }
.field-optional { color: var(--text-mut); font-weight: 400; }
.field input, .field textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  color: var(--text); padding: 13px 15px; font-size: 15px; font-family: inherit;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-mut); }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.field textarea { resize: vertical; min-height: 110px; }
.field-error { color: #f87171; font-size: 13px; margin-top: 6px; display: none; }
.field.invalid input, .field.invalid textarea { border-color: #f87171; }
.field.invalid .field-error { display: block; }

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

.form-fineprint { margin-top: 14px; font-size: 12.5px; color: var(--text-mut); text-align: center; }

.form-success { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; padding: 30px 10px; }
.form-success-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); border: 1px solid var(--accent-line); }
.form-success-icon svg { width: 28px; height: 28px; fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.form-success p { color: var(--text); font-size: 16px; max-width: 280px; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-2); padding: 56px 0 28px; margin-top: 20px; }
.footer-inner { display: grid; grid-template-columns: 1.6fr 1fr; gap: 36px; padding-bottom: 36px; border-bottom: 1px solid var(--border); }
.footer-tagline { margin-top: 16px; color: var(--text-dim); font-size: 15px; max-width: 320px; }
.footer-col-title { font-family: var(--font-head); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--text-mut); margin-bottom: 16px; }
.footer-nav { display: flex; flex-direction: column; gap: 11px; }
.footer-nav a, .footer-legal a { color: var(--text-dim); font-size: 15px; width: fit-content; transition: color .2s var(--ease); }
.footer-nav a:hover, .footer-legal a:hover { color: var(--text); }
.footer-legal-line { color: var(--text-dim); font-size: 15px; margin-bottom: 12px; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 24px; }
.footer-bottom p { color: var(--text-mut); font-size: 14px; }
.footer-top { color: var(--text-dim); font-size: 14px; transition: color .2s var(--ease); }
.footer-top:hover { color: var(--accent); }
.footer-bottom-links { display: flex; align-items: center; gap: 20px; }
.footer-bottom-links a { color: var(--text-mut); font-size: 14px; transition: color .2s var(--ease); }
.footer-bottom-links a:hover { color: var(--accent); }

/* ============================================================
   Legal / policy pages
   ============================================================ */
.back-to-site { color: var(--text-dim); font-size: 14px; font-weight: 500; transition: color .2s var(--ease); }
.back-to-site:hover { color: var(--text); }
.legal { max-width: 820px; margin: 0 auto; padding: clamp(44px, 8vw, 92px) 0; }
.legal h1 { font-family: var(--font-head); font-weight: 700; letter-spacing: -.02em; font-size: clamp(30px, 5vw, 46px); line-height: 1.1; color: var(--text); }
.legal .updated { margin-top: 12px; color: var(--text-mut); font-size: 14px; }
.legal .lead { font-size: 17px; margin-top: 24px; }
.legal h2 { font-family: var(--font-head); font-weight: 600; font-size: clamp(18px, 2.4vw, 22px); color: var(--text); margin-top: 40px; }
.legal p { margin-top: 14px; color: var(--text-dim); }
.legal ul { list-style: disc; padding-left: 22px; margin: 12px 0; }
.legal li { margin: 7px 0; color: var(--text-dim); }
.legal strong { color: var(--text); font-weight: 600; }
.legal a { color: var(--accent); border-bottom: 1px solid var(--accent-line); }
.legal a:hover { color: var(--text); }

/* ============================================================
   Reveal on scroll
   ============================================================ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.cards-grid .reveal:nth-child(2), .why-grid .reveal:nth-child(2) { transition-delay: .08s; }
.cards-grid .reveal:nth-child(3), .why-grid .reveal:nth-child(3) { transition-delay: .16s; }
.process .reveal:nth-child(2) { transition-delay: .08s; }
.process .reveal:nth-child(3) { transition-delay: .16s; }
.process .reveal:nth-child(4) { transition-delay: .24s; }
.why-grid .reveal:nth-child(4) { transition-delay: .24s; }
.why-grid .reveal:nth-child(5) { transition-delay: .32s; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
  .services-grid, .cases-grid, .why-grid { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: repeat(2, 1fr); gap: 12px 24px; }
  .why-grid > :last-child { grid-column: span 2; }
}

@media (max-width: 760px) {
  .header-cta { display: none; }
  .menu-toggle { display: flex; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: rgba(10, 14, 20, 0.97); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border); padding: 12px 24px 22px;
    transform: translateY(-12px); opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  }
  .site-header.nav-open .nav { transform: none; opacity: 1; visibility: visible; pointer-events: auto; }
  .nav > a { padding: 12px 4px; font-size: 16px; border-bottom: 1px solid var(--border); }
  .nav > a:last-of-type { border-bottom: 0; }
  .nav-cta { display: inline-flex; margin-top: 12px; }
  .site-header.nav-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .site-header.nav-open .menu-toggle span:nth-child(2) { opacity: 0; }
  .site-header.nav-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 640px) {
  .services-grid, .services-extra, .cases-grid, .why-grid, .process, .contact-grid, .footer-inner { grid-template-columns: 1fr; }
  .why-grid > :last-child { grid-column: auto; }
  .process-step { padding: 18px 0 18px 26px; }
  .process-step::before { top: 0; bottom: 0; left: 7px; right: auto; width: 1px; height: auto; background: linear-gradient(180deg, var(--accent-line), transparent); }
  .process-step::after { top: 6px; left: 4px; }
  .process-num { margin-top: 0; }
  .footer-inner { gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
  .card-sm { flex-direction: row; }
}

@media (max-width: 380px) {
  .container { padding: 0 18px; }
  .card { padding: 22px; }
}
