/* ══════════════════════════════════════════════════════════
   Meridian Studio — Igloo Inc Visual Language
   Arctic Futurism: dark monochrome, frosted glass, HUD layout
   ══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

/* ── Tokens ── */
:root {
  --color-bg: #0A0B0E;
  --color-bg-alt: #12141A;
  --color-surface: #1A1D24;
  --color-text: #E8ECF1;
  --color-text-muted: #8A8F9A;
  --color-heading: #FFFFFF;
  --color-accent: #8A9AB5;
  --color-border: rgba(255,255,255,0.08);
  --color-frost: rgba(255,255,255,0.04);
  --color-frost-border: rgba(255,255,255,0.1);
  --color-glow: rgba(160,180,220,0.12);
  --color-btn-bg: #FFFFFF;
  --color-btn-text: #0A0B0E;

  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'IBM Plex Mono', monospace;

  --size-display: clamp(3rem, 6vw, 5rem);
  --size-h1: clamp(2.5rem, 5vw, 4rem);
  --size-h2: clamp(1.75rem, 3vw, 2.5rem);
  --size-h3: clamp(1.25rem, 2vw, 1.5rem);
  --size-body: 0.9375rem;
  --size-small: 0.8125rem;
  --size-label: 0.75rem;

  --section-padding: clamp(80px, 12vh, 140px);
  --container-max: 1200px;
  --radius: 2px;
  --radius-lg: 4px;
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --nav-height: 80px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-body);
  font-size: var(--size-body);
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--color-heading); }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
  font-weight: 700;
}

h1 { font-size: var(--size-h1); }
h2 { font-size: var(--size-h2); }
h3 { font-size: var(--size-h3); }

p { text-wrap: pretty; }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

/* ── Section Label (////// prefix) ── */
.section-label {
  font-family: var(--font-body);
  font-size: var(--size-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-label::before {
  content: '//////';
  color: var(--color-text-muted);
  opacity: 0.5;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: var(--size-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 14px 32px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: var(--color-btn-bg);
  color: var(--color-btn-text);
}
.btn-primary:hover {
  background: var(--color-accent);
  color: var(--color-bg);
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--color-glow);
}
.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-frost-border);
}
.btn-secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-heading);
  transform: translateY(-2px);
}

/* ── Header ── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 clamp(20px, 4vw, 48px);
  background: rgba(10, 11, 14, 0.85);
  backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-heading);
  letter-spacing: -0.02em;
  text-decoration: none;
}
.header-logo span {
  color: var(--color-text-muted);
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  margin-left: 8px;
  vertical-align: middle;
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.header-nav a {
  font-family: var(--font-body);
  font-size: var(--size-label);
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: var(--transition);
  position: relative;
}
.header-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.header-nav a:hover { color: var(--color-heading); }
.header-nav a:hover::after { width: 100%; }
.header-nav a.active { color: var(--color-heading); }
.header-nav a.active::after { width: 100%; }
.header-cta {
  font-family: var(--font-body);
  font-size: var(--size-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 24px;
  background: transparent;
  color: var(--color-heading);
  border: 1px solid var(--color-frost-border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: var(--transition);
}
.header-cta:hover {
  background: var(--color-btn-bg);
  color: var(--color-btn-text);
  border-color: var(--color-btn-bg);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--color-heading);
  transition: var(--transition);
}

/* ── Hero ── */
.hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-height);
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.25;
  filter: saturate(0) contrast(1.1);
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(10,11,14,0.6) 0%,
    rgba(10,11,14,0.3) 40%,
    rgba(10,11,14,0.85) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}
.hero-title {
  font-size: var(--size-display);
  max-width: 800px;
  margin-bottom: 24px;
}
.hero-subtitle {
  font-size: var(--size-body);
  color: var(--color-text-muted);
  max-width: 560px;
  margin-bottom: 40px;
  line-height: 1.8;
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 48px;
  font-size: var(--size-label);
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
}
.hero-meta span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-meta span::before {
  content: '//';
  color: var(--color-accent);
  opacity: 0.5;
}
.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: clamp(20px, 4vw, 48px);
  font-size: var(--size-label);
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.5; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(8px); }
}

/* ── Stats ── */
.stats {
  padding: var(--section-padding) 0;
  border-bottom: 1px solid var(--color-border);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--color-border);
}
.stat-item {
  background: var(--color-bg);
  padding: clamp(32px, 5vw, 56px);
  text-align: center;
  position: relative;
}
.stat-value {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--color-heading);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 8px;
}
.stat-value::before {
  content: '+';
  font-size: 0.5em;
  color: var(--color-accent);
  vertical-align: super;
  margin-right: 2px;
}
.stat-label {
  font-size: var(--size-label);
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── About ── */
.about {
  padding: var(--section-padding) 0;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(48px, 6vw, 80px);
  align-items: start;
}
.about-text p {
  color: var(--color-text-muted);
  margin-bottom: 24px;
}
.about-text p:first-of-type {
  color: var(--color-text);
  font-size: 1rem;
}
.about-image {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}
.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  filter: saturate(0.7) contrast(1.05);
  transition: var(--transition);
}
.about-image:hover img {
  filter: saturate(1) contrast(1);
  transform: scale(1.02);
}
.about-image::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--color-frost-border);
  border-radius: var(--radius);
  pointer-events: none;
}

