/* ============================================================
   TANGRAM TALE - Premium Design Agency
   A warm, editorial aesthetic with bold typography
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700;800&family=Roboto+Condensed:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,300;1,400;1,700&family=Roboto:wght@300;400;500;700;900&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600&display=swap');

/* --- Design Tokens --- */
:root {
  /* Brand Palette */
  --color-primary: #b64b11;
  --color-secondary: #9f6f4b;
  --color-accent: #693309;
  --color-dark: #492a07;
  --color-dark-deep: #2E1A05;
  --color-warm: #D4956A;

  /* Surfaces */
  --bg-page: #FEFBF6;
  --bg-cream: #F8F2EB;
  --bg-warm: #F0E6DA;
  --bg-dark: #492a07;
  --bg-darker: #2E1A05;
  --surface-card: #ffffff;

  /* Text */
  --text-heading: #2E1A05;
  --text-body: #5C4A3A;
  --text-muted: #8B7A6B;
  --text-on-dark: #FAF5EE;
  --text-on-dark-muted: rgba(250,245,238,0.65);

  /* Typography */
  --font-display: 'Roboto Condensed', sans-serif;
  --font-serif: 'Playfair Display', serif;
  --font-body: 'Open Sans', sans-serif;
  --font-mono: 'Roboto', sans-serif;

  /* Spacing Scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --space-2xl: 8rem;
  --space-3xl: 12rem;

  /* Borders & Effects */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --shadow-sm: 0 1px 3px rgba(46,26,5,0.06);
  --shadow-md: 0 4px 20px rgba(46,26,5,0.08);
  --shadow-lg: 0 12px 40px rgba(46,26,5,0.1);
  --shadow-xl: 0 24px 60px rgba(46,26,5,0.14);

  /* Layout */
  --max-width: 1200px;
  --header-height: 80px;
  --tab-bar-height: 54px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 0.2s;
  --duration-base: 0.4s;
  --duration-slow: 0.7s;
}

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

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

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

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

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--duration-fast) var(--ease-out);
}

ul { list-style: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.05;
}

input, textarea, button, select {
  font-family: inherit;
  border: none;
  outline: none;
  background: none;
}

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

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   CUSTOM CURSOR
   ============================================================ */
.cursor-dot {
  width: 8px;
  height: 8px;
  background: var(--color-primary);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease-out),
              height 0.3s var(--ease-out),
              background 0.3s var(--ease-out);
  mix-blend-mode: normal;
}

.cursor-ring {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--color-primary);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.35s var(--ease-out),
              height 0.35s var(--ease-out),
              border-color 0.35s var(--ease-out),
              opacity 0.35s var(--ease-out);
  opacity: 0.5;
}

body.cursor-hover .cursor-dot {
  width: 48px;
  height: 48px;
  background: rgba(182, 75, 17, 0.12);
}

body.cursor-hover .cursor-ring {
  width: 48px;
  height: 48px;
  opacity: 0;
}

/* ============================================================
   HEADER / NAVIGATION
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(254,251,246,0.97);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  transition: box-shadow var(--duration-base) var(--ease-out),
              background var(--duration-base) var(--ease-out),
              height var(--duration-base) var(--ease-out);
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  box-shadow: 0 4px 24px rgba(46,26,5,0.06);
  border-bottom-color: rgba(46,26,5,0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.site-logo img {
  height: 40px;
  width: auto;
  transition: opacity var(--duration-fast);
}

.site-logo:hover img {
  opacity: 0.8;
}

/* Nav Links */
.nav-list {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-list > li > a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 16px;
  position: relative;
  border-radius: 6px;
  transition: color 0.3s var(--ease-out), background 0.3s var(--ease-out);
}

.nav-list > li > a::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 16px; right: 16px;
  width: auto; height: 1.5px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}

.nav-list > li > a:hover {
  color: var(--text-heading);
  background: rgba(46,26,5,0.03);
}

.nav-list > li > a.active {
  color: var(--color-primary);
}

.nav-list > li > a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-list > li > a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Nav CTA Button */
.nav-cta > a.nav-list > li > a,
.nav-cta > a {
  background: var(--color-primary) !important;
  color: #fff !important;
  border-radius: 6px !important;
  padding: 8px 20px !important;
  font-size: 0.75rem !important;
  letter-spacing: 2px !important;
  transition: background 0.3s var(--ease-out), transform 0.15s var(--ease-out) !important;
}

.nav-cta > a::after {
  display: none !important;
}

.nav-cta > a:hover {
  background: var(--color-accent) !important;
  transform: translateY(-1px);
}

/* Hamburger */
.menu-toggle {
  display: none;
  width: 32px; height: 24px;
  position: relative;
  cursor: pointer;
  background: none; border: none;
  z-index: 110;
}

.menu-toggle span {
  display: block;
  position: absolute;
  left: 0;
  width: 100%; height: 2px;
  background: var(--text-heading);
  transition: all 0.35s var(--ease-out);
}

.menu-toggle span:nth-child(1) { top: 0; }
.menu-toggle span:nth-child(2) { top: 11px; width: 66%; }
.menu-toggle span:nth-child(3) { top: 22px; }

.menu-toggle.open span:nth-child(1) {
  top: 11px;
  transform: rotate(45deg);
}
.menu-toggle.open span:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}
.menu-toggle.open span:nth-child(3) {
  top: 11px;
  transform: rotate(-45deg);
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(46,26,5,0.5);
  backdrop-filter: blur(4px);
  z-index: 98;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-out);
}

.nav-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================================
   SECTION LABEL (eyebrow text)
   ============================================================ */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: var(--space-md);
}

.section-label::before {
  content: '';
  width: 40px; height: 1px;
  background: var(--color-primary);
}

.section-label--light {
  color: var(--color-warm);
}

.section-label--light::before {
  background: var(--color-warm);
}

.section-label--center {
  justify-content: center;
}

.section-label--center::before {
  display: none;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  margin-top: var(--header-height);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: left 40%;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(46,26,5,0.7) 0%,
    rgba(46,26,5,0.25) 40%,
    rgba(46,26,5,0) 70%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 0 clamp(60px, 8vh, 120px) 0;
}

.hero-subtitle {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text-on-dark);
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: var(--space-md);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s var(--ease-out) 0.3s forwards;
}

.hero-subtitle::before {
  content: '';
  width: 40px; height: 1px;
  background: var(--text-on-dark);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 0.95;
  color: #ffffff;
  letter-spacing: -0.02em;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.9s var(--ease-out) 0.5s forwards;
}

.hero-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 28px;
  right: clamp(20px, 4vw, 48px);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 1s forwards;
}

.hero-scroll-hint span {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  writing-mode: vertical-lr;
}

