/* ============================================================
   Wave Technologies & Consultancy — style.css
   ------------------------------------------------------------
   01. Design tokens
   02. Reset & base
   03. Utilities
   04. Ambient background (aurora / grid / noise)
   05. Navigation
   06. Buttons
   07. Hero
   08. Sections & headings
   09. Service cards
   10. Why Wave
   11. Technology badges
   12. Values
   13. Stats
   14. Newsletter
   15. Footer
   16. Reveal animations
   17. Responsive
   ============================================================ */

/* ============ 01. DESIGN TOKENS ============ */
:root {
  --primary: #16b394;
  --dark: #071a18;
  --dark-2: #10352f;
  --accent: #5ee6c8;
  --light: #f8fafc;
  --white: #ffffff;
  --gray: #64748b;

  --text: rgba(248, 250, 252, 0.92);
  --text-dim: rgba(248, 250, 252, 0.62);
  --line: rgba(94, 230, 200, 0.14);
  --panel: rgba(16, 53, 47, 0.35);

  --font-head: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;

  --radius: 20px;
  --radius-pill: 999px;

  --space-1: clamp(0.5rem, 1vw, 0.75rem);
  --space-2: clamp(1rem, 2vw, 1.5rem);
  --space-3: clamp(2rem, 4vw, 3rem);
  --space-4: clamp(4rem, 8vw, 7rem);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============ 02. RESET & BASE ============ */
*,
*::before,
*::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  background: var(--dark);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

ul, ol { list-style: none; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

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

::selection { background: var(--primary); color: var(--dark); }

/* ============ 03. UTILITIES ============ */
.container {
  width: min(1120px, 100% - 3rem);
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.text-gradient {
  background: linear-gradient(100deg, var(--primary), var(--accent) 60%, var(--primary));
  background-size: 180% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 6s linear infinite;
}

@keyframes gradient-shift {
  to { background-position: 180% center; }
}

.kicker {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--space-1);
}

/* ============ 04. AMBIENT BACKGROUND ============ */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 80% -10%, rgba(22, 179, 148, 0.14), transparent 60%),
    radial-gradient(ellipse 55% 45% at 8% 105%, rgba(94, 230, 200, 0.08), transparent 55%),
    linear-gradient(170deg, var(--dark) 0%, #0a2420 55%, var(--dark-2) 100%);
}

/* Aurora blobs — transform-only animation (GPU friendly) */
.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.32;
  will-change: transform;
}

.aurora-1 {
  width: 46vw; height: 46vw;
  min-width: 380px; min-height: 380px;
  top: -18%; right: -12%;
  background: radial-gradient(circle at 30% 30%, var(--primary), transparent 65%);
  animation: aurora-a 26s var(--ease-out) infinite alternate;
}

.aurora-2 {
  width: 36vw; height: 36vw;
  min-width: 300px; min-height: 300px;
  bottom: -14%; left: -10%;
  background: radial-gradient(circle at 60% 60%, var(--accent), transparent 65%);
  opacity: 0.2;
  animation: aurora-b 32s var(--ease-out) infinite alternate;
}

.aurora-3 {
  width: 26vw; height: 26vw;
  min-width: 240px; min-height: 240px;
  top: 40%; left: 38%;
  background: radial-gradient(circle, rgba(22, 179, 148, 0.8), transparent 60%);
  opacity: 0.14;
  animation: aurora-a 40s var(--ease-out) infinite alternate-reverse;
}

@keyframes aurora-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-6vw, 5vh, 0) scale(1.18); }
}

@keyframes aurora-b {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(7vw, -6vh, 0) scale(1.12); }
}

/* Fine SVG grid, faded out towards edges */
.grid-layer {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cpath d='M64 0H0v64' fill='none' stroke='rgba(94,230,200,0.07)' stroke-width='1'/%3E%3C/svg%3E");
  mask-image: radial-gradient(ellipse 90% 70% at 50% 20%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 20%, black 30%, transparent 75%);
}

/* Film-grain noise for depth */
.noise-layer {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============ 05. NAVIGATION ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: background 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(7, 26, 24, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.9rem;
}

.nav-logo {
  height: 48px;
  width: auto;
}

/* Text lockup shown only if logo.png is missing */
.nav-brand-fallback { display: none; }

.nav-logo.is-missing { display: none; }
.nav-logo.is-missing + .nav-brand-fallback,
.footer-logo.is-missing + .nav-brand-fallback {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--white);
  line-height: 1.1;
}
.nav-brand-fallback em {
  display: block;
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 400;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 3vw, 2.2rem);
}

.nav-links a:not(.btn) {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.25s ease;
}

.nav-links a:not(.btn):hover { color: var(--white); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: 0;
  padding: 10px;
  cursor: pointer;
}

.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out), opacity 0.3s ease;
}

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

