/* ============================================
   StamKode — Portfolio
   Palette: deep black + brushed gold
   ============================================ */

:root {
  --bg: #07070a;
  --bg-soft: #0d0d12;
  --surface: #111118;
  --surface-2: #16161f;
  --line: rgba(212, 175, 55, 0.18);
  --line-soft: rgba(255, 255, 255, 0.06);
  --text: #f4f1e8;
  --text-dim: #a8a6a0;
  --text-mute: #6b6a66;
  --gold: #d4af37;
  --gold-bright: #f5d97a;
  --gold-deep: #a8841b;
  --gold-gradient: linear-gradient(135deg, #f5d97a 0%, #d4af37 45%, #a8841b 100%);
  --shadow-gold: 0 8px 32px rgba(212, 175, 55, 0.18);
  --radius: 18px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 150px; }
@media (max-width: 640px) {
  html { scroll-padding-top: 110px; }
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.55;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ---------- Background atmospherics ---------- */
.bg-grid {
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(212, 175, 55, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 175, 55, 0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}
.bg-glow {
  /* Now provided by bg-hero.png in the hero section — kept as a faint top accent only */
  position: fixed;
  top: -30%; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 900px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.06) 0%, transparent 60%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

main, .nav, .footer { position: relative; z-index: 1; }

/* ---------- Crossfading section backgrounds ---------- */
.bg-stage {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.bg-stage .bg-frame {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.1s ease;
  will-change: opacity;
}
.bg-stage .bg-frame.is-active { opacity: 1; }
.bg-stage .bg-frame[data-bg="hero"]    { background-image: url('bg-hero.png'); }
.bg-stage .bg-frame[data-bg="work"]    {
  background-image:
    radial-gradient(ellipse at center, rgba(7,7,10,0) 0%, rgba(7,7,10,0.85) 100%),
    url('bg-work.png');
  background-size: auto, 340px;
  background-repeat: no-repeat, repeat;
  background-position: center, center;
}
.bg-stage .bg-frame[data-bg="process"] {
  background-image:
    radial-gradient(ellipse at center, rgba(7,7,10,0) 0%, rgba(7,7,10,0.6) 100%),
    url('bg_process.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.bg-stage .bg-frame[data-bg="contact"] {
  background-image:
    linear-gradient(rgba(7,7,10,0.78), rgba(7,7,10,0.78)),
    url('bg-contact.png');
}
@media (max-width: 640px) {
  .bg-stage .bg-frame[data-bg="work"] { background-size: auto, 200px; }
}

/* ---------- Nav ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(1.25rem, 4vw, 4rem);
  position: sticky;
  top: 0;
  background: transparent;
  z-index: 50;
  min-height: 132px;
  pointer-events: none;
  transform: translateY(0);
  opacity: 1;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
              opacity 0.35s ease;
}
.nav.is-hidden {
  transform: translateY(-120%);
  opacity: 0;
  pointer-events: none;
}
.nav-pill {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: 0 clamp(0.9rem, 2vw, 1.6rem) 0 0;
  border-radius: 999px;
  background: transparent;
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
  transition: background 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
              backdrop-filter 0.5s ease,
              -webkit-backdrop-filter 0.5s ease,
              box-shadow 0.5s ease,
              padding 0.5s ease;
  pointer-events: auto;
  position: relative;
}
.nav.is-revealed .nav-pill {
  background: rgba(7, 7, 10, 0.48);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow:
    0 14px 44px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(212, 175, 55, 0.22),
    inset 0 1px 0 rgba(255, 248, 220, 0.07);
}
/* Gold gradient hairline outline — sharper than a solid border */
.nav-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg,
    rgba(245, 217, 122, 0.6) 0%,
    rgba(212, 175, 55, 0.15) 35%,
    rgba(168, 132, 27, 0.05) 65%,
    rgba(245, 217, 122, 0.45) 100%);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.nav.is-revealed .nav-pill::before { opacity: 1; }
.nav-logo {
  display: flex;
  align-items: center;
}
.nav-logo img {
  width: 132px;
  height: 132px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.55))
          drop-shadow(0 0 18px rgba(0, 0, 0, 0.3));
  transition: filter 0.5s ease, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.nav-logo:hover img {
  filter: drop-shadow(0 4px 16px rgba(212, 175, 55, 0.35))
          drop-shadow(0 0 22px rgba(0, 0, 0, 0.4));
  transform: scale(1.02);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 2.75rem);
}
.nav-links a {
  font-family: 'Cinzel', serif;
  font-weight: 500;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: #ece9df;
  position: relative;
  padding: 0.5rem 0.15rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.65),
               0 0 14px rgba(0, 0, 0, 0.4);
  transition: color 0.4s ease, letter-spacing 0.4s ease, text-shadow 0.4s ease;
}
/* When the pill is showing, the text-shadow can be lighter */
.nav.is-revealed .nav-links a {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.nav-links a::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -2px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold-gradient);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
  opacity: 0;
  transform: translate(-50%, -4px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--gold-gradient);
  transform: translateX(-50%);
  transition: width 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.nav-links a:hover {
  color: var(--gold-bright);
  letter-spacing: 0.36em;
}
.nav-links a:hover::before {
  opacity: 1;
  transform: translate(-50%, 0);
}
.nav-links a:hover::after { width: 100%; }

/* Active section indicator — sticks the hover state on the current section's link */
.nav-links a.is-active {
  color: var(--gold-bright);
  letter-spacing: 0.34em;
}
.nav-links a.is-active::before {
  opacity: 1;
  transform: translate(-50%, 0);
}
.nav-links a.is-active::after { width: 100%; }

@media (max-width: 640px) {
  .nav { padding: 0 1.1rem; min-height: 92px; }
  .nav-logo img { width: 92px; height: 92px; }
  .nav-links { gap: 1.15rem; }
  .nav-links a { font-size: 0.66rem; letter-spacing: 0.24em; padding: 0.4rem 0.1rem; }
  .nav-links a:hover { letter-spacing: 0.26em; }
  .nav-links a.is-active { letter-spacing: 0.26em; }
}

/* ---------- Hero ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(4rem, 10vw, 8rem) 1.5rem clamp(5rem, 8vw, 7rem);
  position: relative;
  background-image:
    linear-gradient(180deg, rgba(7,7,10,0.5) 0%, rgba(7,7,10,0) 35%, rgba(7,7,10,0) 65%, rgba(7,7,10,0.4) 100%);
}
/* ===== Animated wordmark (replaces name.png) ===== */
.wordmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  filter: drop-shadow(0 12px 50px rgba(212, 175, 55, 0.18));
  animation: float 6s ease-in-out infinite;
  animation-delay: 1.6s;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.wm-row {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.5vw, 1rem);
  line-height: 1;
}