.scroll-line {
  width: 1px; height: 48px;
  background: rgba(255,255,255,0.3);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: -100%; left: 0;
  width: 100%; height: 100%;
  background: #ffffff;
  animation: scrollPulse 2s var(--ease-in-out) infinite;
}

@keyframes scrollPulse {
  0% { top: -100%; }
  50% { top: 100%; }
  100% { top: 100%; }
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   TANGRAM PHILOSOPHY
   ============================================================ */
.philosophy-section {
  position: relative;
  padding: var(--space-3xl) 0;
  overflow: hidden;
}

.philosophy-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: center;
}

.philosophy-image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
}

.philosophy-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out);
}

.philosophy-image:hover img {
  transform: scale(1.04);
}

.tangram-svg {
  width: 100%;
  height: 100%;
  background: var(--bg-cream);
  border-radius: var(--radius-lg);
}

.tangram-svg polygon,
.tangram-svg rect {
  transition: none;
  will-change: transform;
}

.philosophy-image::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 1px rgba(46,26,5,0.08);
  pointer-events: none;
}

.philosophy-text h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: var(--space-md);
  line-height: 1.1;
}

.philosophy-text h2 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--color-primary);
}

.philosophy-text p {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--text-body);
  max-width: 480px;
}

/* ============================================================
   SERVICES — Bento Grid
   ============================================================ */
.services-section {
  background: var(--bg-darker);
  padding: var(--space-2xl) 0;
  position: relative;
  overflow: hidden;
}

/* Subtle texture */
.services-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(182,75,17,0.08) 0%, transparent 50%),
    radial-gradient(circle at 85% 80%, rgba(159,111,75,0.06) 0%, transparent 50%);
  pointer-events: none;
}

.services-header {
  text-align: center;
  margin-bottom: var(--space-xl);
  position: relative;
  z-index: 1;
}

.services-header .section-label--center {
  color: var(--color-warm);
}

.services-header .section-label--center::before {
  display: none;
}

.services-header h2 {
  font-size: clamp(2.5rem, 4.5vw, 4rem);
  color: #ffffff;
  line-height: 1.1;
  margin-bottom: var(--space-md);
}

.services-header h2 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

.services-header-sub {
  color: rgba(255,255,255,0.5);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.7;
  font-size: 0.9375rem;
}

/* --- Bento Grid Layout --- */
.services-bento {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr 1fr;
  grid-template-rows: 280px 280px;
  gap: 12px;
  position: relative;
  z-index: 1;
}

/* Photography: tall left column spanning 2 rows */
.services-bento-item--hero {
  grid-row: 1 / 3;
}

/* Digital: wide bottom right spanning 2 columns */
.services-bento-item--wide {
  grid-column: 2 / 4;
}

/* --- Bento Card --- */
.services-bento-item {
  position: relative;
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
}

.services-bento-item img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}

.services-bento-item:hover img {
  transform: scale(1.08);
}

/* Dark gradient overlay */
.services-bento-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(30,16,4,0.85) 0%,
    rgba(30,16,4,0.35) 45%,
    rgba(30,16,4,0.15) 100%
  );
  transition: background 0.5s var(--ease-out);
  z-index: 1;
}

.services-bento-item:hover .services-bento-overlay {
  background: linear-gradient(
    to top,
    rgba(30,16,4,0.9) 0%,
    rgba(30,16,4,0.25) 50%,
    rgba(30,16,4,0.08) 100%
  );
}

/* Content positioned at bottom */
.services-bento-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 28px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Large step number */
.services-bento-num {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--color-warm);
  opacity: 0.8;
  margin-bottom: 10px;
}

.services-bento-content h3 {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.5vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 0;
  transition: margin-bottom 0.4s var(--ease-out);
}

/* Hero item gets larger title */
.services-bento-item--hero .services-bento-content h3 {
  font-size: clamp(1.3rem, 2vw, 1.75rem);
}

.services-bento-content p {
  font-size: 0.875rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.65);
  max-width: 320px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease-out),
              opacity 0.4s var(--ease-out),
              margin 0.4s var(--ease-out);
  margin-top: 0;
}

.services-bento-item:hover .services-bento-content h3 {
  margin-bottom: 4px;
}

.services-bento-item:hover .services-bento-content p {
  max-height: 80px;
  opacity: 1;
  margin-top: 8px;
}

/* Explore link */
.services-bento-link {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-warm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease-out) 0.1s,
              transform 0.4s var(--ease-out) 0.1s;
}

.services-bento-link span {
  transition: transform 0.3s var(--ease-out);
}

.services-bento-item:hover .services-bento-link {
  opacity: 1;
  transform: translateY(0);
}

.services-bento-item:hover .services-bento-link span {
  transform: translateX(4px);
}

/* Subtle inner border for depth */
.services-bento-item::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
  z-index: 3;
  pointer-events: none;
}

/* ============================================================
   PORTFOLIO
   ============================================================ */
.portfolio-section {
  padding: var(--space-2xl) 0;
}

.portfolio-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.portfolio-header h2 {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  margin-bottom: var(--space-sm);
}

.portfolio-header h2 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 280px);
  gap: 8px;
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.portfolio-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}

.portfolio-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(46,26,5,0.7) 0%, rgba(46,26,5,0.1) 60%, transparent 100%);
  display: flex;
  align-items: flex-end;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}

.portfolio-item-overlay span {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #ffffff;
  transform: translateY(10px);
  transition: transform 0.4s var(--ease-out);
}

.portfolio-item:hover img {
  transform: scale(1.06);
}

.portfolio-item:hover .portfolio-item-overlay {
  opacity: 1;
}

.portfolio-item:hover .portfolio-item-overlay span {
  transform: translateY(0);
}

/* Large featured items */
.portfolio-item--wide {
  grid-column: span 2;
}

/* ============================================================
   CLIENTS
   ============================================================ */
.clients-section {
  background: var(--bg-dark);
  padding: var(--space-2xl) 0;
  position: relative;
  overflow: hidden;
}

/* Subtle tangram triangle decoration */
.clients-section::before {
  content: '';
  position: absolute;
  top: -60px; right: 10%;
  width: 200px; height: 200px;
  background: rgba(255,255,255,0.03);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.clients-inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: center;
}

.clients-text h2 {
  font-size: clamp(2.5rem, 4.5vw, 4rem);
  color: var(--text-on-dark);
  margin-bottom: var(--space-md);
  line-height: 1.05;
}

.clients-text h2 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--color-warm);
}

.clients-text p {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--text-on-dark-muted);
  max-width: 420px;
}

.clients-logos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.client-logo {
  aspect-ratio: 3/2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-sm);
  transition: background 0.3s var(--ease-out);
}

.client-logo:hover {
  background: rgba(255,255,255,0.08);
}

