/* ═══════════════════════════════════════════════════
   ATELIER — Luxury Editorial Portfolio
   Ghost Protocol Digital Studio
   ═══════════════════════════════════════════════════ */

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

:root {
  --bg: #0a0908;
  --surface: #12110f;
  --border: #1e1c18;
  --text: #f0ece4;
  --text-muted: #8a847a;
  --text-dim: #5a554d;
  --accent: #c9a96e;
  --accent-muted: rgba(201, 169, 110, 0.1);

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

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
}

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

em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
}

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

/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.5rem 0;
  transition: background 0.4s, padding 0.4s;
}

.nav.scrolled {
  background: rgba(10, 9, 8, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 1rem 0;
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 20px;
  position: relative;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--text);
  position: absolute;
  left: 0;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle span:first-child { top: 4px; }
.nav-toggle span:last-child { bottom: 4px; }

.nav-toggle.active span:first-child { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:last-child { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease-out);
}

.mobile-menu.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu a {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 300;
  color: var(--text-muted);
  transition: color 0.3s;
}

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

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  position: relative;
}

.hero-label {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 900px;
}

.hero-sub {
  margin-top: 2rem;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero-scroll {
  position: absolute;
  bottom: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.hero-scroll span {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ── Section Base ── */
.section {
  padding: clamp(5rem, 12vh, 10rem) clamp(1.5rem, 5vw, 4rem);
  max-width: 1400px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 3rem;
}

/* ── Work Grid ── */
.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.work-card {
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.work-card--large {
  grid-column: span 2;
}

.work-card-image {
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  transition: transform 0.6s var(--ease-out);
}

.work-card--large .work-card-image {
  aspect-ratio: 21 / 9;
}

.work-card:hover .work-card-image {
  transform: scale(1.02);
}

.work-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  background: linear-gradient(0deg, rgba(0,0,0,0.5) 0%, transparent 50%);
}

.work-card-number {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: var(--accent);
  opacity: 0.7;
}

.work-card-info {
  padding: 1.5rem 0;
}

.work-card-info h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.work-card-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 500px;
}

.work-card-tag {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--border);
}

/* ── Editorial Layout ── */
.section--editorial {
  border-top: 1px solid var(--border);
}

.editorial-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: start;
}

.editorial-heading {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 300;
  line-height: 1.15;
}

.editorial-body {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.editorial-stats {
  display: flex;
  gap: 3rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.stat-number {
  display: block;
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 0.5rem;
}

/* ── Services ── */
.services-list {
  border-top: 1px solid var(--border);
}

.service-item {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.3s;
}

.service-item:hover {
  background: var(--accent-muted);
  margin: 0 -1.5rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.service-number {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  color: var(--text-dim);
  min-width: 2rem;
}

.service-content {
  flex: 1;
}

.service-content h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 0.35rem;
}

.service-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.service-arrow {
  font-size: 1.25rem;
  color: var(--text-dim);
  transition: color 0.3s, transform 0.3s;
}

.service-item:hover .service-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

/* ── Marquee ── */
.marquee-section {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.marquee {
  width: 100%;
  overflow: hidden;
}

.marquee-track {
  display: flex;
  gap: 2rem;
  align-items: center;
  animation: marqueeScroll 30s linear infinite;
  width: max-content;
}

.marquee-track span {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--text-dim);
  white-space: nowrap;
}

.marquee-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
  flex-shrink: 0;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ── Contact ── */
.section--contact {
  border-top: 1px solid var(--border);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: start;
}

.contact-heading {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 300;
  line-height: 1.15;
}

.contact-link {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 300;
  display: inline-block;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--accent);
  transition: color 0.3s;
}

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

.contact-details {
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.contact-social {
  margin-top: 2rem;
  display: flex;
  gap: 1.5rem;
}

.contact-social a {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.3s;
}

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

/* ── Footer ── */
.footer {
  padding: 2rem clamp(1.5rem, 5vw, 4rem);
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

/* ── Reveal Animations ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Scroll Progress ── */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--gold), var(--cream));
  z-index: 9999; transition: width 0.05s linear;
}

