/* ════════════════════════════════════════════
   FLIP CREATIVE AGENCY — Brand Stylesheet
   Obsidian Black · Signal White · Flux Teal
   ════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  --black: #0D0D0D;
  --black-soft: #1a1a1a;
  --black-mid: #222;
  --white: #FAFAFA;
  --white-muted: rgba(250,250,250,0.6);
  --white-dim: rgba(250,250,250,0.3);
  --teal: #00E5C8;
  --teal-dim: rgba(0,229,200,0.15);
  --teal-glow: rgba(0,229,200,0.08);
  --warm-grey: #8C8C8C;
  --warm-grey-muted: rgba(140,140,140,0.4);
  --border: rgba(250,250,250,0.08);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Space Mono', 'SF Mono', 'Fira Code', monospace;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--teal); color: var(--black); }

/* ─── Navigation ─── */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 40px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(13,13,13,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.nav-logo span { color: var(--teal); }

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo-svg {
  height: 16px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--white-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--teal);
  transition: width var(--transition);
}

.nav-links a:hover { color: var(--white); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--teal); }

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 24px;
  cursor: pointer;
}

/* ─── Container ─── */

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ─── Hero Section ─── */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 50%;
  right: -10%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--teal-glow) 0%, transparent 70%);
  transform: translateY(-50%);
  pointer-events: none;
}


.hero-tag {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--teal);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-tag::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--teal);
}

.hero h1 {
  font-size: clamp(40px, 7vw, 80px);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -2px;
  max-width: 900px;
  margin-bottom: 32px;
}

.hero h1 em {
  font-style: normal;
  color: var(--teal);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flipper-mascot {
  width: 100%;
  max-width: 420px;
  height: auto;
  filter: drop-shadow(0 0 60px rgba(0,229,200,0.15));
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

.hero p {
  font-size: 18px;
  color: var(--white-muted);
  max-width: 560px;
  line-height: 1.8;
  margin-bottom: 48px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ─── Buttons ─── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--teal);
  color: var(--black);
}

.btn-primary:hover {
  background: #00cca0;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,229,200,0.25);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--white-muted);
  background: rgba(250,250,250,0.05);
}

/* ─── Section Headers ─── */

.section {
  padding: 120px 0;
  border-top: 1px solid var(--border);
}

.section-header {
  margin-bottom: 64px;
}

.section-number {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--warm-grey);
  letter-spacing: 3px;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 300;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 16px;
  color: var(--white-muted);
  max-width: 500px;
}

/* ─── Case Study Grid ─── */

.case-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.case-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--black-soft);
  border: 1px solid var(--border);
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.case-card:hover {
  border-color: rgba(0,229,200,0.25);
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}

.case-card-image {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: flex-end;
}

.case-card:hover .case-card-image {
  /* subtle glow on hover handled by parent */
}

.case-card-overlay {
  width: 100%;
  padding: 32px 32px 28px;
  background: linear-gradient(transparent, rgba(0,0,0,0.85) 30%);
}

.case-card-overlay h3 {
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
  color: var(--white);
}

.case-card-overlay .client {
  font-size: 13px;
  color: var(--white-muted);
}

/* ─── About Section ─── */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.about-text h2 {
  font-size: 32px;
  font-weight: 300;
  letter-spacing: -1px;
  margin-bottom: 24px;
}

.about-text p {
  font-size: 15px;
  color: var(--white-muted);
  line-height: 1.8;
  margin-bottom: 20px;
}

.about-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.value-item {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--black-soft);
  border: 1px solid var(--border);
}

.value-item h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 8px;
}

.value-item p {
  font-size: 13px;
  color: var(--white-muted);
  line-height: 1.6;
}

/* ─── Services Section ─── */

.services-section {
  padding: 120px 0;
  border-top: 1px solid var(--border);
}

.service-block {
  padding: 48px 0;
  border-top: 1px solid var(--border);
}