.client-logo img {
  max-width: 80%;
  max-height: 60px;
  object-fit: contain;
  opacity: 0.7;
  transition: opacity 0.3s var(--ease-out);
  filter: brightness(1.2);
}

.client-logo:hover img {
  opacity: 1;
}

/* ============================================================
   CONTACT (HOME)
   ============================================================ */
.contact-home-section {
  position: relative;
  overflow: hidden;
}

.contact-home-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 640px;
}

.contact-home-image {
  position: relative;
  overflow: hidden;
}

.contact-home-image img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.contact-home-form-wrap {
  background: var(--bg-dark);
  padding: clamp(40px, 5vw, 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-home-form-wrap h2 {
  font-size: clamp(2rem, 3vw, 2.75rem);
  color: var(--text-on-dark);
  margin-bottom: var(--space-lg);
  line-height: 1.15;
}

.contact-home-form-wrap h2 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--color-warm);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 440px;
}

.form-group {
  position: relative;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  color: var(--text-on-dark);
  font-size: 0.9375rem;
  padding: 14px 0;
  transition: border-color 0.3s var(--ease-out);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-on-dark-muted);
  font-size: 0.875rem;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-warm);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

/* Focus line animation */
.form-group::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--color-warm);
  transition: width 0.4s var(--ease-out);
}

.form-group:focus-within::after {
  width: 100%;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  align-self: flex-start;
  padding: 16px 40px;
  background: transparent;
  color: var(--text-on-dark);
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.4s var(--ease-out);
  margin-top: var(--space-sm);
}

.btn-primary:hover {
  background: #ffffff;
  color: var(--color-dark);
  border-color: #ffffff;
}

.btn-primary svg {
  width: 16px; height: 16px;
  transition: transform 0.3s var(--ease-out);
  fill: currentColor;
}

.btn-primary:hover svg {
  transform: translateX(4px);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--bg-darker);
  padding: var(--space-xl) 0 var(--space-lg);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: var(--space-md);
}

.footer-brand img {
  height: 36px;
  width: auto;
  margin-bottom: var(--space-md);
  filter: brightness(1.5);
  opacity: 0.8;
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-on-dark-muted);
  max-width: 300px;
  line-height: 1.7;
}

.footer-nav h4 {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
  margin-bottom: var(--space-md);
}

.footer-nav a {
  display: block;
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.6);
  padding: 6px 0;
  transition: color 0.3s, transform 0.3s var(--ease-out);
}

.footer-nav a:hover {
  color: #ffffff;
  transform: translateX(4px);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.5px;
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */

/* --- About Hero (with background image) --- */
.about-hero {
  position: relative;
  margin-top: var(--header-height);
  padding: clamp(100px, 14vh, 180px) 0 clamp(80px, 12vh, 160px);
  text-align: center;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.about-hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.about-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(46,26,5,0.55) 0%,
    rgba(46,26,5,0.65) 100%
  );
}

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

.about-hero h1 {
  font-size: clamp(2.8rem, 5.5vw, 5rem);
  color: #ffffff;
  margin-bottom: var(--space-md);
}

.about-hero h1 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  text-transform: none;
}

.about-hero-subtitle {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.0625rem;
  line-height: 1.85;
  color: rgba(255,255,255,0.8);
}

/* --- Story Split Section --- */
.about-story-section {
  padding: var(--space-2xl) 0;
  overflow: hidden;
}

.about-story-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: center;
}

.about-story-image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
}

.about-story-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out);
}

.about-story-image:hover img {
  transform: scale(1.04);
}

.about-story-image::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 1px rgba(46,26,5,0.08);
  pointer-events: none;
}

.about-story-text h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: var(--space-md);
  line-height: 1.1;
}

.about-story-text h2 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--color-primary);
}

.about-story-text p {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--text-body);
  max-width: 480px;
  margin-bottom: var(--space-sm);
}

.about-story-text p:last-child {
  margin-bottom: 0;
}

/* --- Brand Statement --- */
.about-statement-section {
  padding: var(--space-2xl) 0;
  background: var(--color-secondary);
  position: relative;
  overflow: hidden;
}

.about-statement-section::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -60px;
  width: 400px; height: 400px;
  background: rgba(255,255,255,0.05);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  pointer-events: none;
}

.about-statement-section::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -40px;
  width: 250px; height: 250px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
  pointer-events: none;
}

.about-statement {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.about-statement p {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 400;
  line-height: 1.5;
  color: #ffffff;
  font-style: italic;
}

.about-statement p em {
  font-style: normal;
  color: var(--color-warm);
  font-weight: 600;
}

/* --- Stats --- */
.about-stats-section {
  padding: var(--space-xl) 0;
  background: var(--bg-cream);
}

.about-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.about-stat {
  text-align: center;
  padding: var(--space-lg) var(--space-md);
  position: relative;
}

.about-stat::after {
  content: '';
  position: absolute;
  right: 0;
  top: 25%;
  height: 50%;
  width: 1px;
  background: rgba(46,26,5,0.1);
}

.about-stat:last-child::after {
  display: none;
}

.about-stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4vw, 4rem);
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 12px;
}

.about-stat-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* --- Approach Section (Timeline) --- */
.approach-section {
  padding: var(--space-2xl) 0;
}

.approach-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.approach-header h2 {
  font-size: clamp(2rem, 3.5vw, 3rem);
  margin-bottom: var(--space-md);
}

.approach-header h2 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--color-primary);
}

.approach-header p {
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.85;
  color: var(--text-body);
}

.approach-timeline {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}

.approach-timeline-line {
  position: absolute;
  left: 32px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--bg-warm) 8%,
    var(--bg-warm) 92%,
    transparent 100%
  );
}

.approach-step {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  padding-bottom: 48px;
  position: relative;
}

.approach-step:last-child {
  padding-bottom: 0;
}

.approach-step-marker {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--surface-card);
  border: 2px solid var(--bg-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: border-color 0.4s var(--ease-out), background 0.4s var(--ease-out);
}

.approach-step:hover .approach-step-marker {
  border-color: var(--color-primary);
  background: var(--color-primary);
}

.approach-step-marker span {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: 1px;
  transition: color 0.4s var(--ease-out);
}

.approach-step:hover .approach-step-marker span {
  color: #ffffff;
}

.approach-step-content {
  padding-top: 12px;
  flex: 1;
}

.approach-step-content h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
  color: var(--text-heading);
}

.approach-step-content p {
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--text-body);
}

/* --- About Services Snapshot --- */
.about-services-section {
  background: var(--bg-dark);
  padding: var(--space-2xl) 0;
  position: relative;
  overflow: hidden;
}

.about-services-section::before {
  content: '';
  position: absolute;
  top: -150px; right: -80px;
  width: 500px; height: 500px;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
  pointer-events: none;
}

.about-services-header {
  margin-bottom: var(--space-xl);
}