/* ── Custom Cursor ── */
.cursor-dot, .cursor-ring {
  position: fixed; pointer-events: none; z-index: 10000; border-radius: 50%;
  transform: translate(-50%, -50%); mix-blend-mode: difference;
}
.cursor-dot { width: 6px; height: 6px; background: var(--cream); }
.cursor-ring {
  width: 36px; height: 36px; border: 1px solid var(--cream);
  transition: width 0.2s, height 0.2s, border-color 0.2s;
}
.cursor-ring.hover { width: 56px; height: 56px; border-color: var(--gold); }

@media (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* ── Process Section ── */
.process-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem;
  margin-top: 3rem;
}
.process-step {
  padding: 2rem 1.5rem; border-top: 1px solid rgba(201, 169, 110, 0.2);
}
.process-number {
  font-family: var(--serif); font-size: 3rem; font-weight: 300;
  color: var(--gold); opacity: 0.3; line-height: 1; display: block; margin-bottom: 1rem;
}
.process-step h3 {
  font-family: var(--serif); font-size: 1.2rem; font-weight: 400;
  color: var(--cream); margin-bottom: 0.75rem;
}
.process-step p {
  font-family: var(--sans); font-size: 0.85rem; line-height: 1.7; color: var(--stone);
}

/* ── Case Study ── */
.section--dark { background: #080808; }
.casestudy-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}
.casestudy-heading {
  font-family: var(--serif); font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 300;
  color: var(--cream); margin-bottom: 1.5rem;
}
.casestudy-desc {
  font-family: var(--sans); font-size: 0.95rem; line-height: 1.8;
  color: var(--stone); margin-bottom: 2rem;
}
.casestudy-stats { display: flex; gap: 2.5rem; }
.casestudy-stats .stat-number {
  font-family: var(--serif); font-size: 2.5rem; font-weight: 300; color: var(--gold);
}
.casestudy-stats .stat-suffix {
  font-family: var(--serif); font-size: 1.5rem; font-weight: 300; color: var(--gold);
}
.casestudy-stats .stat-label {
  display: block; font-family: var(--sans); font-size: 0.75rem;
  color: var(--stone); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 0.25rem;
}

