/* ===== Design tokens ===== */
:root {
  --cream: #EDECE8;
  --cream-2: #E3E1DB;
  --ink: #1B1F22;
  --ink-strong: #14181B;
  --body-text: #4B4F52;
  --muted: #787E82;
  --green-deep: #22343E;
  --green: #35586B;
  --green-light: #6B93A8;
  --green-lighter: #8FB2C2;
  --green-pale: #D8E1E6;
  --green-pale-2: #C9D6DC;

  /* Signature accent (teal) — deep enough for text on cream; bright for gradients/glows */
  --accent: #0B7561;
  --accent-bright: #22E0BC;
  --accent-grad: linear-gradient(120deg, #22E0BC, #0E8C74);
  --accent-ink: #06251E;

  --font-serif: 'Zilla Slab', serif;
  --font-sans: 'Inter', sans-serif;

  /* Type scale (fluid where it matters) */
  --text-hero: clamp(38px, 4.5vw + 10px, 60px);
  --text-h2: clamp(30px, 2.5vw + 14px, 44px);
  --tracking-display: -0.02em;

  /* One section rhythm everywhere */
  --section-pad: 72px;

  --radius-lg: 32px;
  --radius-md: 24px;
  --radius-sm: 18px;
  --radius-pill: 999px;

  --ease: cubic-bezier(.16,1,.3,1);
}

[data-theme="dark"] {
  --cream: #0F1417;
  --cream-2: #161D23;
  --ink: #E7E6E2;
  --ink-strong: #F2F1EE;
  --body-text: #B9BEC1;
  --muted: #7C8388;
  --green-pale: #1B262D;
  --green-pale-2: #24313A;
  --accent: #2BD9B4; /* brighter for legible accent text on dark */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  overflow-x: hidden;
  transition: background-color .3s ease, color .3s ease;
}

/* Fixed depth layer: two soft color washes + film grain, behind all content */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -1;
  pointer-events: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E"),
    radial-gradient(1100px 700px at 12% -5%, rgba(107,147,168,0.14), transparent 60%),
    radial-gradient(900px 650px at 100% 108%, rgba(34,224,188,0.09), transparent 55%);
  background-size: 180px 180px, auto, auto;
}
[data-theme="dark"] body::before {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E"),
    radial-gradient(1100px 700px at 12% -5%, rgba(107,147,168,0.10), transparent 60%),
    radial-gradient(900px 650px at 100% 108%, rgba(34,224,188,0.06), transparent 55%);
}