.about-services-header h2 {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  color: #ffffff;
  line-height: 1.1;
}

.about-services-header h2 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--color-warm);
}

.about-services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  position: relative;
  z-index: 1;
}

.about-service-item {
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  transition: transform 0.5s var(--ease-out);
}

.about-service-item:hover {
  transform: translateY(-6px);
}

.about-service-image {
  aspect-ratio: 3/4;
  overflow: hidden;
}

.about-service-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}

.about-service-item:hover .about-service-image img {
  transform: scale(1.08);
}

.about-service-info {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  padding: 24px;
  background: linear-gradient(to top, rgba(46,26,5,0.8) 0%, transparent 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.about-service-info h3 {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #ffffff;
}

.about-service-arrow {
  font-size: 1.25rem;
  color: #ffffff;
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.3s var(--ease-out);
}

.about-service-item:hover .about-service-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* --- About CTA --- */
.about-cta-section {
  padding: var(--space-2xl) 0;
}

.about-cta-inner {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.about-cta-inner h2 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  margin-bottom: var(--space-md);
  line-height: 1.05;
}

.about-cta-inner h2 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--color-primary);
}

.about-cta-inner p {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--text-body);
  margin-bottom: var(--space-lg);
}

.about-cta-inner .btn-primary {
  color: var(--text-heading);
  border-color: var(--color-dark);
}

.about-cta-inner .btn-primary:hover {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  border-color: var(--bg-dark);
}

.about-cta-inner .btn-primary svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-page-section {
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
  position: relative;
  display: flex;
  align-items: center;
}

.contact-page-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.contact-page-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.contact-page-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(46,26,5,0.25);
}

.contact-page-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 45fr 55fr;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  margin: var(--space-lg) 0;
}

.contact-info-panel {
  background: var(--bg-dark);
  padding: clamp(32px, 4vw, 60px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-info-panel h2 {
  font-size: clamp(1.75rem, 2.5vw, 2.5rem);
  color: var(--text-on-dark);
  margin-bottom: var(--space-lg);
  line-height: 1.2;
}

.contact-info-panel h2 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--color-warm);
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.contact-info-icon {
  width: 20px; height: 20px;
  flex-shrink: 0;
  margin-top: 3px;
  opacity: 0.5;
}

.contact-info-icon svg {
  width: 100%; height: 100%;
  fill: #ffffff;
}

.contact-info-item p,
.contact-info-item a {
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.6;
}

.contact-info-item a:hover {
  color: #ffffff;
}

.contact-form-panel {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  padding: clamp(32px, 4vw, 60px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-form-page {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact-form-page .form-group input,
.contact-form-page .form-group textarea {
  color: var(--text-heading);
  border-bottom-color: rgba(46,26,5,0.15);
}

.contact-form-page .form-group input::placeholder,
.contact-form-page .form-group textarea::placeholder {
  color: var(--text-muted);
}

.contact-form-page .form-group input:focus,
.contact-form-page .form-group textarea:focus {
  border-bottom-color: var(--color-primary);
}

.contact-form-page .form-group::after {
  background: var(--color-primary);
}

.btn-dark {
  width: 100%;
  padding: 18px 40px;
  background: var(--bg-dark);
  color: var(--text-on-dark);
  border: none;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  margin-top: var(--space-sm);
}

.btn-dark:hover {
  background: var(--color-dark-deep);
  transform: translateY(-2px);
}

/* ============================================================
   PORTFOLIO PAGE – Hero & Tab Bar
   ============================================================ */
.pf-hero {
  margin-top: var(--header-height);
  padding: var(--space-2xl) 0 var(--space-lg);
  text-align: center;
}

.pf-hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  margin-bottom: var(--space-xs);
}

.pf-hero h1 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--color-primary);
}

.pf-hero-sub {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto;
}

/* Portfolio hero with background image */
.pf-hero--image {
  position: relative;
  overflow: hidden;
  padding: clamp(110px, 16vh, 200px) 0 clamp(70px, 11vh, 150px);
}

.pf-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.pf-hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.pf-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(46,26,5,0.5) 0%,
    rgba(46,26,5,0.72) 100%
  );
}

.pf-hero--image .container {
  position: relative;
  z-index: 1;
}

.pf-hero--image .section-label {
  color: var(--color-warm);
}

.pf-hero--image h1 {
  color: #ffffff;
}

.pf-hero--image .pf-hero-sub {
  color: rgba(255,255,255,0.82);
}

/* Sticky Tab Bar */
.pf-tab-bar {
  position: sticky;
  top: var(--header-height);
  z-index: 90;
  background: rgba(254, 251, 246, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(46, 26, 5, 0.08);
  padding: var(--space-sm) 0;
}

.pf-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.pf-tab {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  padding: 10px 28px;
  border: 1.5px solid var(--color-secondary);
  border-radius: 100px;
  background: transparent;
  color: var(--text-body);
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
}

.pf-tab:hover {
  background: var(--bg-cream);
  color: var(--text-heading);
}

.pf-tab.active {
  background: var(--color-dark);
  color: var(--text-on-dark);
  border-color: var(--color-dark);
}

/* Panels (show/hide) */
.pf-panel {
  padding: var(--space-xl) 0 var(--space-2xl);
  animation: pfFadeIn 0.5s var(--ease-out);
}

.pf-panel[hidden] {
  display: none;
}

@keyframes pfFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Shared tag pill */
.pf-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 14px;
  border: 1px solid rgba(46, 26, 5, 0.15);
  border-radius: 100px;
  color: var(--text-muted);
}

/* ============================================================
   PORTFOLIO – 1. Identity / GSAP Horizontal Scroll
   ============================================================ */
#panel-identity {
  padding: 0;
}

/* ===========================================
   IDENTITY – Cinematic Horizontal Scroll
   =========================================== */
.pf-id-wrapper {
  position: relative;
  overflow: hidden;
  height: calc(100vh - var(--header-height) - var(--tab-bar-height, 54px));
  height: calc(100dvh - var(--header-height) - var(--tab-bar-height, 54px));
  background: var(--bg-darker);
  will-change: transform;
}

/* Prevent flash when GSAP pins/unpins */
.pf-id-wrapper + .pin-spacer,
.pin-spacer:has(> .pf-id-wrapper) {
  background: var(--bg-darker) !important;
}

#panel-identity {
  background: var(--bg-darker);
}

.pf-id-track {
  display: flex;
  height: 100%;
  width: max-content;
  will-change: transform;
}

/* --- Slide --- */
.pf-id-slide {
  position: relative;
  width: 100vw;
  height: 100%;
  flex-shrink: 0;
  overflow: hidden;
}

