/* ============================================================
   Groundwave AI — Stylesheet
   Design: dark tech, clean lines, minimal animations
   ============================================================ */

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

:root {
  --clr-bg:        #07091a;
  --clr-surface:   #0e1228;
  --clr-border:    #1b2540;
  --clr-text:      #e8eeff;
  --clr-muted:     #7e8fac;
  --clr-accent:    #22d3ee;
  --clr-cta:       #22d3ee;
  --clr-cta-hover: #06b6d4;
  --clr-cta-text:  #07091a;

  --font-serif:  'Cormorant Garamond', Georgia, serif;
  --font-sans:   'Inter', system-ui, sans-serif;

  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  7rem;

  --max-w: 1200px;
  --nav-h: 60px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 240ms;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--clr-text);
  background-color: var(--clr-bg);
  -webkit-font-smoothing: antialiased;
}

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

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

ul, ol {
  list-style: none;
}

/* ── Utility ───────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.section {
  padding-block: var(--space-xl);
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.section__header h2 {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
  margin-top: var(--space-xs);
}

.section__header p {
  max-width: 540px;
  margin-inline: auto;
  margin-top: var(--space-sm);
  color: var(--clr-muted);
  font-size: 1rem;
}

.section__eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--clr-accent);
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  border-radius: 2px;
  padding: 0.85rem 1.75rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--duration) var(--ease),
              color var(--duration) var(--ease),
              border-color var(--duration) var(--ease);
  white-space: nowrap;
}

.btn--primary {
  background: var(--clr-cta);
  color: var(--clr-cta-text);
  border-color: var(--clr-cta);
}
.btn--primary:hover {
  background: var(--clr-cta-hover);
  border-color: var(--clr-cta-hover);
}

.btn--ghost {
  background: transparent;
  color: var(--clr-text);
  border-color: var(--clr-border);
}
.btn--ghost:hover {
  border-color: var(--clr-accent);
  color: var(--clr-accent);
}

.btn--outline {
  background: transparent;
  color: var(--clr-accent);
  border-color: var(--clr-accent);
}
.btn--outline:hover {
  background: var(--clr-accent);
  color: var(--clr-cta-text);
}

.btn--full {
  width: 100%;
}

/* ── Nav ────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--space-md);
  background: var(--clr-bg);
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
}

.nav.scrolled {
  border-color: var(--clr-border);
  box-shadow: 0 1px 24px rgba(0,0,0,0.4);
}

.nav__logo {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--clr-text);
}

.nav__logo-tag {
  color: var(--clr-accent);
  font-weight: 400;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav__links a {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--clr-muted);
  transition: color var(--duration) var(--ease);
}

.nav__links a:hover {
  color: var(--clr-text);
}

.nav__cta.btn {
  display: inline-flex;
  padding: 0.5rem 1.2rem;
  font-size: 0.8125rem;
  background: var(--clr-cta);
  color: var(--clr-cta-text);
  border-color: var(--clr-cta);
  border-radius: 2px;
}
.nav__cta.btn:hover {
  background: var(--clr-cta-hover);
  border-color: var(--clr-cta-hover);
  color: var(--clr-cta-text);
}
.nav__links a.nav__cta {
  color: var(--clr-cta-text);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--clr-text);
  transition: transform var(--duration) var(--ease),
              opacity var(--duration) var(--ease);
}

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + var(--space-xl)) var(--space-md) var(--space-xl);
  position: relative;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(34,211,238,0.08) 0%, transparent 70%);
}

.hero__eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clr-accent);
  margin-bottom: 1.25rem;
}

.hero__headline {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(3rem, 9vw, 6.5rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--clr-text);
  margin-bottom: 1.5rem;
}

.hero__headline em {
  font-style: italic;
  color: var(--clr-accent);
}

.hero__sub {
  max-width: 500px;
  margin-inline: auto;
  font-size: 1.0625rem;
  color: var(--clr-muted);
  line-height: 1.65;
  margin-bottom: 2.5rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.hero__scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
}

.hero__scroll-hint span {
  display: block;
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, transparent, var(--clr-accent));
  margin-inline: auto;
  animation: scrollFade 2s ease-in-out infinite;
}

@keyframes scrollFade {
  0%, 100% { opacity: 0; transform: scaleY(0); transform-origin: top; }
  40%, 60% { opacity: 1; transform: scaleY(1); }
}

/* ── Gallery / Capabilities ──────────────────────────────────── */
.gallery {
  background: var(--clr-bg);
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 320px;
  gap: 4px;
}

.gallery__item {
  overflow: hidden;
  position: relative;
}