.service-block:first-of-type {
  border-top: none;
  padding-top: 0;
}

.service-block-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 16px;
}

.service-block-number {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--teal);
  letter-spacing: 2px;
  white-space: nowrap;
  margin-top: 4px;
}

.service-block h3 {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 400;
  letter-spacing: -0.5px;
}

.service-block-desc {
  font-size: 14px;
  color: var(--white-muted);
  max-width: 680px;
  line-height: 1.8;
  margin-bottom: 32px;
}

/* ─── Service Gallery ─── */

.service-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.service-gallery-3 {
  grid-template-columns: repeat(3, 1fr);
}

.gallery-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--black-soft);
  border: 1px solid var(--border);
  transition: all var(--transition);
  cursor: pointer;
  aspect-ratio: 4/3;
}

.gallery-card:hover {
  border-color: rgba(0,229,200,0.3);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-card:hover img {
  transform: scale(1.06);
}

.gallery-card .gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  font-size: 12px;
  color: var(--white);
  line-height: 1.4;
  letter-spacing: 0.3px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-card:hover .gallery-caption {
  opacity: 1;
}

.gallery-card .gallery-caption strong {
  display: block;
  font-weight: 500;
  font-size: 13px;
  margin-bottom: 2px;
}

/* ─── Contact ─── */

.contact-section {
  text-align: center;
  padding: 120px 0;
}

.contact-section h2 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 300;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.contact-section p {
  color: var(--white-muted);
  font-size: 16px;
  margin-bottom: 40px;
}

.contact-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Footer ─── */

footer {
  border-top: 1px solid var(--border);
  padding: 32px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--warm-grey);
}

footer .copy {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--white-dim);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--white-dim);
  text-decoration: none;
  font-size: 12px;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--white-muted);
}

/* ─── Case Detail Page ─── */

.case-detail {
  padding-top: 120px;
  padding-bottom: 80px;
  max-width: 800px;
}

.case-detail-back {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--warm-grey);
  text-decoration: none;
  margin-bottom: 48px;
  transition: color var(--transition);
}

.case-detail-back:hover {
  color: var(--teal);
}

.case-detail .meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--warm-grey);
}

.case-detail h1 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 300;
  letter-spacing: -1px;
  margin-bottom: 8px;
}

.case-detail .client-name {
  font-size: 16px;
  color: var(--teal);
  margin-bottom: 48px;
}

.case-detail .hero-image {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 48px;
  background: var(--black-soft);
  border: 1px solid var(--border);
}

.case-detail .hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-detail .content {
  font-size: 15px;
  color: var(--white-muted);
  line-height: 1.9;
}

.case-detail .content p {
  margin-bottom: 20px;
}

.case-detail .content h2 {
  font-size: 20px;
  font-weight: 400;
  margin: 40px 0 16px;
  color: var(--white);
}

.case-detail .stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 48px 0;
}

.case-detail .stat-item {
  text-align: center;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--black-soft);
  border: 1px solid var(--border);
}

.case-detail .stat-value {
  font-size: 32px;
  font-weight: 300;
  color: var(--teal);
  font-family: var(--font-mono);
  margin-bottom: 4px;
}

.case-detail .stat-label {
  font-size: 12px;
  color: var(--warm-grey);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ─── Responsive ─── */

@media (max-width: 1024px) {
  .service-gallery {
    grid-template-columns: repeat(3, 1fr);
  }
  .service-gallery-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  nav {
    padding: 0 20px;
  }
  .nav-links {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--black);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open {
    display: flex;
  }
  .mobile-toggle {
    display: block;
  }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .hero-visual {
    order: -1;
  }
  .flipper-mascot {
    max-width: 260px;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .about-values {
    grid-template-columns: 1fr;
  }
  .service-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  .service-gallery-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .case-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .container {
    padding: 0 20px;
  }
  .case-detail .stats {
    grid-template-columns: 1fr;
  }
  footer {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}