/* --- Brackets --- */
.wm-bracket,
.wm-slash {
  font-family: 'Archivo Black', system-ui, sans-serif;
  font-size: clamp(2.6rem, 8vw, 5.4rem);
  line-height: 1;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 4px 24px rgba(212, 175, 55, 0.3);
  display: inline-block;
  opacity: 0;
}
.wm-bracket-l { animation: bracketIn 0.7s 0.05s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; transform-origin: right center; }
.wm-bracket-r { animation: bracketIn 0.7s 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; transform-origin: left center; }
.wm-slash {
  font-size: clamp(2.2rem, 7vw, 4.6rem);
  margin: 0 -0.05em;
  animation: slashDrop 0.6s 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
@keyframes bracketIn {
  0%   { opacity: 0; transform: translateX(-30px) scale(0.6); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}
.wm-bracket-r { animation-name: bracketInR; }
@keyframes bracketInR {
  0%   { opacity: 0; transform: translateX(30px) scale(0.6); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes slashDrop {
  0%   { opacity: 0; transform: translateY(-30px) rotate(-12deg) scale(0.7); }
  60%  { opacity: 1; transform: translateY(4px) rotate(0) scale(1.05); }
  100% { opacity: 1; transform: translateY(0) rotate(0) scale(1); }
}

/* --- StamKode text --- */
.wm-text {
  font-family: 'Archivo Black', system-ui, sans-serif;
  font-size: clamp(2.6rem, 8vw, 5.4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  /* Lean is done with skewX (not font-style: italic) so background-clip: text fills the full glyph */
  display: inline-block;
  margin-left: 0.15em;
  padding: 0.05em 0.15em;
  opacity: 0;
  transform: skewX(-9deg) translateY(24px);
  animation: textRise 0.85s 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.wm-stam {
  color: #f4f1e8;
  text-shadow:
    0 1px 0 #1a1a1f,
    0 2px 0 #15151a,
    0 3px 0 #101015,
    0 8px 20px rgba(0, 0, 0, 0.5);
}
.wm-code {
  background: linear-gradient(135deg, #f5d97a 0%, #d4af37 35%, #f5d97a 50%, #a8841b 75%, #d4af37 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 8px 28px rgba(212, 175, 55, 0.25);
  animation: shimmer 6s 2s linear infinite;
}
@keyframes textRise {
  0%   { opacity: 0; transform: skewX(-9deg) translateY(24px); }
  100% { opacity: 1; transform: skewX(-9deg) translateY(0); }
}
@keyframes shimmer {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* --- Tagline --- */
.wm-tagline {
  font-family: 'Cinzel', serif;
  font-size: clamp(0.65rem, 1.4vw, 0.85rem);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: flex;
  gap: 0.9em;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.25rem;
  opacity: 0;
  animation: tagFadeIn 1s 1.5s ease forwards;
}
.wm-tagline span:not(.wm-dot) {
  background: linear-gradient(180deg, #f4f1e8 0%, #a8a6a0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.wm-dot {
  color: var(--gold);
  font-size: 1.4em;
  line-height: 0;
  transform: translateY(-0.1em);
}
@keyframes tagFadeIn {
  0%   { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .wordmark { animation: none; }
  .wm-bracket, .wm-slash, .wm-stam, .wm-code,
  .wm-tagline { animation: none !important; opacity: 1 !important; transform: none !important; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
.hero-sub {
  margin-top: 1.5rem;
  max-width: 640px;
  color: var(--text-dim);
  font-size: clamp(1rem, 2vw, 1.15rem);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55em 0.75em;
  letter-spacing: 0.02em;
}
.hero-sub-phrase {
  display: inline-block;
  opacity: 0;
  transform: translateY(12px);
  animation: heroSubIn 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.hero-sub-phrase:nth-child(1) { animation-delay: 1.9s; }
.hero-sub-phrase:nth-child(2) { animation-delay: 2.25s; color: #d6d2c4; }
.hero-sub-phrase:nth-child(3) {
  animation-delay: 2.6s;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@keyframes heroSubIn {
  0%   { opacity: 0; transform: translateY(12px); filter: blur(4px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-sub-phrase { animation: none !important; opacity: 1 !important; transform: none !important; filter: none !important; }
}
.hero-cta {
  margin-top: 2.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.85rem;
  min-height: 48px;       /* accessible touch target */
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  transition: all 0.25s ease;
  cursor: pointer;
  border: 1px solid transparent;
  -webkit-tap-highlight-color: transparent;
}
.btn-lg { padding: 1.1rem 2.5rem; font-size: 1.02rem; }
.btn-gold {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--gold-gradient);
  color: #1a1408;
  box-shadow: var(--shadow-gold);
  transition: transform 0.3s ease, box-shadow 0.45s ease;
}
.btn-gold::after {
  content: '';
  position: absolute;
  top: 0;
  left: -60%;
  width: 55%;
  height: 100%;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255, 244, 200, 0.08) 25%,
    rgba(255, 248, 220, 0.55) 50%,
    rgba(255, 244, 200, 0.08) 75%,
    transparent 100%
  );
  filter: blur(6px);
  transform: skewX(-18deg);
  animation: btnWave 4.5s cubic-bezier(0.45, 0, 0.55, 1) infinite;
  pointer-events: none;
  z-index: 0;
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 44px rgba(212, 175, 55, 0.45);
}
.btn-gold:hover::after { animation-duration: 2s; }
@keyframes btnWave {
  0%   { left: -60%; }
  55%  { left: 110%; }
  100% { left: 110%; }
}

.btn-ghost {
  position: relative;
  overflow: hidden;
  background: transparent;
  border-color: var(--line);
  color: var(--gold-bright);
  isolation: isolate;
  transition: color 0.45s ease, border-color 0.45s ease, transform 0.25s ease,
              box-shadow 0.45s ease;
}
.btn-ghost::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold-gradient);
  transform: translateX(-101%);
  transition: transform 0.55s cubic-bezier(0.7, 0, 0.2, 1);
  z-index: -1;
}
.btn-ghost:hover {
  color: #1a1408;
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 14px 44px rgba(212, 175, 55, 0.3);
}
.btn-ghost:hover::before { transform: translateX(0); }

@media (prefers-reduced-motion: reduce) {
  .btn-gold::after { animation: none; display: none; }
  .btn-ghost::before { transition: none; }
}

/* ---------- Sections ---------- */
section { padding: clamp(4rem, 8vw, 7rem) clamp(1.25rem, 5vw, 5rem); }

.section-head {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3.5rem;
}
.eyebrow {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.section-head h2 {
  font-family: 'Cinzel', serif;
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}
.section-head p { color: var(--text-dim); }

/* ---------- Work / Projects ---------- */
.work { background: transparent; }

.projects {
  display: grid;
  /* min() prevents overflow on phones narrower than 360px */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
  max-width: 1400px;
  margin: 0 auto;
}

.project {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
              border-color 0.4s ease,
              box-shadow 0.4s ease;
}
.project:hover {
  transform: translateY(-6px);
  border-color: var(--line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), var(--shadow-gold);
}

.project-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line-soft);
  display: block;
}

.frame-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
              filter 0.5s ease;
  will-change: transform;
}
.project:hover .frame-poster {
  transform: scale(1.04);
  filter: brightness(1.05);
}

.project-frame .frame-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7,7,10,0) 55%, rgba(7,7,10,0.88) 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.project:hover .frame-overlay { opacity: 1; }

.project-frame .frame-cta {
  position: absolute;
  bottom: 1rem; right: 1rem;
  padding: 0.55rem 1rem;
  background: var(--gold-gradient);
  color: #1a1408;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  box-shadow: var(--shadow-gold);
}
.project:hover .frame-cta { opacity: 1; transform: translateY(0); }

.project-frame.is-dev { cursor: default; }

.project-status {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.4rem 0.75rem;
  background: rgba(7, 7, 10, 0.78);
  border: 1px solid rgba(212, 175, 55, 0.45);
  color: var(--gold-bright);
  border-radius: 999px;
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.project-link.is-dev {
  color: var(--text-mute);
  cursor: default;
  font-style: italic;
  letter-spacing: 0.06em;
}

.project-body {
  padding: 1.5rem 1.75rem 1.75rem;
}
.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.project-tag {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}
.project-domain {
  font-size: 0.78rem;
  color: var(--text-mute);
  font-family: monospace;
}
.project h3 {
  font-family: 'Cinzel', serif;
  font-weight: 500;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
}
.project p {
  color: var(--text-dim);
  font-size: 0.94rem;
}
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--gold-bright);
  letter-spacing: 0.04em;
  transition: gap 0.25s ease;
}
.project-link:hover { gap: 0.7rem; }
.project-link::after { content: '→'; transition: transform 0.25s ease; }

/* ---------- Services ---------- */
.services {
  background: linear-gradient(180deg, transparent 0%, rgba(212, 175, 55, 0.03) 50%, transparent 100%);
}
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  max-width: 1200px;
  margin: 0 auto;
}
.service-card {
  position: relative;
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0.75rem clamp(1.5rem, 3vw, 3rem);
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
/* Faded gold hairline divider between columns */
.service-card + .service-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8%;
  bottom: 8%;
  width: 1px;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(212, 175, 55, 0.18) 25%,
    rgba(212, 175, 55, 0.32) 50%,
    rgba(212, 175, 55, 0.18) 75%,
    transparent 100%);
  pointer-events: none;
}
.service-card:hover { transform: translateY(-6px); }

.service-num {
  font-family: 'Cinzel', serif;
  font-weight: 500;
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  letter-spacing: 0.04em;
  line-height: 1;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.92;
  margin-bottom: 1.4rem;
  text-shadow: 0 4px 28px rgba(212, 175, 55, 0.15);
  transition: opacity 0.4s ease, letter-spacing 0.5s ease;
}
.service-card:hover .service-num {
  opacity: 1;
  letter-spacing: 0.06em;
}

.service-card h3 {
  font-family: 'Cinzel', serif;
  font-weight: 500;
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
  letter-spacing: 0.015em;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}
/* Short gold hairline under each title, extends on hover */
.service-card h3::after {
  content: '';
  display: block;
  margin-top: 0.85rem;
  width: 28px;
  height: 1px;
  background: var(--gold-gradient);
  transition: width 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.service-card:hover h3::after { width: 64px; }

.service-card p {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.65;
  max-width: 32ch;
}

/* ---------- Process ---------- */
.process { background: transparent; }
.process-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}
/* Continuous gold hairline running through the centre of the badges */
.process-steps::before {
  content: '';
  position: absolute;
  left: 12.5%;
  right: 12.5%;
  top: 32px;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(212, 175, 55, 0.35) 14%,
    rgba(212, 175, 55, 0.5) 50%,
    rgba(212, 175, 55, 0.35) 86%,
    transparent 100%);
  pointer-events: none;
}
.process-step {
  position: relative;
  text-align: center;
  padding: 0 clamp(0.75rem, 1.5vw, 1.5rem);
  cursor: pointer;
  outline: none;
}
.process-step:focus-visible .step-num {
  border-color: var(--gold);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.5),
    0 0 0 4px var(--bg),
    0 0 0 6px rgba(212, 175, 55, 0.6);
}
.step-body {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-6px);
  transition: max-height 0.55s cubic-bezier(0.2, 0.8, 0.2, 1),
              opacity 0.4s ease,
              transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.process-step.is-active .step-body {
  max-height: 320px;
  opacity: 1;
  transform: translateY(0);
}
.process-step.is-active .step-num {
  transform: translateY(-4px) scale(1.08);
  border-color: var(--gold);
  color: #1a1408;
  background: var(--gold-gradient);
  box-shadow:
    0 16px 44px rgba(0, 0, 0, 0.6),
    0 0 0 4px var(--bg),
    0 0 38px rgba(212, 175, 55, 0.55);
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  font-family: 'Cinzel', serif;
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  background: radial-gradient(circle at 30% 30%, #1a1a22 0%, #0a0a0e 100%);
  color: var(--gold-bright);
  border: 1px solid rgba(212, 175, 55, 0.35);
  /* The 4px ring of bg colour creates a visible gap where the hairline passes */
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.5),
    0 0 0 4px var(--bg),
    0 0 22px rgba(212, 175, 55, 0.18);
  margin-bottom: 1.4rem;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
              border-color 0.4s ease,
              box-shadow 0.4s ease,
              color 0.4s ease;
}
.process-step:hover .step-num {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow:
    0 14px 38px rgba(0, 0, 0, 0.55),
    0 0 0 4px var(--bg),
    0 0 32px rgba(212, 175, 55, 0.4);
}
.process-step h3 {
  font-family: 'Cinzel', serif;
  font-weight: 500;
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  letter-spacing: 0.015em;
  margin-bottom: 0.7rem;
}
.process-step p {
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.6;
  max-width: 30ch;
  margin: 0 auto;
}

@media (max-width: 880px) {
  .process-steps {
    grid-template-columns: 1fr;
    max-width: 420px;
    gap: 2.5rem;
  }
  /* Vertical line through the left edge of each badge */
  .process-steps::before {
    left: 31px;
    right: auto;
    top: 32px;
    bottom: 32px;
    width: 1px;
    height: auto;
    background: linear-gradient(180deg,
      transparent 0%,
      rgba(212, 175, 55, 0.35) 8%,
      rgba(212, 175, 55, 0.5) 50%,
      rgba(212, 175, 55, 0.35) 92%,
      transparent 100%);
  }
  .process-step {
    text-align: left;
    padding: 0 0 0 5.25rem;
    min-height: 64px;
  }
  .step-num {
    position: absolute;
    left: 0;
    top: 0;
    margin-bottom: 0;
  }
  .process-step h3 { margin-top: 0.35rem; }
  .process-step p { margin: 0; max-width: none; }
}

/* ---------- Contact ---------- */
.contact { text-align: center; }
.contact-inner { max-width: 600px; margin: 0 auto; }
.contact h2 {
  font-family: 'Cinzel', serif;
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 1rem 0;
}
.contact p { color: var(--text-dim); margin-bottom: 2rem; }

/* ---------- Footer ---------- */
.footer {
  padding: 2.5rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.footer-logo { width: 140px; opacity: 0.85; }
.footer p { color: var(--text-mute); font-size: 0.82rem; letter-spacing: 0.05em; }

.footer-socials {
  display: flex;
  gap: 1.25rem;
  margin-top: 0.25rem;
}
.footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-mute);
  transition: color 0.25s ease, transform 0.25s ease;
}
.footer-social:hover {
  color: var(--gold-bright);
  transform: translateY(-2px);
}
.footer-social svg { display: block; }

/* ---------- Mobile-specific tuning ---------- */
@media (max-width: 640px) {
  section { padding: 3.5rem 1.1rem; }
  .section-head { margin-bottom: 2.25rem; }
  .hero { padding: 3rem 1.1rem 4rem; }
  .wm-row { gap: 0.35rem; }
  .wm-text { margin-left: 0.1em; }
  .hero-cta { width: 100%; flex-direction: column; gap: 0.75rem; }
  .hero-cta .btn { width: 100%; }
  .project-body { padding: 1.25rem 1.25rem 1.5rem; }
  .project h3 { font-size: 1.2rem; }
  .project p { font-size: 0.9rem; }
  .project-frame { aspect-ratio: 16 / 11; }   /* slightly taller crop reads better on phones */

  /* Horizontal scroll-snap carousel on mobile */
  .work { padding-left: 0; padding-right: 0; }
  .work .section-head { padding: 0 1.1rem; }
  .projects {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-padding-left: 1.1rem;
    gap: 1rem;
    padding: 0.5rem 1.1rem 1rem;
    max-width: none;
    scrollbar-width: none;
  }
  .projects::-webkit-scrollbar { display: none; }
  .project {
    flex: 0 0 86%;
    min-width: 0;
    scroll-snap-align: start;
  }
  .project:last-child {
    /* Lets the last card snap fully into view with right-side breathing room */
    margin-right: calc(14% - 1.1rem);
  }
  .bg-grid { background-size: 50px 50px; }
  .bg-glow { width: 700px; height: 700px; filter: blur(60px); }
  .service-grid { grid-template-columns: 1fr; }
  .service-card { padding: 2rem 0.25rem; }
  .footer-logo { width: 96px; }
  .footer { padding: 2rem 1rem 2.25rem; }
  /* Switch from vertical to horizontal hairline */
  .service-card + .service-card::before {
    left: 8%;
    right: 8%;
    top: 0;
    bottom: auto;
    width: auto;
    height: 1px;
    background: linear-gradient(90deg,
      transparent 0%,
      rgba(212, 175, 55, 0.18) 25%,
      rgba(212, 175, 55, 0.32) 50%,
      rgba(212, 175, 55, 0.18) 75%,
      transparent 100%);
  }
  .footer { padding: 2rem 1rem; }
}

/* iOS Safari: iframes ignore CSS width/height unless the parent has explicit overflow */
.project-frame { -webkit-overflow-scrolling: touch; }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