.pf-id-slide-link {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

/* --- Image half --- */
.pf-id-slide-img {
  position: relative;
  overflow: hidden;
}

.pf-id-slide-img img {
  position: absolute;
  inset: -10%;
  width: 120%;
  height: 120%;
  object-fit: cover;
  will-change: transform;
}

/* --- Content half --- */
.pf-id-slide-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-darker);
  padding: clamp(32px, 5vw, 80px);
}

.pf-id-slide-content::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(212,149,106,0.3), transparent);
}

.pf-id-slide-inner {
  max-width: 440px;
}

.pf-id-slide-num {
  font-family: var(--font-serif);
  font-size: clamp(4rem, 8vw, 7rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(212,149,106,0.3);
  margin-bottom: 16px;
  display: block;
}

.pf-id-slide-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 3rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.pf-id-slide-desc {
  font-family: var(--font-body);
  font-size: clamp(0.85rem, 1.1vw, 0.95rem);
  color: rgba(255,255,255,0.55);
  line-height: 1.8;
  margin-bottom: 28px;
}

.pf-id-slide-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.pf-id-slide-tags .pf-tag {
  border-color: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.04);
  font-size: 0.7rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.pf-id-slide-cta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-warm);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(212,149,106,0.3);
  transition: gap 0.4s var(--ease-out), border-color 0.4s;
}

.pf-id-slide-link:hover .pf-id-slide-cta {
  gap: 16px;
  border-color: var(--color-warm);
}

.pf-id-slide-link:hover .pf-id-slide-img img {
  filter: brightness(1.08);
}

/* --- Vertical progress rail --- */
.pf-id-rail {
  position: absolute;
  right: clamp(20px, 3vw, 48px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.pf-id-rail-track {
  width: 2px;
  height: 80px;
  background: rgba(255,255,255,0.1);
  border-radius: 1px;
  overflow: hidden;
}

.pf-id-rail-fill {
  width: 100%;
  height: 0%;
  background: var(--color-warm);
  border-radius: 1px;
  will-change: height;
  transition: height 0.1s linear;
}

.pf-id-rail-counter {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.pf-id-current {
  font-size: 1.1rem;
  color: #fff;
  font-weight: 700;
}

.pf-id-sep {
  font-size: 0.5rem;
  opacity: 0.4;
}

/* --- Scroll hint --- */
.pf-id-scroll-hint {
  position: absolute;
  bottom: clamp(16px, 3vw, 32px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.35);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  animation: pfIdBounce 2s ease-in-out infinite;
  transition: opacity 0.5s;
}

.pf-id-scroll-hint.hidden {
  opacity: 0;
  pointer-events: none;
}

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

.pf-case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pf-case-palette {
  display: flex;
  gap: 0;
  margin-top: 16px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  height: 8px;
}

.pf-case-palette span {
  flex: 1;
}

/* ============================================================
   PORTFOLIO – 2. Graphic Design / Masonry
   ============================================================ */
/* ===========================================
   GRAPHIC – Card Grid
   =========================================== */
.pf-gfx-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 2.5vw, 32px);
}

.pf-gfx-card {
  display: flex;
  flex-direction: column;
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.pf-gfx-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-6px);
}

/* Featured card spans full width */
.pf-gfx-card--featured {
  grid-column: 1 / -1;
  flex-direction: row;
}

/* --- Image --- */
.pf-gfx-card-img {
  overflow: hidden;
  flex-shrink: 0;
}

.pf-gfx-card:not(.pf-gfx-card--featured) .pf-gfx-card-img {
  aspect-ratio: 4/3;
}

.pf-gfx-card--featured .pf-gfx-card-img {
  width: 55%;
  min-height: 340px;
}

.pf-gfx-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s var(--ease-out);
}

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

/* --- Body --- */
.pf-gfx-card-body {
  padding: clamp(20px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}

.pf-gfx-card-num {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-style: italic;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--color-warm);
  margin-bottom: 12px;
  display: block;
}

.pf-gfx-card-title {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.2;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.pf-gfx-card--featured .pf-gfx-card-title {
  font-size: clamp(1.35rem, 2.4vw, 2rem);
}

.pf-gfx-card-desc {
  font-family: var(--font-body);
  font-size: clamp(0.8rem, 1vw, 0.9rem);
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.pf-gfx-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

/* ============================================================
   PORTFOLIO – 3. Print / Editorial Stacked
   ============================================================ */
#panel-publication {
  padding-top: var(--space-lg);
  padding-bottom: var(--space-2xl);
}

.pf-print-quote {
  text-align: center;
  max-width: 680px;
  margin: 0 auto var(--space-2xl);
  padding: 0;
  border: none;
}

.pf-print-quote p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  color: var(--text-heading);
  line-height: 1.5;
}

/* -- Shared spread styles -- */
.pf-print-spread {
  display: block;
  text-decoration: none;
  color: inherit;
  margin-bottom: var(--space-2xl);
}

.pf-print-num {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--color-primary);
  display: block;
  margin-bottom: 12px;
  opacity: 0.7;
}

.pf-print-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 3rem);
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.08;
  margin-bottom: 16px;
}

.pf-print-desc {
  font-size: clamp(0.875rem, 1.1vw, 1rem);
  color: var(--text-body);
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 440px;
}

.pf-print-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.pf-print-cta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap 0.3s var(--ease-out), color 0.3s;
}

.pf-print-spread:hover .pf-print-cta {
  gap: 14px;
  color: var(--color-accent);
}

/* -- Image with clip-path reveal -- */
.pf-print-img {
  overflow: hidden;
  border-radius: var(--radius-md);
}

.pf-print-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}

.pf-print-spread:hover .pf-print-img img {
  transform: scale(1.03);
}

/* Image reveal animation */
.pf-print-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.pf-print-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* -- Hero spread (full-width, dark overlay) -- */
.pf-print-spread--hero {
  position: relative;
  height: clamp(480px, 65vh, 720px);
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin: 0 clamp(20px, 4vw, 48px) var(--space-2xl);
}

.pf-print-spread--hero .pf-print-img {
  position: absolute;
  inset: 0;
  border-radius: 0;
}

.pf-print-spread--hero .pf-print-img img {
  min-height: 100%;
}

.pf-print-hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(
    to top,
    rgba(46,26,5,0.85) 0%,
    rgba(46,26,5,0.4) 45%,
    rgba(46,26,5,0.05) 100%
  );
}

.pf-print-hero-content > .container {
  padding-bottom: clamp(36px, 5vh, 64px);
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pf-print-spread--hero .pf-print-num {
  color: var(--color-warm);
  margin-bottom: 8px;
}

.pf-print-spread--hero .pf-print-title {
  color: #fff;
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  margin-bottom: 12px;
}

.pf-print-spread--hero .pf-print-desc {
  color: rgba(255,255,255,0.65);
  margin-bottom: 16px;
  max-width: 480px;
}

.pf-print-spread--hero .pf-print-meta {
  margin-bottom: 16px;
}

.pf-print-spread--hero .pf-print-meta .pf-tag {
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.06);
}