[data-theme="dark"] .nav { background: rgba(13,18,22,0.65); border-color: rgba(255,255,255,0.12); box-shadow: 0 8px 24px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.06); }
[data-theme="dark"] .icon-btn,
[data-theme="dark"] .carousel-arrow { background: rgba(27,36,43,0.55); color: var(--ink); border-color: rgba(255,255,255,0.14); }
[data-theme="dark"] .menu-toggle { background: #1C252C; color: var(--ink); border-color: rgba(255,255,255,0.1); }
[data-theme="dark"] .process-detail {
  background: rgba(22,30,36,0.6);
  border-color: rgba(255,255,255,0.1);
  color: var(--ink);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.06);
}
[data-theme="dark"] .tool,
[data-theme="dark"] .readiness-badge,
[data-theme="dark"] .contact-form input,
[data-theme="dark"] .contact-form textarea { background: #172026; border-color: rgba(255,255,255,0.08); color: var(--ink); }
[data-theme="dark"] .contact-form { background: #121A1F; }
[data-theme="dark"] .carousel-arrow:hover { background: var(--green-pale); }

a { color: inherit; }
/* <picture> wrappers are layout-transparent so img-targeting rules keep working */
picture { display: contents; }

/* Keyboard-only "skip to content" link: hidden until focused */
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 300;
  background: var(--green-deep); color: #fff;
  padding: 10px 18px; border-radius: 0 0 12px 12px;
  font-weight: 600; font-size: 14px; text-decoration: none;
  transition: top .2s ease;
}
.skip-link:focus { top: 0; }

/* ===== Scroll progress ===== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 200;
  background: transparent;
  pointer-events: none;
}
.scroll-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent-grad);
  transform-origin: left;
}

/* ===== Nav ===== */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 20px 32px 0;
}
.nav {
  max-width: 1360px;
  margin: 0 auto;
  background: rgba(237,236,232,0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  box-shadow: 0 8px 24px rgba(27,31,34,0.08), inset 0 1px 0 rgba(255,255,255,0.5);
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--green);
  color: var(--cream);
  padding: 10px 20px 10px 12px;
  border-radius: var(--radius-pill);
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 17px;
}
.brand-mark {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255,255,255,0.15);
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  font-size: 15px;
  color: var(--body-text);
}
.nav-links a { text-decoration: none; position: relative; transition: color .25s ease; }
.nav-links a::after {
  content: '';
  position: absolute; left: 0; bottom: -5px; height: 2px; width: 100%;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 14px rgba(27,31,34,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  color: var(--ink);
}
/* ===== SVG icon set ===== */
.icon-btn svg, .icon-circle svg, .step-icon svg, .readiness-icon svg { display: block; }
.icon-sun { display: none !important; }
[data-theme="dark"] .icon-moon { display: none !important; }
[data-theme="dark"] .icon-sun { display: block !important; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  padding: 15px 26px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: transform .3s ease, filter .3s ease;
}
.btn-solid { background: var(--green); color: var(--cream); padding: 11px 22px; font-size: 14px; }
.btn-gradient { background: var(--accent-grad); color: var(--accent-ink); transition: transform .3s ease, filter .3s ease, box-shadow .3s ease; }
.btn-gradient:hover { box-shadow: 0 10px 32px rgba(34,224,188,0.28); }
.full-width { width: 100%; justify-content: center; }
.link-underline {
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
  color: var(--accent);
}

.hover-lift-2:hover { transform: translateY(-8px); background: rgba(255,255,255,0.09); }
.hover-lift-4:hover { transform: translateY(-5px); border-color: rgba(53,88,107,0.35); }
.hover-lift-5:hover, .btn:hover { transform: translateY(-3px); filter: brightness(1.06); }

/* ===== Blobs ===== */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(15px);
  pointer-events: none;
}
.blob-hero {
  top: 40px; right: 20%; width: 340px; height: 340px;
  background: radial-gradient(circle, var(--green-lighter) 0%, rgba(143,178,194,0) 70%);
  animation: floatBlob 10s ease-in-out infinite;
}
.blob-services-1 {
  top: -80px; left: 8%; width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(107,147,168,0.35), transparent 70%);
}
.blob-services-2 {
  bottom: -100px; right: 6%; width: 340px; height: 340px;
  background: radial-gradient(circle, rgba(107,147,168,0.3), transparent 70%);
}
.blob-about {
  inset: 6%;
  background: radial-gradient(circle, #C9D9DE 0%, rgba(201,217,222,0) 72%);
  filter: blur(6px);
}

@keyframes floatBlob {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(20px,-15px) scale(1.05); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.fade-in-up { animation: fadeInUp 0.9s var(--ease) both; }
.fade-in-up.delay-1 { animation-delay: .1s; }
.bob { animation: bob 6s ease-in-out infinite; }

/* ===== Scroll reveal (see script.js) ===== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ===== Word-by-word heading reveal (see script.js splitHeadingWords) ===== */
.word-split { display: inline-block; overflow: hidden; vertical-align: top; }
.word-inner {
  display: inline-block;
  transform: translateY(115%);
  transition: transform .6s var(--ease);
  transition-delay: calc(var(--word-i, 0) * 40ms);
}
.words-ready .word-inner { transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .word-inner { transition: none; transform: none; }
}

/* ===== Hero ===== */
.hero {
  max-width: 1360px;
  margin: 0 auto;
  padding: 72px 32px 100px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
  position: relative;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green-pale);
  color: var(--green);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.hero h1 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: var(--text-hero);
  line-height: 1.1;
  letter-spacing: var(--tracking-display);
  margin: 0 0 24px;
  color: var(--ink-strong);
}
.hero h1 .accent { color: var(--accent); }
.hero h1 em { font-style: italic; font-weight: 500; }
.lede {
  font-size: 17px;
  line-height: 1.65;
  color: var(--body-text);
  max-width: 480px;
  margin: 0 0 36px;
}
.hero-actions { display: flex; align-items: center; gap: 28px; }
.hero-portrait {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 720px;
}
.hero-portrait img {
  width: 100%;
  max-width: 580px;
  height: auto;
  display: block;
  filter: drop-shadow(0 30px 45px rgba(20,24,27,0.22));
}
/* Ambient teal-slate glow behind the portrait */
.hero-portrait::after {
  content: '';
  position: absolute; inset: 12% 8%; z-index: 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(34,224,188,0.16), rgba(107,147,168,0.1) 55%, transparent 75%);
  filter: blur(30px);
  pointer-events: none;
}

