/* ============================================================
   Indra's Mirror — Web Design Portfolio
   Editorial / Confident / Crafted
   Darkroom palette. Garamond + Inter. Hand-coded.
   ============================================================ */

/* ---- CSS Custom Properties ---- */
:root {
  --bg: #0d0f13;
  --bg-alt: #14171d;
  --bg-card: #1a1d24;
  --text: #e8e2d8;
  --text-muted: #8a8580;
  --accent: #e8a840;
  --accent-subdued: rgba(232, 168, 64, 0.12);
  --border: #252830;
  --border-subtle: rgba(37, 40, 48, 0.6);

  --font-heading: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max-width: 1100px;
  --radius: 2px;

  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 32px;
  --space-lg: 64px;
  --space-xl: 100px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
}

/* ---- Atmosphere Layer: Subtle Grain ---- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ---- Selection ---- */
::selection {
  background: var(--accent);
  color: var(--bg);
}

/* ---- Container ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--text);
  line-height: 1.15;
}

h1 {
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  letter-spacing: 0.01em;
}

h2 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  letter-spacing: 0.01em;
}

h3 {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 500;
}

.text-accent {
  color: var(--accent);
}

/* ---- Section Label ---- */
.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 12px;
}

/* ---- Section Header ---- */
.section-header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.section-header h2 {
  margin-bottom: 12px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 460px;
  margin: 0 auto;
}

/* ---- Sections ---- */
.section {
  padding: var(--space-xl) 24px;
}

.section--alt {
  background: var(--bg-alt);
}

/* ============================================================
   Navigation
   ============================================================ */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(13, 15, 19, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.3s;
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  height: 72px;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.04em;
  line-height: 1.25;
}

.logo span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 36px;
  align-items: center;
}

.nav-menu a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--text);
}

.nav-cta {
  padding: 8px 22px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: var(--accent) !important;
  transition: all 0.3s !important;
}

.nav-cta:hover {
  background: var(--accent);
  color: var(--bg) !important;
}

/* Hamburger */
.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(--text);
  transition: 0.3s;
}

/* Mobile Nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: 999;
  padding: 40px 24px;
  overflow-y: auto;
}

.mobile-nav.active {
  display: block;
}

.mobile-nav nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mobile-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}

.mobile-nav a:hover {
  color: var(--accent);
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
  position: relative;
}

.hero-content {
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
  position: relative;
}

.hero-content .section-label {
  margin-bottom: 20px;
}

.hero-content h1 {
  margin-bottom: 28px;
  line-height: 1.08;
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: var(--text-muted);
  font-weight: 300;
  letter-spacing: 0.02em;
  max-width: 520px;
  margin: 0 auto 12px;
}

.hero-location {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 48px;
}

.hero-actions {
  display: flex;
  gap: 24px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.hero-scroll-link {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-scroll-link:hover {
  color: var(--accent);
}

.hero-scroll-link .arrow {
  display: inline-block;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 14px 34px;
  border-radius: var(--radius);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  background: transparent;
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

/* ============================================================
   Portfolio Strip — The Signature Move
   ============================================================ */

.project-strip-wrapper {
  position: relative;
  width: 100%;
}

.project-strip {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  padding: 8px 24px 28px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* Custom scrollbar — gold */
.project-strip::-webkit-scrollbar {
  height: 4px;
}

.project-strip::-webkit-scrollbar-track {
  background: var(--border);
  border-radius: 2px;
}

.project-strip::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 2px;
}

.project-strip::-webkit-scrollbar-thumb:hover {
  background: var(--text);
}

/* Firefox scrollbar */
.project-strip {
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--border);
}

/* ---- Project Card ---- */
.project-card {
  flex: 0 0 380px;
  scroll-snap-align: start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color 0.3s, transform 0.3s;
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.project-card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--bg-alt);
  position: relative;
  overflow: hidden;
}

.project-card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 60%,
    var(--bg-card) 100%
  );
}

.project-card-body {
  padding: 24px;
}

.project-niche {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 8px;
}

