/* ==========================================================================
   Scarlett Web Designs — stylesheet
   ========================================================================== */

:root {
  /* Off-white / ink, scarlett used sparingly as accent only */
  --bg: #faf7f4;
  --bg-alt: #f1ece7;
  --surface: #ffffff;
  --ink: #1c1a19;
  --ink-soft: #55504c;
  --ink-faint: #8a8480;
  --line: rgba(28, 26, 25, 0.1);
  --scarlett: #9e1b32;
  --scarlett-deep: #6e1223;
  --scarlett-tint: rgba(158, 27, 50, 0.08);

  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-blur: 16px;

  /* Sections that stay dark in both themes */
  --invert-bg: #1c1a19;
  --invert-fg: #faf7f4;

  /* Logo art is black ink; flipped to white wherever it sits on a dark ground */
  --logo-filter: none;

  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Jost", "Helvetica Neue", Arial, sans-serif;

  --container: 1180px;
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;

  --shadow-soft: 0 20px 60px -25px rgba(28, 26, 25, 0.35);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --bg: #121110;
  --bg-alt: #191716;
  --surface: #1d1b1a;
  --ink: #f4efea;
  --ink-soft: #b5aca5;
  --ink-faint: #857d77;
  --line: rgba(244, 239, 234, 0.12);
  --scarlett: #c2304a;
  --scarlett-deep: #d8455f;
  --scarlett-tint: rgba(194, 48, 74, 0.12);

  --glass-bg: rgba(40, 37, 35, 0.5);
  --glass-border: rgba(255, 255, 255, 0.08);

  --invert-bg: #0d0c0b;
  --logo-filter: invert(1);

  --shadow-soft: 0 20px 60px -25px rgba(0, 0, 0, 0.8);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.5s var(--ease), color 0.5s var(--ease);
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  margin: 0;
  color: var(--ink);
}

p {
  margin: 0;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

.eyebrow {
  font-size: 12.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--scarlett);
  font-weight: 500;
  margin: 0 0 14px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------------------------------- Preloader ---------------------------------- */

/* Shown only when the script is alive to dismiss it — otherwise a JS failure
   would leave this curtain covering the page permanently. */
.preloader { display: none; }

.js-anim .preloader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.7s var(--ease), visibility 0.7s var(--ease);
}
.preloader.is-done {
  opacity: 0;
  visibility: hidden;
}
.preloader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
}
.preloader-inner .logo-img {
  width: clamp(180px, 26vw, 300px);
  filter: var(--logo-filter);
  /* Wipes in left-to-right like the stroke is being drawn */
  -webkit-mask-image: linear-gradient(90deg, #000 0 0);
  mask-image: linear-gradient(90deg, #000 0 0);
  -webkit-mask-size: 0% 100%;
  mask-size: 0% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  animation: logoWipe 1.15s var(--ease) 0.15s forwards;
}
@keyframes logoWipe {
  to { -webkit-mask-size: 100% 100%; mask-size: 100% 100%; }
}
.preloader-bar {
  width: 150px;
  height: 1px;
  background: var(--line);
  overflow: hidden;
}
.preloader-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--scarlett);
  animation: barFill 1.3s var(--ease) forwards;
}
@keyframes barFill {
  to { width: 100%; }
}

/* ---------------------------------- Grain / progress / cursor ---------------------------------- */

.grain {
  position: fixed;
  inset: -50%;
  z-index: 900;
  pointer-events: none;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 0.6s steps(2) infinite;
}
@keyframes grainShift {
  0% { transform: translate(0, 0); }
  50% { transform: translate(-2%, 1%); }
  100% { transform: translate(1%, -1%); }
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--scarlett), var(--scarlett-deep));
  z-index: 950;
  pointer-events: none;
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 960;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.cursor-dot {
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  background: var(--scarlett);
}
.cursor-ring {
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 1px solid var(--ink-faint);
  transition: opacity 0.3s var(--ease), width 0.3s var(--ease), height 0.3s var(--ease),
    margin 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}