.pf-print-spread--hero .pf-print-cta {
  color: var(--color-warm);
}

.pf-print-spread--hero:hover .pf-print-cta {
  color: #fff;
}

/* -- Split spread (image + text side by side) -- */
.pf-print-spread--split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}

.pf-print-spread--split .pf-print-img {
  aspect-ratio: 4/3;
}

.pf-print-split-text {
  padding: var(--space-lg) 0;
}

/* Reversed layout */
.pf-print-spread--reverse {
  direction: rtl;
}

.pf-print-spread--reverse > * {
  direction: ltr;
}

/* Reversed reveal from right */
.pf-print-spread--reverse .pf-print-reveal {
  transform: translateX(40px);
}

.pf-print-spread--reverse .pf-print-reveal.revealed {
  transform: translateX(0);
}

/* ============================================================
   PORTFOLIO – 4. Digital / Device Mockups
   ============================================================ */
.pf-digital-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-lg);
  position: relative;
}

.pf-dot-grid {
  position: absolute;
  inset: -40px;
  z-index: -1;
  background-image: radial-gradient(circle, rgba(46,26,5,0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.pf-device {
  position: relative;
}

.pf-device--laptop {
  grid-row: span 2;
}

/* Laptop bezel */
.pf-device--laptop .pf-device-bezel {
  background: #1a1a1a;
  border-radius: 12px 12px 0 0;
  padding: 20px 14px 10px;
  position: relative;
}

.pf-device-cam {
  display: block;
  width: 6px;
  height: 6px;
  background: #333;
  border-radius: 50%;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
}

.pf-device-chin {
  height: 16px;
  background: #2a2a2a;
  border-radius: 0 0 12px 12px;
}

.pf-device-screen {
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-cream);
}

.pf-device-screen img {
  width: 100%;
  display: block;
}

/* Phone bezel */
.pf-device--phone .pf-device-bezel {
  background: #1a1a1a;
  border-radius: 28px;
  padding: 40px 10px 28px;
  max-width: 260px;
  margin: 0 auto;
  position: relative;
}

.pf-device-notch {
  display: block;
  width: 80px;
  height: 22px;
  background: #1a1a1a;
  border-radius: 0 0 14px 14px;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.pf-device--phone .pf-device-screen {
  border-radius: 18px;
  aspect-ratio: 9/19;
}

.pf-device--phone .pf-device-screen img {
  height: 100%;
  object-fit: cover;
}

/* Tablet bezel */
.pf-device--tablet .pf-device-bezel {
  background: #1a1a1a;
  border-radius: 16px;
  padding: 16px;
}

.pf-device--tablet .pf-device-screen {
  border-radius: 6px;
  aspect-ratio: 4/3;
}

.pf-device--tablet .pf-device-screen img {
  height: 100%;
  object-fit: cover;
}

/* Glassmorphism info cards */
.pf-digital-card {
  margin-top: var(--space-sm);
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(46, 26, 5, 0.08);
  border-radius: var(--radius-md);
}

.pf-digital-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 6px;
}

.pf-digital-card p {
  color: var(--text-body);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: var(--space-sm);
}

.pf-digital-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pf-tag--tech {
  background: var(--bg-cream);
  border-color: var(--color-secondary);
  color: var(--color-dark);
  font-size: 0.625rem;
}

/* ============================================================
   PORTFOLIO – 5. Photography / Gallery
   ============================================================ */

/* Featured hero photograph */
.pf-photo-hero {
  display: block;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-xl);
  aspect-ratio: 21/9;
  text-decoration: none;
  color: inherit;
}

.pf-photo-hero-img {
  position: absolute;
  inset: 0;
}

.pf-photo-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease-out);
}

.pf-photo-hero:hover .pf-photo-hero-img img {
  transform: scale(1.04);
}

.pf-photo-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(30, 16, 4, 0.88) 0%,
    rgba(30, 16, 4, 0.3) 50%,
    rgba(30, 16, 4, 0.05) 100%
  );
  z-index: 1;
}

.pf-photo-hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: clamp(28px, 4vw, 56px);
  z-index: 2;
}

.pf-photo-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-warm);
  display: block;
  margin-bottom: 12px;
}

.pf-photo-hero-content h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin-bottom: 12px;
}

.pf-photo-hero-content p {
  font-size: clamp(0.85rem, 1.1vw, 1rem);
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.7;
  max-width: 520px;
  margin-bottom: 16px;
}

.pf-photo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.pf-photo-meta .pf-tag {
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.06);
}

.pf-photo-cta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-warm);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap 0.3s var(--ease-out), color 0.3s;
}

.pf-photo-hero:hover .pf-photo-cta {
  gap: 14px;
  color: #fff;
}

.pf-photo-cta span {
  transition: transform 0.3s var(--ease-out);
}

.pf-photo-hero:hover .pf-photo-cta span {
  transform: translateX(4px);
}

/* Gallery masonry grid */
.pf-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 240px;
  gap: clamp(10px, 1.5vw, 16px);
}

.pf-photo-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: block;
  text-decoration: none;
  color: inherit;
}

.pf-photo-item--tall {
  grid-row: span 2;
}

.pf-photo-item--wide {
  grid-column: span 2;
}

.pf-photo-item-img {
  position: absolute;
  inset: 0;
}

.pf-photo-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}

.pf-photo-item:hover .pf-photo-item-img img {
  transform: scale(1.06);
}

.pf-photo-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(30, 16, 4, 0.75) 0%,
    rgba(30, 16, 4, 0.05) 50%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
  z-index: 1;
}

.pf-photo-item:hover .pf-photo-item-overlay {
  opacity: 1;
}

.pf-photo-item-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  z-index: 2;
  transform: translateY(8px);
  opacity: 0;
  transition: transform 0.4s var(--ease-out), opacity 0.4s var(--ease-out);
}

.pf-photo-item:hover .pf-photo-item-info {
  transform: translateY(0);
  opacity: 1;
}

.pf-photo-item-info h3 {
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}

.pf-photo-type {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-warm);
}

/* Subtle inner border for depth */
.pf-photo-item::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  z-index: 3;
  pointer-events: none;
}

/* ============================================================
   PROJECT LINK UTILITY (portfolio items)
   ============================================================ */
.proj-link {
  display: contents;
  color: inherit;
  text-decoration: none;
}



/* ============================================================
   PROJECT DETAIL PAGE (project.html)
   ============================================================ */

/* Back Link Bar */
.proj-back-bar {
  margin-top: var(--header-height);
  padding: var(--space-md) 0;
}

.proj-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--duration-fast) var(--ease-out);
}

.proj-back-link:hover {
  color: var(--color-primary);
}