.project-name {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.project-blurb {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================================
   Services — Asymmetric Grid
   ============================================================ */

.services-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1px;
  background: var(--border);
}

.service-item {
  background: var(--bg-card);
  padding: var(--space-lg) var(--space-md);
  position: relative;
  transition: background 0.3s;
}

.service-item:hover {
  background: var(--bg-alt);
}

.service-item--large {
  /* Natural fit in 2fr column */
}

.service-item--wide {
  grid-column: 1 / -1;
}

.service-number {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--accent);
  opacity: 0.5;
  margin-bottom: 12px;
  line-height: 1;
}

.service-item h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.service-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 360px;
}

/* ============================================================
   About
   ============================================================ */

.about-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: var(--space-md);
  align-items: start;
}

.about-label-col {
  padding-top: 4px;
}

.about-content h2 {
  margin-bottom: 24px;
}

.about-lead {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-style: italic;
  color: var(--accent);
  line-height: 1.4;
  margin-bottom: 24px;
  max-width: 560px;
}

.about-content p {
  color: var(--text-muted);
  margin-bottom: 14px;
  max-width: 580px;
}

/* ============================================================
   Process
   ============================================================ */

.process-steps {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  max-width: 860px;
  margin: 0 auto;
}

.process-step {
  flex: 1;
  display: flex;
  gap: 20px;
}

.process-number {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  color: var(--accent);
  opacity: 0.4;
  line-height: 1;
  flex-shrink: 0;
}

.process-step h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.process-step p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.process-arrow {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--accent);
  opacity: 0.35;
  padding-top: 8px;
  flex-shrink: 0;
}

/* ============================================================
   Contact
   ============================================================ */

.contact-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: var(--space-md);
  align-items: start;
}

.contact-label-col {
  padding-top: 4px;
}

.contact-content h2 {
  margin-bottom: 16px;
}

.contact-lead {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: var(--space-md);
  max-width: 500px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
  max-width: 400px;
}

.contact-detail {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-detail-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
}

.contact-detail a {
  color: var(--text);
  text-decoration: none;
  font-size: 1.05rem;
  transition: color 0.2s;
}

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

.contact-detail span {
  color: var(--text-muted);
}

.contact-brief p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 480px;
}

/* ============================================================
   Footer
   ============================================================ */

.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 56px 24px 32px;
}

.footer-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 32px;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.footer-tagline {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

.footer-links a {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
}

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

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-bottom p {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

/* ============================================================
   Fade-in Animations (driven by main.js IntersectionObserver)
   ============================================================ */

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 900px) {
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .about-label-col,
  .contact-label-col {
    padding-top: 0;
  }

  .about-lead {
    font-size: 1.15rem;
  }

  .process-steps {
    flex-direction: column;
    gap: 20px;
  }

  .process-arrow {
    display: none;
  }

  .section {
    padding: 72px 24px;
  }

  .hero-content h1 {
    font-size: clamp(2.2rem, 7vw, 4rem);
  }

  .project-card {
    flex: 0 0 320px;
  }

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

  .service-item--wide {
    grid-column: 1;
  }
}

@media (max-width: 640px) {
  .desktop-nav {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .mobile-nav {
    display: none;
  }

  .mobile-nav.active {
    display: block;
  }

  .navbar {
    height: 60px;
  }

  .nav-container {
    height: 60px;
    padding: 0 16px;
  }

  .mobile-nav {
    top: 60px;
  }

  .logo {
    font-size: 1.15rem;
  }

  .hero {
    min-height: auto;
    padding: 100px 16px 60px;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-actions {
    flex-direction: column;
    gap: 16px;
    align-items: center;
  }

  .section {
    padding: 56px 16px;
  }

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

  .section-header h2 {
    font-size: 1.7rem;
  }

  .project-strip {
    padding: 8px 16px 24px;
  }

  .project-card {
    flex: 0 0 280px;
  }

  .project-card-body {
    padding: 18px;
  }

  .project-name {
    font-size: 1.15rem;
  }

  .service-item {
    padding: 32px 20px;
  }

  .about-content,
  .contact-content {
    text-align: left;
  }

  .contact-details {
    max-width: 100%;
  }

  .footer {
    padding: 40px 16px 24px;
  }

  .footer-main {
    flex-direction: column;
    gap: 20px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 4px;
  }
}