.gallery__item--tall {
  grid-row: span 2;
}

.gallery__item--wide {
  grid-column: span 2;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease);
  filter: brightness(0.75) saturate(0.9);
}

.gallery__item:hover img {
  transform: scale(1.04);
  filter: brightness(0.9) saturate(1.1);
}

.gallery__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.6rem 1rem;
  background: linear-gradient(to top, rgba(7,9,26,0.85), transparent);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clr-accent);
}

.gallery__more {
  text-align: center;
  margin-top: var(--space-lg);
}

/* ── Value Prop ──────────────────────────────────────────────── */
.value {
  background: var(--clr-surface);
}

.value__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}

.value__image {
  aspect-ratio: 4/5;
  overflow: hidden;
  border-radius: 2px;
  border: 1px solid var(--clr-border);
}

.value__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.8) saturate(1.2) hue-rotate(10deg);
}

.value__copy .section__eyebrow {
  margin-bottom: var(--space-sm);
}

.value__copy h2 {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

.value__copy p {
  color: var(--clr-muted);
  margin-bottom: var(--space-sm);
}

.value__list {
  margin-top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.value__list li {
  padding-left: 1.25rem;
  position: relative;
  font-size: 0.9375rem;
  color: var(--clr-muted);
}

.value__list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--clr-accent);
  font-weight: 400;
}

.value__list strong {
  font-weight: 500;
  color: var(--clr-text);
}

/* ── Products / Services ─────────────────────────────────────── */
.services {
  background: var(--clr-bg);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.service-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: 2px;
  padding: var(--space-md) calc(var(--space-md) * 1.25);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  position: relative;
  transition: box-shadow var(--duration) var(--ease),
              border-color var(--duration) var(--ease);
}

.service-card:hover {
  box-shadow: 0 4px 32px rgba(34,211,238,0.08);
  border-color: rgba(34,211,238,0.3);
}

.service-card__tag {
  position: absolute;
  top: -1px;
  left: var(--space-md);
  background: var(--clr-accent);
  color: var(--clr-cta-text);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
}

.service-card h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.2;
  margin-top: var(--space-xs);
}

.service-card__duration {
  font-size: 0.8125rem;
  color: var(--clr-accent);
  letter-spacing: 0.03em;
}

.service-card p:not(.service-card__tag):not(.service-card__duration) {
  flex: 1;
  font-size: 0.9375rem;
  color: var(--clr-muted);
  line-height: 1.65;
}

/* ── Process ─────────────────────────────────────────────────── */
.process {
  background: var(--clr-surface);
}

.process__steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.process__steps li {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-md);
  border-top: 1px solid var(--clr-border);
}

.process__num {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 300;
  color: var(--clr-accent);
  opacity: 0.4;
  line-height: 1;
}

.process__steps h4 {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--clr-text);
}

.process__steps p {
  font-size: 0.9rem;
  color: var(--clr-muted);
  line-height: 1.65;
}

/* ── Contact ─────────────────────────────────────────────────── */
.contact {
  background: var(--clr-bg);
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--space-xl);
  align-items: start;
}

.contact__copy h2 {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.2;
  margin-top: var(--space-xs);
  margin-bottom: var(--space-md);
}

.contact__copy p {
  color: var(--clr-muted);
  margin-bottom: var(--space-sm);
}

.contact__links {
  margin-top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.contact__links a {
  font-size: 0.9375rem;
  color: var(--clr-accent);
  border-bottom: 1px solid rgba(34,211,238,0.2);
  padding-bottom: 2px;
  display: inline-block;
  transition: border-color var(--duration) var(--ease);
}

.contact__links a:hover {
  border-color: var(--clr-accent);
}

/* Form */
.contact__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-field label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--clr-text);
  letter-spacing: 0.02em;
}

.form-field input,
.form-field select,
.form-field textarea {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 300;
  color: var(--clr-text);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: 2px;
  padding: 0.75rem 1rem;
  width: 100%;
  transition: border-color var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
  -webkit-appearance: none;
  appearance: none;
}

.form-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2322d3ee' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--clr-accent);
  box-shadow: 0 0 0 3px rgba(34,211,238,0.1);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--clr-border);
}

.form-field textarea {
  resize: vertical;
  min-height: 100px;
}

/* Option colors in dark selects */
.form-field select option {
  background: var(--clr-surface);
  color: var(--clr-text);
}

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  background: var(--clr-surface);
  border-top: 1px solid var(--clr-border);
  color: var(--clr-muted);
  padding-block: var(--space-lg);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.footer__logo {
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--clr-text);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.footer__copy {
  font-size: 0.8125rem;
}