.proj-back-link svg {
  width: 18px;
  height: 18px;
  transition: transform var(--duration-fast) var(--ease-out);
}

.proj-back-link:hover svg {
  transform: translateX(-4px);
}

/* Hero */
.proj-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 21/9;
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-xl);
}

.proj-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.proj-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(46, 26, 5, 0.75) 0%,
    rgba(46, 26, 5, 0.2) 50%,
    transparent 100%
  );
  display: flex;
  align-items: flex-end;
  padding: clamp(24px, 4vw, 56px);
}

.proj-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 4rem);
  font-weight: 700;
  text-transform: uppercase;
  color: #ffffff;
  letter-spacing: -0.01em;
  line-height: 1;
}

/* Info Strip */
.proj-info-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  padding: var(--space-lg) 0;
  border-top: 1px solid rgba(46, 26, 5, 0.1);
  border-bottom: 1px solid rgba(46, 26, 5, 0.1);
  margin-bottom: var(--space-xl);
}

.proj-info-item {
  text-align: center;
}

.proj-info-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 6px;
}

.proj-info-value {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-heading);
}

/* Description */
.proj-description {
  max-width: 720px;
  margin: 0 auto var(--space-xl);
  text-align: center;
}

.proj-description p {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-body);
  margin-bottom: var(--space-md);
}

.proj-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

/* Color Palette (identity projects only) */
.proj-palette {
  max-width: 480px;
  margin: 0 auto var(--space-xl);
}

.proj-palette-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: var(--space-sm);
}

.proj-palette-swatches {
  display: flex;
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 56px;
  box-shadow: var(--shadow-sm);
}

.proj-palette-swatches span {
  flex: 1;
  position: relative;
}

.proj-palette-swatches span::after {
  content: attr(data-hex);
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.7);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  white-space: nowrap;
}

/* Image Gallery */
.proj-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.proj-gallery-img {
  border-radius: var(--radius-md);
  overflow: hidden;
}

.proj-gallery-img--full {
  grid-column: 1 / -1;
}

.proj-gallery-img img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}

.proj-gallery-img--full img {
  aspect-ratio: 21/9;
}

.proj-gallery-img:hover img {
  transform: scale(1.03);
}

/* Prev / Next Nav */
.proj-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg) 0;
  border-top: 1px solid rgba(46, 26, 5, 0.1);
  margin-bottom: var(--space-2xl);
}

.proj-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  transition: color var(--duration-fast) var(--ease-out);
}

.proj-nav-link:hover {
  color: var(--color-primary);
}

.proj-nav-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform var(--duration-fast) var(--ease-out);
}

.proj-nav-link--prev:hover svg {
  transform: translateX(-4px);
}

.proj-nav-link--next:hover svg {
  transform: translateX(4px);
}

.proj-nav-dir {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.proj-nav-title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-top: 2px;
}

.proj-nav-link--next {
  text-align: right;
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-subtitle, .hero-title { opacity: 1; transform: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1199px) {
  .services-bento {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 280px 260px 260px;
  }

  .services-bento-item--hero {
    grid-row: auto;
  }

  .services-bento-item--wide {
    grid-column: auto;
  }

  .portfolio-grid {
    grid-template-rows: repeat(2, 240px);
  }

  /* Portfolio – digital grid 2-col, laptop full width */
  .pf-digital-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pf-device--laptop {
    grid-column: span 2;
    grid-row: auto;
  }

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

@media (max-width: 991px) {
  .philosophy-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(4, 220px);
  }

  .portfolio-item--wide {
    grid-column: span 1;
  }

  .clients-inner {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }

  .clients-text p {
    margin: 0 auto;
  }

  .contact-home-inner {
    grid-template-columns: 1fr;
  }

  .contact-home-image {
    min-height: 300px;
  }

  .contact-page-inner {
    grid-template-columns: 1fr;
  }

  .about-story-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

  .about-stat:nth-child(2)::after {
    display: none;
  }

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

  /* Portfolio – identity horizontal scroll mobile */
  .pf-id-wrapper {
    height: calc(100vh - 64px - var(--tab-bar-height, 54px));
    height: calc(100dvh - 64px - var(--tab-bar-height, 54px));
  }

  .pf-id-slide-link {
    grid-template-columns: 1fr;
    grid-template-rows: 45% 1fr;
  }

  .pf-id-slide-content {
    padding: 24px;
  }

  .pf-id-slide-content::before {
    display: none;
  }

  .pf-id-slide-num {
    font-size: 3rem;
    margin-bottom: 8px;
  }

  .pf-id-slide-title {
    font-size: 1.5rem;
  }

  .pf-id-slide-desc {
    font-size: 0.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 16px;
  }

  .pf-id-slide-tags {
    margin-bottom: 20px;
  }

  .pf-id-rail {
    right: 12px;
  }

  .pf-id-scroll-hint {
    display: none;
  }

  .pf-gfx-card--featured {
    flex-direction: column;
  }

  .pf-gfx-card--featured .pf-gfx-card-img {
    width: 100%;
    min-height: 240px;
  }

  /* Project detail – info strip 2-col */
  .proj-info-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    flex-direction: column;
    gap: 32px;
  }
}

/* ===========================================
   PORTFOLIO MEGAMENU (desktop)
   =========================================== */
.nav-has-mega {
  position: static;
}

.mega-toggle {
  display: none;
}

.mega-panel {
  position: absolute;
  top: calc(var(--header-height) - 1px);
  left: 0; right: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
  background: var(--bg-darker);
  border-radius: 0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  padding: 0;
  z-index: 101;
}

.mega-panel::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 0; right: 0;
  height: 20px;
}

.nav-has-mega:hover > .mega-panel,
.nav-has-mega:focus-within > .mega-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.mega-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  max-width: var(--max-width);
  margin: 0 auto;
}

.mega-card {
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 32px 28px;
  transition: background 0.35s var(--ease-out);
  border-right: 1px solid rgba(255,255,255,0.06);
}

.mega-card:last-child {
  border-right: none;
}

.mega-card:hover {
  background: rgba(255,255,255,0.05);
}

/* Remove underline pseudo from mega-card links */
.mega-card::after {
  display: none !important;
}

.mega-card-img {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 8px;
  position: relative;
}

.mega-card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  pointer-events: none;
}

.mega-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out), filter 0.5s var(--ease-out);
  filter: brightness(0.85) saturate(0.9);
}

.mega-card:hover .mega-card-img img {
  transform: scale(1.06);
  filter: brightness(1) saturate(1);
}

.mega-card h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  margin: 16px 0 4px;
  color: #fff;
  text-transform: none;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mega-card h4::after {
  content: '\2192';
  font-size: 0.85rem;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  color: var(--color-warm);
}

.mega-card:hover h4::after {
  opacity: 1;
  transform: translateX(0);
}