/* ============ 06. BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.9rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease,
              background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
  will-change: transform;
}

.btn-primary {
  color: var(--dark);
  background: linear-gradient(120deg, var(--accent), var(--primary));
  box-shadow: 0 0 0 0 rgba(22, 179, 148, 0);
}

.btn-primary:hover {
  box-shadow: 0 10px 35px -8px rgba(22, 179, 148, 0.65);
}

.btn-ghost {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-nav {
  padding: 0.55rem 1.4rem;
  font-size: 0.85rem;
  color: var(--dark);
  background: linear-gradient(120deg, var(--accent), var(--primary));
}

.btn-nav:hover { box-shadow: 0 6px 22px -6px rgba(22, 179, 148, 0.7); }

/* ============ 07. HERO ============ */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 96px;
}

.hero-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-block: var(--space-4);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--panel);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 1.8s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(94, 230, 200, 0.55); }
  50%      { box-shadow: 0 0 0 6px rgba(94, 230, 200, 0); }
}

.hero-title {
  margin-top: var(--space-2);
  font-size: clamp(2.6rem, 7.5vw, 5.2rem);
  color: var(--white);
}

.hero-sub {
  margin-top: var(--space-2);
  max-width: 640px;
  font-size: clamp(1rem, 1.8vw, 1.18rem);
  font-weight: 300;
  color: var(--text-dim);
}

.hero-cta {
  margin-top: var(--space-3);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.hero-strip {
  margin-top: var(--space-3);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--gray);
}

.hero-strip span { color: var(--primary); margin-inline: 0.4rem; }

/* ============ 08. SECTIONS & HEADINGS ============ */
.section { padding-block: var(--space-4); }

.section-alt {
  background: linear-gradient(180deg, transparent, rgba(16, 53, 47, 0.35) 18% 82%, transparent);
}

.section-head {
  max-width: 640px;
  margin-bottom: var(--space-3);
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  color: var(--white);
}

.section-sub {
  margin-top: 0.9rem;
  color: var(--text-dim);
  font-weight: 300;
}

/* ============ 09. SERVICE CARDS ============ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.card {
  position: relative;
  padding: 1.9rem 1.6rem;
  border-radius: var(--radius);
  background:
    linear-gradient(var(--panel), var(--panel)) padding-box,
    linear-gradient(150deg, var(--line), rgba(255, 255, 255, 0.03)) border-box;
  border: 1px solid transparent;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s ease, background 0.4s ease;
  overflow: hidden;
}

/* soft radial glow that fades in on hover */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(240px circle at 50% 0%, rgba(22, 179, 148, 0.16), transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-6px);
  background:
    linear-gradient(var(--panel), var(--panel)) padding-box,
    linear-gradient(150deg, var(--primary), rgba(94, 230, 200, 0.25)) border-box;
  box-shadow: 0 24px 50px -24px rgba(7, 26, 24, 0.9);
}

.card:hover::after { opacity: 1; }

.card-icon {
  width: 48px; height: 48px;
  padding: 11px;
  margin-bottom: 1.2rem;
  border-radius: 14px;
  color: var(--accent);
  background: rgba(22, 179, 148, 0.12);
  border: 1px solid rgba(22, 179, 148, 0.25);
}

.card-icon svg {
  width: 100%; height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 {
  font-size: 1.08rem;
  color: var(--white);
  margin-bottom: 0.55rem;
}

.card p {
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--text-dim);
}

/* ============ 10. WHY WAVE ============ */
.why-layout {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: var(--space-3);
  align-items: start;
}

.why-intro { position: sticky; top: 110px; }

.why-list li {
  display: flex;
  gap: 1.3rem;
  padding-block: 1.35rem;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.35s var(--ease-out);
}

.why-list li:first-child { border-top: 1px solid var(--line); }

.why-list li:hover { padding-left: 0.6rem; }

.why-num {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--primary);
  padding-top: 0.25rem;
  min-width: 2ch;
}

.why-list h3 {
  font-size: 1.02rem;
  color: var(--white);
  margin-bottom: 0.25rem;
}

.why-list p {
  font-size: 0.86rem;
  font-weight: 300;
  color: var(--text-dim);
}

/* ============ 11. TECHNOLOGY BADGES ============ */
.tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.tech-badges li {
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--text-dim);
  transition: color 0.3s ease, border-color 0.3s ease, transform 0.3s var(--ease-out);
  cursor: default;
}

.tech-badges li:hover {
  color: var(--accent);
  border-color: var(--primary);
  transform: translateY(-3px);
}

/* ============ 12. VALUES ============ */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
}

.value {
  padding: 1.4rem 1.3rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  transition: border-color 0.3s ease, transform 0.3s var(--ease-out);
}

.value:hover {
  border-color: rgba(22, 179, 148, 0.5);
  transform: translateY(-4px);
}