/* ===== Section shared ===== */
.section-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--text-h2);
  line-height: 1.15;
  letter-spacing: var(--tracking-display);
  color: var(--ink-strong);
  margin: 0 0 56px;
  text-align: center;
}
.section-title.on-dark { color: var(--cream); }
.section-sub { font-size: 16px; color: var(--body-text); margin: 0 0 48px; text-align: center; }
.pill {
  display: inline-block;
  background: rgba(255,255,255,0.1);
  color: var(--green-pale-2);
  padding: 7px 18px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}
.pill-outline { color: #5F7E8C; background: none; padding: 0; letter-spacing: 0.12em; font-size: 12.5px; }
.pill-text { color: #5F7E8C; font-size: 12.5px; font-weight: 600; letter-spacing: 0.12em; margin-bottom: 16px; }
.pill-text.light { color: #A8C0C9; }

.grid-6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }

.icon-circle {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 28px;
}

/* ===== Services ===== */
.services { background: var(--green-deep); padding: 96px 32px; position: relative; overflow: hidden; }
.services-inner { max-width: 1360px; margin: 0 auto; position: relative; z-index: 1; }
.section-head { text-align: center; margin-bottom: 56px; }
.icon-circle-glass { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.16); font-size: 20px; margin-bottom: 26px; color: var(--cream); }
.check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.check-list li { font-size: 14.5px; line-height: 1.4; color: #D5DEE1; padding-left: 24px; position: relative; }
.check-list li::before { content: '✓'; position: absolute; left: 0; top: 1px; color: var(--green-light); }

/* ===== Services card stack ===== */
.services-stack { position: relative; max-width: 1100px; margin: 0 auto; }
.services-prev { left: -24px; }
.services-next { right: -24px; }
.stack-cards { position: relative; height: 520px; }
.stack-card {
  position: absolute; top: 0; left: 50%;
  width: 340px;
  padding: 36px 30px;
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, #1c3a52 0%, #0d1b2e 100%);
  box-shadow: 0 16px 34px rgba(0,0,0,0.28);
  color: #fff;
  transition: transform .5s var(--ease), opacity .5s var(--ease), box-shadow .5s var(--ease);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  transform: translateX(-50%) scale(0.7);
}
.stack-card.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 3;
  background: linear-gradient(160deg, #22E0BC 0%, #0E8C74 100%);
  box-shadow: 0 26px 55px rgba(0,0,0,0.4);
  transform: translateX(-50%) scale(1);
}
.stack-card.is-prev {
  opacity: 0.7;
  z-index: 2;
  transform: translateX(calc(-50% - 220px)) scale(0.82) rotate(-8deg);
}
.stack-card.is-next {
  opacity: 0.7;
  z-index: 2;
  transform: translateX(calc(-50% + 220px)) scale(0.82) rotate(8deg);
}
.stack-card.is-hidden { opacity: 0; pointer-events: none; z-index: 0; }
.stack-eyebrow { display: block; font-size: 11px; letter-spacing: 0.1em; font-weight: 700; color: rgba(255,255,255,0.7); margin-bottom: 10px; }
.stack-card h3 { font-family: var(--font-serif); font-weight: 500; font-size: 21px; margin: 0 0 20px; line-height: 1.3; color: #fff; }
.stack-cta {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 22px;
  padding: 10px 20px; border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.16); color: #fff; font-weight: 600; font-size: 14px;
  text-decoration: none; transition: background .25s ease;
}
.stack-cta:hover { background: rgba(255,255,255,0.28); }

@media (max-width: 900px) {
  .stack-card.is-prev, .stack-card.is-next { opacity: 0; pointer-events: none; }
  .stack-card { width: 88%; max-width: 340px; }
}

/* ===== Projects ===== */
.projects { max-width: 1360px; margin: 0 auto; padding: var(--section-pad) 32px; text-align: center; }
.projects-row { position: relative; }
.projects-track {
  display: flex; gap: 28px;
  overflow-x: auto;
  scrollbar-width: none;
}
.projects-track::-webkit-scrollbar { display: none; }
/* Landscape showcase card: the card IS the browser window.
   Chrome bar + media (fills remaining height) + always-visible title bar. */
.project-card {
  position: relative; flex: 0 0 500px; aspect-ratio: 13 / 10; border-radius: var(--radius-md);
  scroll-snap-align: start; overflow: hidden; perspective: 1600px;
  background: #16232C;
  transition: transform .35s ease, box-shadow .35s ease;
}
.project-card:hover { transform: translateY(-6px); box-shadow: 0 24px 45px rgba(20,24,27,0.2); }
.project-card-front { display: flex; flex-direction: column; }
.project-chrome {
  height: 28px; flex-shrink: 0;
  display: flex; align-items: center; gap: 6px; padding: 0 14px;
  background: #0E1A22;
}
.project-chrome i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.project-chrome i:nth-child(1) { background: #FF5F57; }
.project-chrome i:nth-child(2) { background: #FEBC2E; }
.project-chrome i:nth-child(3) { background: #28C840; }
.project-media { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #0E1A22; }
.project-media img, .project-media video {
  width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block;
}
/* Motif cards (3 & 4): the media zone carries the gradient + illustration */
.project-bar {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 13px 18px; text-align: left;
}
.project-bar-text { min-width: 0; }
.project-tag { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-bright); font-weight: 700; }
.project-title { font-family: var(--font-serif); font-weight: 500; font-size: 17.5px; color: #fff; margin: 2px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-personal-tag { display: block; font-size: 10.5px; font-style: italic; color: rgba(255,255,255,0.55); margin-top: 2px; }
.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px rgba(20,24,27,0.08); cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: transform .3s ease, box-shadow .3s ease, background .3s ease;
}
.carousel-prev { left: -24px; }
.carousel-next { right: -24px; }
.carousel-arrow:hover { transform: translateY(calc(-50% - 3px)); box-shadow: 0 14px 28px rgba(20,24,27,0.14); background: var(--green-pale); }

/* ===== Project card flip ===== */
.project-card-inner {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transition: transform .6s var(--ease);
}
.project-card.is-flipped .project-card-inner { transform: rotateY(180deg); }
.project-card-front, .project-card-back {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.project-card-back {
  pointer-events: none;
  transform: rotateY(180deg);
  background: rgba(34,52,62,0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.14);
  padding: 28px 24px;
  display: flex; flex-direction: column; gap: 16px;
  overflow-y: auto;
}
.project-card.is-flipped .project-card-front { pointer-events: none; }
.project-card.is-flipped .project-card-back { pointer-events: auto; }

/* Lead-funnel card: n8n workflow screenshot + on-demand demo video (src attaches on click).
   The zone bg matches the screenshot's canvas (#171717) so contain-fit blends seamlessly. */
.project-media-workflow { background: rgb(23,23,23); }
.project-media-workflow img { object-fit: contain; object-position: center 42%; }
.project-play-btn {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-pill);
  border: 1px solid rgba(255,255,255,0.3); background: rgba(23,23,23,0.75);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: #fff; font-weight: 600; font-size: 13px; font-family: inherit; cursor: pointer;
  transition: background .25s ease;
}
.project-play-btn:hover { background: rgba(255,255,255,0.2); }
.project-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #0E1A22; }
.project-video[hidden] { display: none; }

.project-flip-btn {
  position: absolute; z-index: 3;
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 20px rgba(20,24,27,0.12); cursor: pointer;
  font-size: 18px; line-height: 1; color: var(--ink-strong);
  display: flex; align-items: center; justify-content: center;
  transition: transform .25s ease, box-shadow .25s ease;
}
.project-flip-btn:hover { transform: scale(1.08); box-shadow: 0 12px 26px rgba(20,24,27,0.18); }
/* Front flip button sits inline in the title bar (not floated over the image) */
.project-flip-btn-front { position: static; flex-shrink: 0; background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.3); color: #fff; }
.project-flip-btn-front:hover { background: rgba(255,255,255,0.26); }
.project-flip-btn-back { top: 18px; right: 18px; background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.3); color: #fff; }
.project-flip-btn-back:hover { background: rgba(255,255,255,0.28); }

.project-title-back { font-family: var(--font-serif); font-weight: 500; font-size: 19px; color: #fff; margin: 0; padding-right: 40px; text-align: left; }
/* Story timeline: accent line with a node per beat */
.project-timeline { position: relative; padding-left: 22px; text-align: left; }
.project-timeline::before {
  content: '';
  position: absolute; left: 3px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(var(--accent-bright), rgba(34,224,188,0.12));
}
.timeline-item { position: relative; margin-bottom: 13px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-item::before {
  content: '';
  position: absolute; left: -22px; top: 4px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-bright);
}
.detail-label { display: block; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-bright); font-weight: 700; margin-bottom: 3px; }
.timeline-item p { margin: 0; font-size: 12.5px; line-height: 1.5; color: rgba(255,255,255,0.85); }
.project-cta {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.16); color: #fff; font-weight: 600; font-size: 13px;
  text-decoration: none; transition: background .25s ease;
}
.project-cta:hover { background: rgba(255,255,255,0.28); }

@media (prefers-reduced-motion: reduce) {
  .project-card-inner { transition: none; }
}

/* ===== Process ===== */
.process { max-width: 1360px; margin: 0 auto; padding: var(--section-pad) 32px; }
.process-grid { display: grid; grid-template-columns: 0.7fr 1.3fr; gap: 48px; align-items: stretch; }
.process-steps { display: flex; flex-direction: column; position: relative; }
.process-line { position: absolute; left: 24px; top: 24px; bottom: 24px; width: 2px; background: #C7CCCF; z-index: 0; }
.process-step {
  display: flex; align-items: center; gap: 20px; padding: 14px 0;
  background: none; border: none; cursor: pointer; text-align: left; position: relative; z-index: 1;
}
.step-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--green); color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.step-label { font-family: var(--font-serif); font-size: 22px; color: var(--muted); font-weight: 500; transition: color .3s ease; }
.process-step.active .step-label { color: var(--ink-strong); }
.process-detail {
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 28px; padding: 48px;
  display: flex; flex-direction: column; justify-content: center;
  box-shadow: 0 20px 50px rgba(20,24,27,0.06), inset 0 1px 0 rgba(255,255,255,0.6);
  transition: opacity .2s ease;
}
.process-detail.is-fading { opacity: 0; }
.process-detail-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.process-num { font-family: var(--font-serif); font-size: 34px; color: var(--green-lighter); font-weight: 600; }
.process-of { font-size: 12.5px; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
.process-title { font-family: var(--font-serif); font-weight: 500; font-size: 30px; color: var(--ink-strong); margin: 0 0 18px; }
.process-body { font-size: 16px; line-height: 1.65; color: var(--body-text); margin: 0 0 16px; }
.process-note { font-size: 14.5px; line-height: 1.6; color: var(--muted); margin: 0; }

/* ===== Tools ===== */
.tools { max-width: 1360px; margin: 0 auto; padding: var(--section-pad) 32px; text-align: center; }
.tool {
  background: #fff; border: 1px solid rgba(27,31,34,0.06); border-radius: var(--radius-sm);
  padding: 26px 12px; display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-size: 14px; color: #1B1F22; font-weight: 500;
  transition: transform .3s ease, border-color .3s ease;
}
.tool img { width: 26px; height: 26px; object-fit: contain; }
[data-theme="dark"] .tool img[src*="chatgpt"] { filter: invert(1); }

/* ===== About ===== */
.about { max-width: 1360px; margin: 0 auto; padding: var(--section-pad) 32px; }
.about-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: center; }
.about-portrait { position: relative; aspect-ratio: 1/1.02; display: flex; align-items: center; justify-content: center; }
.about-portrait img { position: relative; z-index: 1; width: 88%; height: auto; object-fit: contain; display: block; filter: drop-shadow(0 24px 36px rgba(20,24,27,0.2)); }
.about-copy .section-title { text-align: left; margin: 0 0 24px; }
.about-copy p { font-size: 16.5px; line-height: 1.7; color: var(--body-text); margin: 0 0 18px; }
.stats {
  background: var(--green); border-radius: 22px; padding: 30px 20px;
  display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; margin: 14px 0 32px;
}
.stat-value { font-family: var(--font-serif); font-size: 32px; color: var(--accent-bright); font-weight: 600; }
.stat-label { font-size: 11.5px; letter-spacing: 0.08em; color: var(--green-pale-2); margin-top: 6px; }

.readiness { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 28px; }
.about-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; }
.readiness-badge {
  flex: 1 1 140px;
  background: #fff; border: 1px solid rgba(27,31,34,0.06); border-radius: var(--radius-sm);
  padding: 14px 12px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
}
.readiness-icon { color: var(--green-light); }
.readiness-label { font-size: 13px; font-weight: 600; color: var(--ink-strong); }
.readiness-sub { font-size: 11px; color: var(--muted); }

/* ===== Contact ===== */
.contact { padding: 0 32px 32px; }
.contact-card {
  max-width: 1360px; margin: 0 auto; background: var(--green); border-radius: 40px; padding: 72px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px;
}
.contact-copy .section-title { text-align: left; margin: 0 0 22px; font-weight: 600; }
.contact-copy p { font-size: 16.5px; line-height: 1.65; color: #C6D2D6; max-width: 380px; margin: 0 0 36px; }
.contact-links { display: flex; flex-direction: column; gap: 16px; color: var(--green-pale); font-size: 15px; }
.contact-links div { display: flex; align-items: center; gap: 10px; }
.contact-links a { text-decoration: none; }
.contact-links a:hover { color: var(--accent-bright); text-decoration: underline; }
.contact-links svg { flex-shrink: 0; color: var(--green-lighter); }
.contact-form { background: var(--cream); border-radius: 28px; padding: 40px; }
.contact-form label {
  display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; color: var(--green); margin-bottom: 8px;
}
.contact-form input, .contact-form textarea {
  width: 100%; box-sizing: border-box; border: 1px solid rgba(27,31,34,0.12);
  padding: 14px 20px; font-size: 15px; margin-bottom: 22px; font-family: inherit; background: #fff;
}
.contact-form input { border-radius: var(--radius-pill); }
.contact-form textarea { border-radius: 20px; resize: vertical; margin-bottom: 26px; }
.contact-form button { color: var(--accent-ink); font-weight: 700; font-size: 15.5px; padding: 17px; }
.form-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { margin: 14px 0 0; font-size: 14px; text-align: center; min-height: 20px; }
.form-status.is-success { color: var(--accent); }
.form-status.is-error { color: #B3403A; }

footer {
  padding: 0 32px 40px;
  font-size: 13.5px;
  color: var(--muted);
}
.footer-inner {
  max-width: 1360px; margin: 0 auto;
  border-top: 1px solid rgba(120,126,130,0.25);
  padding-top: 40px;
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  text-align: center;
}
.footer-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-serif); font-weight: 600; font-size: 18px; color: var(--ink-strong);
}
.footer-brand .brand-mark { background: var(--green); color: var(--cream); }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; font-size: 14px; }
.footer-nav a { text-decoration: none; color: var(--body-text); font-weight: 500; }
.footer-nav a:hover { color: var(--accent); }
.footer-links { display: flex; justify-content: center; gap: 20px; }
.footer-links a { color: var(--muted); text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--accent); }
.footer-meta {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 24px;
}
.back-to-top { color: var(--accent); text-decoration: none; font-weight: 600; }
.back-to-top:hover { text-decoration: underline; }

/* ===== Responsive ===== */
@media (max-width: 1200px) {
  .hero-portrait { min-height: 560px; }
  .hero-portrait img { max-width: 440px; }
}

@media (max-width: 900px) {
  :root { --section-pad: 56px; }
  .nav-links { display: none; }
  .nav-actions .btn-solid { display: none; }
  .hero, .about-grid, .process-grid, .contact-card { grid-template-columns: 1fr; }
  .grid-6 { grid-template-columns: repeat(2, 1fr); }
  .project-card { flex-basis: 100%; aspect-ratio: auto; height: 420px; }
  .projects-track { scroll-snap-type: x mandatory; scroll-behavior: smooth; }
  .hero-portrait { min-height: auto; margin-top: 8px; }
  .hero-portrait img { max-width: 380px; margin: 0 auto; }
}


/* ===== Premium polish: scroll, selection, focus, press states, stagger ===== */
html { scroll-padding-top: 104px; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

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

html { scrollbar-color: var(--green-light) transparent; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--green-light); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--green); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.btn:active { transform: translateY(-1px) scale(0.98); }
.icon-btn:active { transform: scale(0.92); }
.carousel-arrow:active { transform: translateY(-50%) scale(0.92); }
.project-flip-btn:active { transform: scale(0.95); }

/* Staggered entrance for grouped items (indices set in script.js) */
@keyframes fadeUpStagger {
  from { opacity: 0; transform: translateY(14px); }
}
.tools.is-visible .tool,
.about.is-visible .readiness-badge {
  animation: fadeUpStagger .5s var(--ease) both;
  animation-delay: calc(var(--stagger-i, 0) * 45ms);
}

@media (prefers-reduced-motion: reduce) {
  .tools.is-visible .tool,
  .about.is-visible .readiness-badge { animation: none; }
}

/* ===== GSAP motion system (html.gsap-on set by script.js when GSAP loads + motion OK) =====
   Disables the CSS drivers GSAP replaces so nothing double-eases the same properties. */
html.gsap-on .fade-in-up { animation: none; }
html.gsap-on .word-inner { transition: none; }
html.gsap-on .reveal { opacity: 1; transform: none; transition: none; }
html.gsap-on .tools.is-visible .tool,
html.gsap-on .about.is-visible .readiness-badge { animation: none; }
html.gsap-on .bob { animation: none; }
html.gsap-on .blob-hero { animation: none; }
/* Applied to entrance-tween targets while GSAP drives them, so element transitions
   (hover lifts, flip, tab fades) can't intercept the inline styles mid-tween. */
.gsap-animating { transition: none !important; }
/* Magnetic buttons: GSAP owns transform; CSS keeps only filter/shadow feedback */
html.gsap-on .btn.magnetic { transition: filter .3s ease, box-shadow .3s ease; }
html.gsap-on .btn.magnetic:hover { transform: none; }