.mega-card p {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  margin: 0;
  line-height: 1.5;
  letter-spacing: 0.2px;
}

.mega-view-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-warm);
  text-decoration: none;
  transition: color 0.3s, letter-spacing 0.3s var(--ease-out);
}

.mega-view-all::after {
  display: none !important;
}

.mega-view-all:hover {
  color: #fff;
  letter-spacing: 3px;
}

@media (max-width: 767px) {
  :root {
    --header-height: 64px;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    top: 0; right: -100%;
    width: 300px; height: 100vh;
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    transition: right 0.4s var(--ease-out);
    z-index: 99;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-top: 80px;
  }

  .main-nav.open {
    right: 0;
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
    text-align: center;
    width: 100%;
  }

  .nav-list > li > a {
    display: block;
    color: var(--text-on-dark);
    padding: 18px 48px;
    font-size: 1rem;
    letter-spacing: 3px;
    border-radius: 0;
    background: none;
  }

  .nav-list > li > a::after {
    background: var(--color-warm);
    bottom: 12px;
    left: 48px; right: 48px;
  }

  .nav-list > li > a:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-on-dark);
  }

  .nav-list > li > a.active {
    color: var(--color-warm);
  }

  /* --- Megamenu mobile overrides --- */
  .nav-has-mega {
    position: static;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
  }

  .nav-has-mega > a {
    flex: 0 0 auto;
  }

  .mega-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-on-dark);
    padding: 8px;
    margin-left: -8px;
    cursor: pointer;
    transition: transform 0.3s;
  }

  .mega-toggle[aria-expanded="true"] {
    transform: rotate(180deg);
  }

  .mega-panel {
    position: static;
    width: 100%;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: rgba(255,255,255,0.04);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease-out);
    pointer-events: auto;
  }

  .mega-panel::before {
    display: none;
  }

  .nav-has-mega:hover > .mega-panel,
  .nav-has-mega:focus-within > .mega-panel {
    opacity: 1;
    visibility: visible;
    transform: none;
    max-height: 0;
    pointer-events: auto;
  }

  .mega-panel.open {
    max-height: 500px;
  }

  .mega-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: none;
    margin: 0;
    padding: 4px 0;
  }

  .mega-card {
    padding: 12px 48px;
    border-right: none;
    border-radius: 0;
    background: none;
    flex-direction: row;
    align-items: center;
    gap: 14px;
  }

  .mega-card-img {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    aspect-ratio: 1;
    border-radius: 8px;
  }

  .mega-card-img::after {
    display: none;
  }

  .mega-card-img img {
    filter: none;
  }

  .mega-card h4 {
    color: var(--text-on-dark);
    font-size: 0.85rem;
    margin: 0;
  }

  .mega-card h4::after {
    display: none;
  }

  .mega-card p {
    color: var(--text-on-dark-muted);
    font-size: 0.7rem;
    display: none;
  }

  .mega-view-all {
    color: var(--color-warm);
    border-top-color: rgba(250, 245, 238, 0.1);
    padding: 12px 48px;
    margin-top: 0;
    justify-content: flex-start;
    font-size: 0.7rem;
  }

  .mega-view-all:hover {
    color: var(--text-on-dark);
    letter-spacing: 2px;
  }

  .nav-cta {
    margin-top: 16px;
    padding: 0 48px;
    width: 100%;
  }

  .nav-cta > a {
    display: block !important;
    text-align: center !important;
    border-radius: 8px !important;
    padding: 14px 24px !important;
  }

  .hero {
    min-height: 85vh;
  }

  .services-bento {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(5, 240px);
  }

  .services-bento-item--hero {
    grid-row: auto;
  }

  .services-bento-item--wide {
    grid-column: auto;
  }

  /* Show description always on mobile */
  .services-bento-content p {
    max-height: 80px;
    opacity: 1;
    margin-top: 8px;
  }

  .services-bento-link {
    opacity: 1;
    transform: translateY(0);
  }

  .portfolio-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(4, 180px);
  }

  .clients-logos {
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
  }

  /* Portfolio – tabs shrink, masonry overlays visible, spreads stack, tilt off */
  .pf-tab {
    padding: 8px 18px;
    font-size: 0.75rem;
    letter-spacing: 1px;
  }

  .pf-gfx-grid {
    grid-template-columns: 1fr;
  }

  .pf-print-spread--split {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .pf-print-spread--reverse {
    direction: ltr;
  }

  .pf-print-spread--hero {
    height: clamp(360px, 55vh, 500px);
    margin: 0 16px var(--space-xl);
  }

  .pf-print-spread--hero .pf-print-title {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
  }

  .pf-print-split-text {
    padding: 0 0 var(--space-sm);
  }

  .pf-print-spread--reverse .pf-print-reveal {
    transform: translateY(40px);
  }

  .pf-digital-grid {
    grid-template-columns: 1fr;
  }

  .pf-device--laptop {
    grid-column: auto;
    grid-row: auto;
  }

  .pf-photo-hero {
    aspect-ratio: 16/9;
  }

  .pf-photo-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 200px;
  }

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

  .pf-photo-item-overlay {
    opacity: 1;
  }

  .pf-photo-item-info {
    opacity: 1;
    transform: translateY(0);
  }

  /* Project detail – hero 16:9, gallery single col, prev/next stack */
  .proj-hero {
    aspect-ratio: 16/9;
  }

  .proj-gallery {
    grid-template-columns: 1fr;
  }

  .proj-gallery-img img,
  .proj-gallery-img--full img {
    aspect-ratio: 4/3;
  }

  .proj-nav {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }

  .proj-nav-link--next {
    text-align: center;
  }


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

  .about-stat::after {
    display: none;
  }

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

  .about-service-image {
    aspect-ratio: 4/3;
  }

  /* Hide custom cursor on touch devices */
  .cursor-dot, .cursor-ring { display: none; }
}

@media (max-width: 575px) {
  /* Portfolio – tabs stack, masonry single col */
  .pf-tabs {
    flex-direction: column;
    align-items: stretch;
  }

  .pf-tab {
    text-align: center;
  }


  /* Project detail – info strip single col */
  .proj-info-strip {
    grid-template-columns: 1fr;
  }

  .proj-hero {
    aspect-ratio: 4/3;
  }

  .hero {
    min-height: 75vh;
  }

  .hero-scroll-hint { display: none; }

  .portfolio-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .portfolio-item {
    aspect-ratio: 16/10;
  }

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

  .about-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }

  .about-stat {
    padding: var(--space-md);
  }

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

  .about-service-image {
    aspect-ratio: 16/9;
  }

  .approach-timeline-line {
    left: 24px;
  }

  .approach-step-marker {
    width: 48px;
    height: 48px;
  }

  .approach-step {
    gap: 20px;
  }

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