/* ── Services ── */
.services {
  padding: var(--section-padding) 0;
  background: var(--color-bg-alt);
}
.services-intro {
  max-width: 600px;
  margin-bottom: clamp(48px, 6vw, 72px);
}
.services-intro p {
  color: var(--color-text-muted);
  margin-top: 16px;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--color-border);
}
.service-card {
  background: var(--color-bg-alt);
  padding: clamp(32px, 4vw, 48px);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.service-card:hover {
  background: var(--color-surface);
}
.service-card:hover::before {
  opacity: 1;
}
.service-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--color-accent);
  margin-bottom: 24px;
  border: 1px solid var(--color-frost-border);
  border-radius: var(--radius);
}
.service-card h3 {
  margin-bottom: 16px;
  font-size: var(--size-h3);
}
.service-card p {
  color: var(--color-text-muted);
  font-size: var(--size-small);
  line-height: 1.7;
}

/* ── Projects ── */
.projects {
  padding: var(--section-padding) 0;
}
.projects-intro {
  max-width: 600px;
  margin-bottom: clamp(48px, 6vw, 72px);
}
.projects-intro p {
  color: var(--color-text-muted);
  margin-top: 16px;
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 2vw, 24px);
}
.project-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  transition: var(--transition);
}
.project-card:hover {
  border-color: var(--color-frost-border);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 40px var(--color-glow);
}
.project-image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  position: relative;
}
.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.6) contrast(1.1);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.project-card:hover .project-image img {
  filter: saturate(0.9) contrast(1.05);
  transform: scale(1.05);
}
.project-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(10,11,14,0.6) 0%, transparent 50%);
}
.project-info {
  padding: clamp(20px, 3vw, 32px);
}
.project-info h3 {
  font-size: var(--size-h3);
  margin-bottom: 8px;
}
.project-info p {
  color: var(--color-text-muted);
  font-size: var(--size-small);
}

/* ── Process ── */
.process {
  padding: var(--section-padding) 0;
  background: var(--color-bg-alt);
}
.process-intro {
  max-width: 600px;
  margin-bottom: clamp(48px, 6vw, 72px);
}
.process-intro p {
  color: var(--color-text-muted);
  margin-top: 16px;
}
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 2vw, 24px);
}
.process-step {
  padding: clamp(24px, 3vw, 40px);
  background: var(--color-frost);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  backdrop-filter: blur(20px) saturate(1.2);
  transition: var(--transition);
}
.process-step:hover {
  border-color: var(--color-frost-border);
  background: rgba(255,255,255,0.06);
}
.step-number {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--color-accent);
  opacity: 0.4;
  line-height: 1;
  margin-bottom: 20px;
  letter-spacing: -0.03em;
}
.process-step h3 {
  margin-bottom: 12px;
}
.process-step p {
  color: var(--color-text-muted);
  font-size: var(--size-small);
}

/* ── Testimonials ── */
.testimonials {
  padding: var(--section-padding) 0;
}
.testimonials-intro {
  max-width: 600px;
  margin-bottom: clamp(48px, 6vw, 72px);
}
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 24px);
}
.testimonial-card {
  padding: clamp(28px, 3vw, 40px);
  background: var(--color-frost);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  gap: 24px;
  transition: var(--transition);
}
.testimonial-card:hover {
  border-color: var(--color-frost-border);
  transform: translateY(-2px);
}
.testimonial-quote {
  font-size: var(--size-body);
  color: var(--color-text);
  line-height: 1.8;
  flex: 1;
  position: relative;
  padding-left: 20px;
  border-left: 2px solid var(--color-accent);
}
.testimonial-author {
  font-size: var(--size-label);
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}
.testimonial-author strong {
  color: var(--color-heading);
  display: block;
  font-weight: 500;
  margin-bottom: 2px;
}

/* ── CTA ── */
.cta-section {
  padding: var(--section-padding) 0;
  background: var(--color-bg-alt);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--color-glow), transparent 70%);
  pointer-events: none;
}
.cta-content {
  position: relative;
  z-index: 1;
}
.cta-section h2 {
  font-size: var(--size-h1);
  margin-bottom: 16px;
}
.cta-section p {
  color: var(--color-text-muted);
  max-width: 480px;
  margin: 0 auto 40px;
}

/* ── Footer ── */
.footer {
  padding: clamp(48px, 6vw, 80px) 0 32px;
  border-top: 1px solid var(--color-border);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: clamp(32px, 4vw, 64px);
  margin-bottom: 48px;
}
.footer-brand h4 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 16px;
}
.footer-brand p {
  color: var(--color-text-muted);
  font-size: var(--size-small);
  max-width: 320px;
}
.footer-col h5 {
  font-family: var(--font-body);
  font-size: var(--size-label);
  color: var(--color-accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-col a {
  font-size: var(--size-small);
  color: var(--color-text-muted);
  transition: var(--transition);
}
.footer-col a:hover { color: var(--color-heading); }
.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--size-label);
  color: var(--color-text-muted);
}
.footer-bottom span::before {
  content: '// ';
  color: var(--color-accent);
  opacity: 0.5;
}

/* ── Scroll Reveal Animations ── */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes assembleIn {
  from { opacity: 0; transform: translateY(60px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes loadPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
}
.reveal.is-visible {
  animation: fadeSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ── Mobile ── */
@media (max-width: 1024px) {
  .header-logo { font-size: 1.1rem; }
  .header-logo img { max-height: 42px; }
  .header-nav { display: none; }
  .header-cta { display: none; }
  .hamburger { display: flex; }

  .header-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(10, 11, 14, 0.95);
    backdrop-filter: blur(20px);
    padding: 24px clamp(20px, 4vw, 48px);
    gap: 16px;
    border-bottom: 1px solid var(--color-border);
  }
  .header-nav.open a {
    font-size: var(--size-body);
    color: var(--color-text);
  }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .hero-title { font-size: clamp(2rem, 8vw, 3rem); }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .process-grid { grid-template-columns: 1fr; }
  .hero-meta { flex-direction: column; align-items: flex-start; gap: 12px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .cta-section h2 { font-size: var(--size-h2); }
}