.footer__nav {
  display: flex;
  gap: var(--space-md);
}

.footer__nav a {
  font-size: 0.8125rem;
  transition: color var(--duration) var(--ease);
}

.footer__nav a:hover {
  color: var(--clr-accent);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .gallery__grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 260px;
  }

  .gallery__item--wide {
    grid-column: span 1;
  }

  .services__grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-inline: auto;
  }

  .process__steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .value__grid {
    grid-template-columns: 1fr;
  }

  .value__grid--reverse .value__image,
  .value__grid--reverse .value__copy {
    order: unset;
  }

  .value__image {
    aspect-ratio: 16/9;
  }

  .problem__grid {
    grid-template-columns: 1fr;
    max-width: 540px;
    margin-inline: auto;
  }

  .contact__grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
}

@media (max-width: 640px) {
  :root {
    --space-xl: 4rem;
    --space-lg: 2.5rem;
  }

  .nav__links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--clr-bg);
    border-bottom: 1px solid var(--clr-border);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-md);
    gap: var(--space-sm);
    transform: translateY(-110%);
    transition: transform var(--duration) var(--ease);
  }

  .nav__links.open {
    transform: translateY(0);
  }

  .nav__toggle {
    display: flex;
  }

  .gallery__grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 280px;
  }

  .gallery__item--tall {
    grid-row: span 1;
  }

  .process__steps {
    grid-template-columns: 1fr;
  }

  .hero__actions {
    flex-direction: column;
    align-items: center;
  }

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

/* ── Problem ─────────────────────────────────────────────────── */
.problem {
  background: var(--clr-bg);
}

.problem__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.problem__block {
  padding: var(--space-md) calc(var(--space-md) * 1.25);
  border: 1px solid var(--clr-border);
  border-top: 2px solid var(--clr-accent);
  border-radius: 2px;
  background: var(--clr-surface);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  transition: box-shadow var(--duration) var(--ease),
              border-color var(--duration) var(--ease);
}

.problem__block:hover {
  box-shadow: 0 4px 32px rgba(34,211,238,0.07);
  border-color: rgba(34,211,238,0.25);
  border-top-color: var(--clr-accent);
}

.problem__block h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  line-height: 1.2;
  color: var(--clr-text);
}

.problem__block p {
  font-size: 0.9375rem;
  color: var(--clr-muted);
  line-height: 1.65;
}

.problem__kicker {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--clr-accent);
}

/* ── Value grid reverse modifier ─────────────────────────────── */
.value__grid--reverse .value__image {
  order: 2;
}

.value__grid--reverse .value__copy {
  order: 1;
}

/* ── Reduced motion ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ── Hero Chips ──────────────────────────────────────────────── */
.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 2.5rem;
}

.hero__chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 1.5rem;
  border: 1px solid var(--clr-border);
  border-radius: 2px;
  background: var(--clr-surface);
  min-width: 120px;
}

.hero__chip strong {
  font-family: var(--font-sans);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--clr-accent);
  line-height: 1;
  letter-spacing: -0.03em;
}

.hero__chip span {
  font-size: 0.75rem;
  color: var(--clr-muted);
  margin-top: 0.3rem;
  text-align: center;
  letter-spacing: 0.03em;
}

/* ── Why This Matters ────────────────────────────────────────── */
.why {
  background: var(--clr-surface);
}

.why__quote {
  margin-top: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  border-left: 2px solid var(--clr-accent);
  font-family: var(--font-serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  color: var(--clr-text);
  max-width: 700px;
}

/* ── Hardware / Prototypes Section ───────────────────────────── */
.hardware {
  position: relative;
  overflow: hidden;
  background: var(--clr-bg);
}

.hardware__bg {
  position: absolute;
  inset: -30% 0;
  background: url('../img2.jpg') center / cover no-repeat;
  filter: brightness(0.22) saturate(0.7);
  z-index: 0;
  will-change: transform;
}

.hardware .container {
  position: relative;
  z-index: 1;
}

.hardware__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

@media (max-width: 900px) {
  .hardware__grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-inline: auto;
  }
}

/* ── Contact Section ─────────────────────────────────────────── */
.contact__copy--centered {
  text-align: center;
  max-width: 540px;
  margin-inline: auto;
}

.contact__copy--centered h2 {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.2;
  margin-top: var(--space-xs);
  margin-bottom: var(--space-md);
}

.contact__copy--centered p {
  color: var(--clr-muted);
  margin-bottom: var(--space-md);
}

.contact__copy--centered .contact__links {
  display: flex;
  justify-content: center;
}