body.cursor-ready .cursor-dot,
body.cursor-ready .cursor-ring {
  opacity: 1;
}
.cursor-ring.is-hover {
  width: 58px;
  height: 58px;
  margin: -29px 0 0 -29px;
  border-color: var(--scarlett);
  background: var(--scarlett-tint);
}
/* Touch and reduced-motion users keep the native cursor */
@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* ---------------------------------- Logo lockup ---------------------------------- */

.logo {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  color: var(--ink);
}

.logo-img {
  filter: var(--logo-filter);
}
.on-dark .logo-img {
  filter: invert(1);
}

.logo-sub {
  margin-top: 8px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.logo--nav .logo-img { width: 118px; }
.logo--nav .logo-sub {
  font-size: 7.5px;
  letter-spacing: 0.34em;
  margin-top: 4px;
}

.logo--hero .logo-img { width: min(560px, 82vw); }
.logo--hero .logo-sub {
  font-size: clamp(11px, 1.6vw, 15px);
  letter-spacing: 0.55em;
  margin-top: 14px;
}
/* Hero mark wipes in once the curtain lifts */
.js-anim .logo-mask {
  display: block;
  -webkit-mask-image: linear-gradient(90deg, #000 0 0);
  mask-image: linear-gradient(90deg, #000 0 0);
  -webkit-mask-size: 0% 100%;
  mask-size: 0% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
body.is-ready .logo-mask {
  animation: logoWipe 1.4s var(--ease) 0.15s forwards;
}

.logo--footer .logo-img { width: 150px; }
.logo--footer .logo-sub { color: rgba(250, 247, 244, 0.6); }

/* ---------------------------------- Nav ---------------------------------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: padding 0.4s var(--ease), background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.nav.is-scrolled {
  padding: 10px 0;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 10px 30px -20px rgba(28, 26, 25, 0.4);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  position: relative;
  padding-bottom: 4px;
  transition: color 0.25s var(--ease);
  white-space: nowrap;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--scarlett);
  transition: right 0.3s var(--ease);
}
.nav-links a:hover,
.nav-links a.is-active {
  color: var(--ink);
}
.nav-links a:hover::after,
.nav-links a.is-active::after {
  right: 0;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Skeuomorphic theme switch: inset track, raised knob */
.theme-toggle {
  border: none;
  background: none;
  padding: 0;
  line-height: 0;
}
.theme-track {
  display: block;
  width: 52px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, #e2dad3, #f3eeea);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.22), inset 0 -1px 0 rgba(255, 255, 255, 0.7),
    0 1px 0 rgba(255, 255, 255, 0.6);
  position: relative;
  transition: background 0.4s var(--ease);
}
.theme-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff, #ded6cf);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform 0.4s var(--ease), background 0.4s var(--ease);
}
[data-theme="dark"] .theme-track {
  background: linear-gradient(180deg, #0d0c0b, #26221f);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.8), 0 1px 0 rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] .theme-knob {
  transform: translateX(24px);
  background: linear-gradient(180deg, #6e1223, var(--scarlett));
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  align-items: center;
  justify-content: center;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 16px;
  height: 1px;
  background: var(--ink);
  position: relative;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle span::before { position: absolute; top: -5px; }
.nav-toggle span::after { position: absolute; top: 5px; }
.nav.is-open .nav-toggle span { background: transparent; }
.nav.is-open .nav-toggle span::before { top: 0; transform: rotate(45deg); }
.nav.is-open .nav-toggle span::after { top: 0; transform: rotate(-45deg); }

/* ---------------------------------- Hero ---------------------------------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 150px 24px 90px;
  text-align: center;
}

.hero-parallax {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  will-change: transform;
}
.hero-shape--1 {
  width: 480px; height: 480px; top: -140px; left: -120px;
  background: radial-gradient(circle at 30% 30%, var(--scarlett) 0%, transparent 70%);
  opacity: 0.18;
}
.hero-shape--2 {
  width: 360px; height: 360px; bottom: -100px; right: -80px;
  background: radial-gradient(circle at 60% 40%, var(--ink) 0%, transparent 70%);
  opacity: 0.08;
}
.hero-shape--3 {
  width: 260px; height: 260px; top: 40%; right: 12%;
  background: radial-gradient(circle, var(--scarlett) 0%, transparent 70%);
  opacity: 0.1;
}
/* Follows the pointer around the hero */
.hero-glow {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--scarlett-tint) 0%, transparent 65%);
  transform: translate(-50%, -50%);
  left: 50%;
  top: 50%;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
  will-change: transform;
}
.hero:hover .hero-glow { opacity: 1; }

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Staggered entrance once the curtain lifts */
.js-anim .hero-stagger {
  opacity: 0;
  transform: translateY(24px);
}
body.is-ready .hero-stagger {
  animation: heroIn 0.9s var(--ease) forwards;
}
body.is-ready .hero-stagger:nth-child(1) { animation-delay: 0.15s; }
body.is-ready .hero-stagger:nth-child(2) { animation-delay: 0.25s; }
body.is-ready .hero-stagger:nth-child(3) { animation-delay: 0.75s; }
body.is-ready .hero-stagger:nth-child(4) { animation-delay: 0.9s; }
@keyframes heroIn {
  to { opacity: 1; transform: translateY(0); }
}

.hero-tagline {
  margin-top: 30px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(18px, 2.4vw, 24px);
  color: var(--ink-soft);
  max-width: 520px;
}

.hero-actions {
  margin-top: 40px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.3s var(--ease),
    background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
/* Liquid fill sweeps up from the bottom on hover */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--scarlett);
  transform: translateY(101%);
  transition: transform 0.45s var(--ease);
  z-index: 0;
}
.btn:hover::before { transform: translateY(0); }
.btn > * , .btn { position: relative; }
.btn span, .btn::after { position: relative; z-index: 1; }

.btn--primary {
  background: var(--ink);
  color: var(--bg);
  box-shadow: var(--shadow-soft);
}
.btn--ghost {
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn--ghost:hover { color: #fff; border-color: var(--scarlett); }
.btn--primary:hover { color: #fff; }

.scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 36px;
  border: 1px solid var(--ink-faint);
  border-radius: 12px;
}
.scroll-cue span {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 3px;
  height: 8px;
  background: var(--scarlett);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: scrollCue 1.8s infinite var(--ease);
}
@keyframes scrollCue {
  0% { opacity: 1; top: 6px; }
  70% { opacity: 0; top: 18px; }
  100% { opacity: 0; top: 18px; }
}

/* ---------------------------------- Marquee ribbons ---------------------------------- */

.marquee-wrap {
  overflow: hidden;
  width: 100%;
  margin: -30px 0 40px;
}

.marquee-band {
  position: relative;
  padding: 34px 0;
  background: var(--invert-bg);
  transform: rotate(-1.4deg);
  width: 108%;
  margin-left: -4%;
  overflow: hidden;
}

.marquee {
  overflow: hidden;
  white-space: nowrap;
}
.marquee + .marquee { margin-top: 14px; }

.marquee-track {
  display: inline-flex;
  will-change: transform;
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 0 28px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  color: rgba(250, 247, 244, 0.85);
}
.marquee--right .marquee-item {
  color: rgba(250, 247, 244, 0.45);
  font-style: normal;
  font-family: var(--font-body);
  font-size: 12.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.marquee-item .dot { color: var(--scarlett); }

/* ---------------------------------- Section shell ---------------------------------- */

section {
  padding: 110px 0;
}

.section-head {
  max-width: 620px;
  margin: 0 auto 64px;
  text-align: center;
}
.section-head h2 {
  font-size: clamp(30px, 4vw, 44px);
}

.js-anim .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.js-anim .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------------------------- Bento services ---------------------------------- */

.bento {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 190px;
  gap: 20px;
}

.bento-item {
  position: relative;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
/* Spotlight tracks the pointer across each tile */
.bento-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    380px circle at var(--mx, 50%) var(--my, 50%),
    var(--scarlett-tint),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.bento-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
  border-color: rgba(158, 27, 50, 0.3);
}
.bento-item:hover::before { opacity: 1; }

.bento-item .glyph {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: auto;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 20px;
  color: var(--scarlett);
  position: relative;
  z-index: 1;
  transition: transform 0.4s var(--ease);
}
.bento-item:hover .glyph { transform: scale(1.08) rotate(-4deg); }

.bento-item h3 {
  font-size: 21px;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}
.bento-item p {
  font-size: 14px;
  color: var(--ink-soft);
  position: relative;
  z-index: 1;
}

.bento-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.bento-list li {
  font-size: 12.5px;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 8px;
}
.bento-list li::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--scarlett);
  flex-shrink: 0;
}

.bento-item--wide { grid-column: span 2; }
.bento-item--tall { grid-row: span 2; }

@media (max-width: 980px) {
  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
  .bento-item--tall { grid-row: span 1; }
}
@media (max-width: 620px) {
  .bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .bento-item--wide { grid-column: span 1; }
  .bento-item { min-height: 170px; }
}

/* ---------------------------------- Work / carousel ---------------------------------- */

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

.carousel {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

.carousel-track {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 10px;
  scrollbar-width: none;
  perspective: 1200px;
}
.carousel-track::-webkit-scrollbar { display: none; }

.project-card {
  scroll-snap-align: start;
  flex: 0 0 min(560px, 84vw);
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  transform-style: preserve-3d;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

/* Skeuomorphic browser chrome */
.browser-chrome {
  background: linear-gradient(180deg, #efe9e4, #ddd5cf);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
[data-theme="dark"] .browser-chrome {
  background: linear-gradient(180deg, #2c2926, #211e1c);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}
.browser-dots { display: flex; gap: 7px; flex-shrink: 0; }
.browser-dots span {
  width: 10px; height: 10px; border-radius: 50%;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.25), 0 1px 0 rgba(255, 255, 255, 0.4);
}
.browser-dots span:nth-child(1) { background: #ec6a5e; }
.browser-dots span:nth-child(2) { background: #f4bf4f; }
.browser-dots span:nth-child(3) { background: #61c454; }

.browser-address {
  flex: 1;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 11.5px;
  color: var(--ink-faint);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
[data-theme="dark"] .browser-address { background: rgba(0, 0, 0, 0.35); }

.project-cover {
  height: 260px;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 24px;
  overflow: hidden;
}
.project-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 25% 15%, rgba(255, 255, 255, 0.18), transparent 55%);
  pointer-events: none;
}
.cover-monogram {
  position: absolute;
  right: 18px;
  bottom: -40px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 190px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.13);
  user-select: none;
}
/* Kept off the cover art entirely — these are screenshots of real designs and
   every corner already has the site's own UI in it. */
.project-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.project-year {
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  flex-shrink: 0;
}

.project-body { padding: 28px 30px 32px; }
.project-body .category {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--scarlett);
}
.project-body h3 { font-size: 24px; margin-bottom: 12px; }
.project-body p {
  color: var(--ink-soft);
  font-size: 14.5px;
  margin-bottom: 18px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 20px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--scarlett);
  border-bottom: 1px solid transparent;
  padding-bottom: 3px;
  transition: border-color 0.3s var(--ease), gap 0.3s var(--ease);
}
.project-link:hover {
  border-bottom-color: var(--scarlett);
  gap: 11px;
}
.project-link--pending {
  color: var(--ink-faint);
  cursor: default;
}
.project-link--pending:hover { border-bottom-color: transparent; gap: 7px; }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-row span {
  font-size: 11.5px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-top: 40px;
}
.carousel-controls button {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}
.carousel-controls button:hover {
  background: var(--ink);
  color: var(--bg);
}

.carousel-dots { display: flex; gap: 8px; }
.carousel-dots button {
  width: 8px; height: 8px;
  border-radius: 50%;
  padding: 0;
  border: none;
  background: var(--line);
  transition: width 0.3s var(--ease), background 0.3s var(--ease);
}
.carousel-dots button.is-active {
  background: var(--scarlett);
  width: 22px;
  border-radius: 5px;
}

/* ---------------------------------- Before / After slider ---------------------------------- */

.compare-outer {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 32px;
}

.compare {
  position: relative;
  height: 460px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  user-select: none;
  touch-action: pan-y;
  --pos: 50%;
}

.compare-pane {
  position: absolute;
  inset: 0;
}
/* The "before" sits on top and is clipped back to the handle position */
.compare-pane--before {
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}

.mock {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* --- After: the redesign --- */
.mock--after {
  background: var(--surface);
  display: flex;
  flex-direction: column;
}
.mock--after .mock-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 20px 34px;
  border-bottom: 1px solid var(--line);
}
.mock-brand {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.mock-links { display: flex; gap: 10px; }
.mock-links i { width: 26px; height: 5px; border-radius: 3px; background: var(--line); display: block; }
/* Centred so that any slice the slider exposes still reads as a real page
   rather than an empty half. */
.mock-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 34px;
  gap: 16px;
}
.mock-eyebrow {
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--scarlett);
}
.mock-hero h4 {
  font-size: clamp(22px, 3.2vw, 34px);
  line-height: 1.22;
  font-weight: 500;
}
.mock-btn {
  padding: 11px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.mock-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 0 34px 30px;
}
.mock-grid span {
  height: 62px;
  border-radius: 10px;
  background: linear-gradient(140deg, var(--bg-alt), var(--line));
}

/* --- Before: the dated site --- */
.mock--before {
  background: #e9e6dc;
  font-family: "Times New Roman", Times, serif;
  color: #111;
  display: flex;
  flex-direction: column;
}
.mock-nav-old {
  background: linear-gradient(180deg, #2b4a8b, #1b3160);
  color: #fff;
  padding: 10px 16px;
  text-align: center;
}
.mock-brand-old {
  display: block;
  font-weight: bold;
  font-size: 19px;
  letter-spacing: 0.02em;
  text-shadow: 1px 1px 0 #000;
}
.mock-links-old {
  display: block;
  margin-top: 6px;
  font-size: 11.5px;
  color: #ffe9a8;
  text-decoration: underline;
}
.mock-hero-old {
  flex: 1;
  text-align: center;
  padding: 22px 26px;
}
.mock-hero-old h4 {
  font-family: "Times New Roman", Times, serif;
  color: #b3261e;
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 12px;
  text-shadow: 1px 1px 0 #fff;
}
.mock-hero-old p {
  font-size: 13.5px;
  line-height: 1.45;
  max-width: 380px;
  margin: 0 auto 16px;
}
.mock-btn-old {
  display: inline-block;
  padding: 9px 20px;
  background: linear-gradient(180deg, #ffd34d, #e0a11b);
  border: 2px outset #f3c33f;
  font-weight: bold;
  font-size: 13px;
  color: #3a2a00;
}
.mock-old-strip {
  background: repeating-linear-gradient(45deg, #b3261e, #b3261e 12px, #8e1c16 12px, #8e1c16 24px);
  color: #fff;
  font-size: 11.5px;
  text-align: center;
  padding: 7px 0;
  letter-spacing: 0.06em;
}

.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 44px;
  margin-left: -22px;
  cursor: ew-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}
.compare-handle:focus-visible { outline: none; }
.compare-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: var(--invert-fg);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}
.compare-grip {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--invert-fg);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  letter-spacing: 1px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: transform 0.25s var(--ease);
}
.compare-handle:hover .compare-grip,
.compare-handle:focus-visible .compare-grip { transform: scale(1.12); }

.compare-tag {
  position: absolute;
  top: 16px;
  z-index: 2;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  backdrop-filter: blur(6px);
}
.compare-tag--before { left: 16px; }
.compare-tag--after { right: 16px; }

.compare-hint {
  text-align: center;
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
}

@media (max-width: 620px) {
  .compare { height: 400px; }
}

/* ---------------------------------- About ---------------------------------- */

.about-grid {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: 72px;
  align-items: center;
}

.about-card-wrap { perspective: 1600px; }

/* Skeuomorphic business card that flips */
.biz-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1.68 / 1;
  cursor: pointer;
}
.biz-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.9s var(--ease);
  transform-style: preserve-3d;
}
.biz-card.is-flipped .biz-card-inner { transform: rotateY(180deg); }

.biz-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: linear-gradient(160deg, #211f1e 0%, #322528 60%, var(--scarlett-deep) 165%);
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: var(--invert-fg);
  text-align: center;
}
.biz-face--front .logo-img { width: 62%; }
.biz-face--front .logo-sub {
  margin-top: 12px;
  color: rgba(250, 247, 244, 0.6);
  font-size: 9px;
}
.biz-flip-hint {
  position: absolute;
  bottom: 14px;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(250, 247, 244, 0.32);
}
.biz-face--back {
  transform: rotateY(180deg);
  gap: 6px;
}
.biz-role {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 19px;
  color: rgba(250, 247, 244, 0.95);
  margin-bottom: 6px;
}
.biz-line { font-size: 12.5px; color: rgba(250, 247, 244, 0.72); }
.biz-rule {
  width: 42px;
  height: 1px;
  background: var(--scarlett);
  margin: 12px 0;
}
.biz-small {
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(250, 247, 244, 0.45);
}

.about-copy h2 {
  font-size: clamp(28px, 3.4vw, 38px);
  margin-bottom: 22px;
}
.about-copy p {
  color: var(--ink-soft);
  font-size: 15.5px;
  margin-bottom: 16px;
}

.stat-row { display: flex; gap: 40px; margin-top: 32px; }
.stat-row div strong {
  display: block;
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--scarlett);
}
.stat-row div span {
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 44px; }
}

/* ---------------------------------- Contact ---------------------------------- */

.contact {
  background: var(--invert-bg);
  color: var(--invert-fg);
  text-align: center;
}
.contact h2 {
  color: var(--invert-fg);
  font-size: clamp(32px, 4.6vw, 52px);
  max-width: 700px;
  margin: 0 auto 30px;
}
.contact-card {
  max-width: 560px;
  margin: 0 auto;
  padding: 40px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}
.contact-email {
  display: inline-flex;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(20px, 2.6vw, 26px);
  color: var(--invert-fg);
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.contact-email:hover { border-color: var(--scarlett); color: var(--scarlett); }
.contact-note {
  margin-top: 18px;
  font-size: 13px;
  color: rgba(250, 247, 244, 0.5);
}
.contact-socials {
  margin-top: 28px;
  display: flex;
  gap: 22px;
  justify-content: center;
}
.contact-socials a {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(250, 247, 244, 0.65);
  transition: color 0.3s var(--ease);
}
.contact-socials a:hover { color: var(--scarlett); }

/* ---------------------------------- Footer ---------------------------------- */

.footer {
  background: var(--invert-bg);
  color: rgba(250, 247, 244, 0.7);
  padding: 50px 0 36px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.footer p {
  margin-top: 16px;
  font-size: 12.5px;
  color: rgba(250, 247, 244, 0.45);
}

/* ---------------------------------- Mobile ---------------------------------- */

@media (max-width: 900px) {
  .nav-links { gap: 20px; }
  .nav-links a { font-size: 12px; }
}

@media (max-width: 800px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(76vw, 320px);
    background: var(--surface);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0 44px;
    gap: 28px;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.15);
  }
  .nav.is-open .nav-links { transform: translateX(0); }
  .nav-toggle { display: flex; }
}

@media (max-width: 620px) {
  section { padding: 80px 0; }
  .container, .bento, .carousel, .about-grid, .compare-outer {
    padding-left: 22px;
    padding-right: 22px;
  }
  .stat-row { gap: 26px; }
}