/* ── Mockup ── */
.casestudy-mockup {
  background: #111; border-radius: 12px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.05);
}
.mockup-bar {
  display: flex; gap: 6px; padding: 12px 16px; background: #1a1a1a;
}
.mockup-bar span {
  width: 10px; height: 10px; border-radius: 50%; background: #333;
}
.mockup-bar span:first-child { background: #ff5f57; }
.mockup-bar span:nth-child(2) { background: #febc2e; }
.mockup-bar span:last-child { background: #28c840; }
.mockup-content { display: flex; min-height: 240px; }
.mockup-sidebar {
  width: 60px; background: #151515; padding: 16px 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.mockup-nav-item {
  width: 100%; aspect-ratio: 1; border-radius: 6px; background: #222;
}
.mockup-nav-item.active { background: var(--gold); opacity: 0.5; }
.mockup-main { flex: 1; padding: 20px; }
.mockup-chart {
  height: 80px; background: linear-gradient(135deg, rgba(201,169,110,0.1), rgba(201,169,110,0.05));
  border-radius: 8px; margin-bottom: 16px; position: relative; overflow: hidden;
}
.mockup-chart::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 60%;
  background: linear-gradient(90deg, transparent, rgba(201,169,110,0.15) 30%, rgba(201,169,110,0.3) 50%, rgba(201,169,110,0.1) 80%, transparent);
  clip-path: polygon(0 100%, 5% 80%, 15% 60%, 25% 70%, 35% 40%, 50% 30%, 65% 50%, 75% 20%, 85% 35%, 95% 10%, 100% 25%, 100% 100%);
}
.mockup-table { display: flex; flex-direction: column; gap: 8px; }
.mockup-row {
  height: 20px; background: #1a1a1a; border-radius: 4px;
  animation: shimmer 2s infinite alternate;
}
.mockup-row:nth-child(2) { width: 85%; }
.mockup-row:nth-child(3) { width: 70%; }
@keyframes shimmer {
  0% { opacity: 0.3; } 100% { opacity: 0.6; }
}

/* ── Enhanced Footer ── */
.footer-inner { flex-direction: column; gap: 2rem; }
.footer-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding-bottom: 2rem; border-bottom: 1px solid rgba(201,169,110,0.1);
}
.footer-brand h3 {
  font-family: var(--serif); font-size: 1.2rem; font-weight: 400; color: var(--cream);
  margin-bottom: 0.5rem;
}
.footer-brand p {
  font-family: var(--sans); font-size: 0.8rem; color: var(--stone); line-height: 1.6;
}
.footer-links { display: flex; gap: 2rem; }
.footer-links a {
  font-family: var(--sans); font-size: 0.8rem; color: var(--stone);
  text-decoration: none; transition: color 0.3s;
}
.footer-links a:hover { color: var(--gold); }
.footer-bottom {
  display: flex; justify-content: space-between;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }

  .work-grid { grid-template-columns: 1fr; }
  .work-card--large { grid-column: span 1; }
  .work-card--large .work-card-image { aspect-ratio: 16 / 9; }

  .editorial-layout,
  .contact-layout,
  .casestudy-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .editorial-stats {
    gap: 2rem;
  }

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

  .service-item { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .service-arrow { display: none; }

  .footer-top { flex-direction: column; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; }
}

@media (max-width: 480px) {
  .hero-title { font-size: clamp(2.2rem, 10vw, 3.5rem); }
  .editorial-stats { flex-direction: column; gap: 1.5rem; }
  .process-grid { grid-template-columns: 1fr; }
  .casestudy-stats { flex-direction: column; gap: 1.5rem; }
}

/* Wrapper anchor on work cards — added v0.1, 2026-05-25 */
.work-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.work-card-link:hover .work-card-info h3 {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

/* ============================================================
   v0.2 — Premium polish (2026-05-25)
   Applies premium-portfolio-design + color-psychology +
   business-psychology-of-design + wording-psychology + design-magick
   ============================================================ */

/* --- Work card as anchor (alignment fix) --- */
.work-card {
  display: block;          /* override default inline for <a> */
  color: inherit;
  text-decoration: none;
}
.work-card:hover .work-card-info h3 {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}
/* Retire the v0.1 wrapper-anchor approach */
.work-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

/* --- Film grain overlay (premium-tax positive, always-on) --- */
.film-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='0.55'/></svg>");
  background-size: 200px 200px;
}

/* --- Hero atmospheric depth (design-magick: aether layer) --- */
.hero {
  position: relative;
  overflow: hidden;
}
.hero-aurora {
  position: absolute;
  inset: -20%;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(184, 57, 15, 0.10) 0%, transparent 55%),
    radial-gradient(ellipse at 70% 60%, rgba(30, 96, 145, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 100%, rgba(139, 111, 71, 0.06) 0%, transparent 70%);
  animation: aurora-drift 30s ease-in-out infinite alternate;
}
@keyframes aurora-drift {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(2%, -3%) scale(1.05); }
}

/* --- Hero watermark (oversized "GP" mark, design-magick: sigil principle) --- */
.hero-watermark {
  position: absolute;
  right: -2vw;
  bottom: -8vw;
  pointer-events: none;
  z-index: 0;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-style: italic;
  font-size: clamp(28rem, 50vw, 60rem);
  line-height: 0.8;
  color: rgba(245, 245, 242, 0.025);
  user-select: none;
  letter-spacing: -0.05em;
}

/* Ensure hero content sits above the depth layers */
.hero > *:not(.hero-aurora):not(.hero-watermark) {
  position: relative;
  z-index: 1;
}

/* --- Slight rhythm refinement: more breath between sections (premium-portfolio) --- */
.section {
  padding-top: clamp(6rem, 12vh, 12rem);
  padding-bottom: clamp(6rem, 12vh, 12rem);
}

/* --- 7-tile grid: ensure --large still spans properly --- */
.work-card--large {
  grid-column: span 2;
}