.value h3 {
  font-size: 0.95rem;
  color: var(--accent);
  margin-bottom: 0.3rem;
}

.value p {
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--text-dim);
}

/* ============ 13. STATS ============ */
.stats-section { padding-block: var(--space-3); }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding-block: var(--space-2);
  border-block: 1px solid var(--line);
  text-align: center;
}

.stat-value {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.5rem, 3.4vw, 2.3rem);
  background: linear-gradient(120deg, var(--white), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray);
}

/* ============ 14. NEWSLETTER ============ */
.newsletter-panel {
  position: relative;
  max-width: 680px;
  margin-inline: auto;
  padding: clamp(2.2rem, 5vw, 3.5rem);
  text-align: center;
  border-radius: 28px;
  background:
    linear-gradient(rgba(16, 53, 47, 0.55), rgba(16, 53, 47, 0.55)) padding-box,
    linear-gradient(140deg, rgba(94, 230, 200, 0.45), rgba(22, 179, 148, 0.08) 50%, rgba(94, 230, 200, 0.35)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 40px 90px -40px rgba(7, 26, 24, 0.9);
}

.newsletter-panel .section-sub { margin-inline: auto; max-width: 420px; }

.newsletter-form {
  display: flex;
  gap: 0.6rem;
  margin-top: var(--space-2);
  padding: 0.4rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: rgba(7, 26, 24, 0.6);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.newsletter-form:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(22, 179, 148, 0.15);
}

.newsletter-form input {
  flex: 1;
  min-width: 0;
  padding: 0.7rem 1.1rem;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.newsletter-form input::placeholder { color: var(--gray); }

.newsletter-msg {
  min-height: 1.4em;
  margin-top: 0.8rem;
  font-size: 0.86rem;
  color: #fca5a5;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.newsletter-msg.show { opacity: 1; transform: translateY(0); }

/* success state with stroke-drawn check */
.newsletter-success { margin-top: var(--space-2); }

.newsletter-success svg {
  width: 64px; height: 64px;
  margin-inline: auto;
  display: block;
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.newsletter-success circle {
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  animation: draw-stroke 0.8s var(--ease-out) forwards;
}

.newsletter-success path {
  stroke-dasharray: 36;
  stroke-dashoffset: 36;
  animation: draw-stroke 0.5s var(--ease-out) 0.6s forwards;
}

@keyframes draw-stroke { to { stroke-dashoffset: 0; } }

.newsletter-success p {
  margin-top: 1rem;
  color: var(--accent);
  font-weight: 500;
}

/* ============ 15. FOOTER ============ */
.footer {
  border-top: 1px solid var(--line);
  background: rgba(7, 26, 24, 0.6);
  padding-top: var(--space-3);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-3);
  padding-bottom: var(--space-3);
}

.footer-logo { height: 44px; width: auto; }
.footer-logo.is-missing { display: none; }

.footer-brand p {
  margin-top: 1rem;
  max-width: 300px;
  font-size: 0.86rem;
  font-weight: 300;
  color: var(--text-dim);
}

.footer h3 {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 1rem;
}

.footer-contact {
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-contact a,
.footer-contact span {
  font-size: 0.9rem;
  color: var(--text-dim);
  transition: color 0.25s ease;
  width: fit-content;
}

.footer-contact a:hover { color: var(--accent); }

.social-row { display: flex; gap: 0.7rem; }

.social-row a {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  color: var(--text-dim);
  transition: color 0.3s ease, border-color 0.3s ease, transform 0.3s var(--ease-out);
}

.social-row a:hover {
  color: var(--accent);
  border-color: var(--primary);
  transform: translateY(-3px);
}

.social-row svg {
  width: 17px; height: 17px;
  fill: currentColor;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-block: 1.3rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--gray);
}

/* ============ 16. REVEAL ANIMATIONS ============ */
/* Elements are only hidden when JS is running (html.js), so content
   always shows for no-JS visitors and older browsers. */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(6px);
  transition:
    opacity 0.8s var(--ease-out),
    transform 0.8s var(--ease-out),
    filter 0.8s var(--ease-out);
  transition-delay: calc(var(--reveal-delay, 0) * 120ms);
}

html.js [data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* ============ 17. RESPONSIVE ============ */
@media (max-width: 900px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .why-layout { grid-template-columns: 1fr; }
  .why-intro { position: static; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 2rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .cards-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }

  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    align-items: center;
    gap: 1.6rem;
    padding: 2.2rem 1.5rem;
    background: rgba(7, 26, 24, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-130%);
    transition: transform 0.45s var(--ease-out);
  }

  .nav-links.open { transform: translateY(0); }

  .newsletter-form { flex-direction: column; border-radius: 24px; }
  .newsletter-form .btn { width: 100%; }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html.js [data-reveal] {
    opacity: 1;
    transform: none;
    filter: none;
  }
}
