/* ===== CHESS PORTFOLIO — RESET & VARIABLES ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --cream: #f0eeea;
  --dark: #28231D;
  --dark-lighter: #3a342b;
  --green: #7a9e5a;
  --green-dim: rgba(122, 158, 90, 0.15);
  --green-glow: rgba(122, 158, 90, 0.3);
  --font-heading: 'Syne', sans-serif;
  --font-serif: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--dark);
  color: var(--cream);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* ===== LOADER ===== */
.loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--dark);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader__text {
  font-family: var(--font-heading);
  font-size: 2.5rem; font-weight: 700;
  color: var(--cream);
  opacity: 0; animation: fadeUp 0.8s 0.2s forwards;
}
.loader__text span { color: var(--green); }

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

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem 3rem;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}
.navbar.scrolled {
  background: rgba(40, 35, 29, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.navbar__logo {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-heading); font-size: 1.4rem; font-weight: 700;
}
.navbar__logo svg { width: 28px; height: 28px; fill: var(--green); }
.navbar__logo span { color: var(--green); }
.navbar__links {
  display: flex; gap: 2rem;
}
.navbar__links a {
  font-size: 0.85rem; font-weight: 500; letter-spacing: 0.04em;
  text-transform: uppercase; opacity: 0.7;
  transition: opacity 0.3s ease, color 0.3s ease;
}
.navbar__links a:hover { opacity: 1; color: var(--green); }

/* ===== HERO = FULL-SCREEN 3D CHESS BOARD ===== */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; background: var(--dark);
}

/* 3D Board container — fills entire hero */
.hero__board-container {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  perspective: 1200px;
}
.hero__board {
  display: grid; grid-template-columns: repeat(8, 1fr);
  width: 110vmax; height: 110vmax;
  transform: rotateX(55deg) rotateZ(-45deg) scale(1);
  transform-style: preserve-3d;
  pointer-events: none;
}
.hero__board .hsq {
  aspect-ratio: 1; position: relative;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.4s ease;
  transform-style: preserve-3d;
}
.hero__board .hsq--light { background: #f0eeea; }
.hero__board .hsq--dark { background: #b8a88a; }
.hero__board .hsq--from { background: rgba(122, 158, 90, 0.55) !important; }
.hero__board .hsq--to { background: rgba(122, 158, 90, 0.7) !important; }

/* 3D piece styling — elevated off the board with depth */
.hero__board .hsq svg {
  width: 65%; height: 65%;
  pointer-events: none;
  /* Counter-rotate so pieces face camera */
  transform: rotateZ(45deg) rotateX(-55deg) translateZ(20px);
  transform-origin: center bottom;
  /* Multi-layer shadow for 3D depth illusion */
  filter:
    drop-shadow(0 2px 1px rgba(0,0,0,0.3))
    drop-shadow(0 4px 2px rgba(0,0,0,0.25))
    drop-shadow(0 8px 4px rgba(0,0,0,0.2))
    drop-shadow(0 16px 8px rgba(0,0,0,0.15))
    drop-shadow(0 24px 16px rgba(0,0,0,0.1));
  transition: transform 0.3s ease, filter 0.3s ease;
}

/* Piece "base" shadow on the square (faked with pseudo-element) */
.hero__board .hsq--has-piece {
  position: relative;
}
.hero__board .hsq--has-piece::after {
  content: '';
  position: absolute;
  bottom: 12%; left: 20%; right: 20%;
  height: 12%;
  background: radial-gradient(ellipse, rgba(0,0,0,0.35) 0%, transparent 70%);
  border-radius: 50%;
  transform: rotateZ(45deg) rotateX(-55deg) translateZ(1px);
  pointer-events: none;
}

/* Dark overlay so text is readable */
.hero__overlay {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(40,35,29,0.55) 0%, rgba(40,35,29,0.85) 70%);
  pointer-events: none; z-index: 1;
}

/* Game info bar */
.hero__game-info {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  z-index: 3;
  display: flex; align-items: center; gap: 1.5rem;
  background: rgba(40,35,29,0.8); backdrop-filter: blur(12px);
  padding: 0.6rem 1.5rem; border-radius: 50px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.hero__game-player {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; opacity: 0.8;
}
.hero__game-dot {
  width: 10px; height: 10px; border-radius: 50%;
}
.hero__game-dot--white { background: var(--cream); }
.hero__game-dot--black { background: #555; border: 1px solid #888; }
.hero__game-label {
  font-family: 'Courier New', monospace; font-size: 0.85rem;
  color: var(--green); font-weight: 700; letter-spacing: 0.06em;
  min-width: 80px; text-align: center;
}

.hero__content {
  position: relative; z-index: 2;
  text-align: center; max-width: 800px; padding: 0 2rem;
}
.hero__label {
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--green); margin-bottom: 1.5rem; font-weight: 600;
}
.hero__title {
  font-family: var(--font-serif); font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 800; line-height: 1.05; margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}
.hero__title .accent { color: var(--green); font-style: italic; }
.hero__subtitle {
  font-size: 1.1rem; opacity: 0.6; max-width: 500px;
  margin: 0 auto 2.5rem; line-height: 1.7;
}
.hero__cta {
  display: inline-flex; align-items: center; gap: 0.75rem;
  background: var(--green); color: var(--dark);
  padding: 1rem 2.2rem; border-radius: 50px;
  font-weight: 600; font-size: 0.95rem;
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s ease;
}
.hero__cta:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 30px var(--green-glow);
}
.hero__cta svg { width: 18px; height: 18px; }

/* ===== VALUE SECTION (Halaska-style cards) ===== */
.value-section {
  padding: 6rem 2rem; background: var(--cream); color: var(--dark);
  overflow: hidden;
}
.value-section__title {
  font-family: var(--font-heading); font-weight: 800;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  text-align: center; margin-bottom: 4rem; line-height: 1.15;
}
.value-section__title .accent { color: var(--green); }

.value-cards {
  display: flex; gap: 1rem;
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 1rem 0 2rem;
  -ms-overflow-style: none; scrollbar-width: none;
  mask-image: linear-gradient(90deg, transparent 0%, #000 5%, #000 95%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 5%, #000 95%, transparent 100%);
}
.value-cards::-webkit-scrollbar { display: none; }

.value-card {
  flex: 0 0 300px; scroll-snap-align: center;
  background: #fff; border-radius: 28px;
  padding: 3rem 2rem; text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transition: transform 0.4s var(--ease-spring);
}
.value-card:hover { transform: translateY(-6px); }

.value-card__icon {
  width: 120px; height: 120px; margin: 0 auto 1.5rem;
  display: flex; align-items: center; justify-content: center;
}
.value-card__icon svg {
  width: 80px; height: 80px; fill: var(--dark);
  transition: transform 0.6s var(--ease-spring);
}
.value-card:hover .value-card__icon svg {
  transform: scale(1.1) rotate(5deg);
}
.value-card__label {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--green); margin-bottom: 0.3rem; font-weight: 600;
}
.value-card__title {
  font-family: var(--font-heading); font-size: 1.1rem; font-weight: 700;
  margin-bottom: 0.5rem;
}
.value-card__desc {
  font-size: 0.85rem; opacity: 0.6; line-height: 1.5;
}

/* Auto-scroll animation for value cards */
@keyframes autoScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.value-cards--auto {
  display: flex; width: max-content;
  animation: autoScroll 30s linear infinite;
}
.value-cards--auto:hover { animation-play-state: paused; }

/* ===== SPECIALTIES SECTION (Halaska-style) ===== */
.specialties-section {
  padding: 6rem 2rem; background: var(--cream); color: var(--dark);
}
.specialties__inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem;
}

.specialties__col-header {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.specialties__col-label {
  font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.12em; font-weight: 500; opacity: 0.5;
}
.specialties__col-arrow {
  width: 16px; height: 16px; opacity: 0.4;
}
.specialties__col-arrow svg {
  width: 100%; height: 100%; fill: none; stroke: var(--dark); stroke-width: 2;
}

.specialties__list { display: flex; flex-direction: column; }

.specialties__item {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(40, 35, 29, 0.08);
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s var(--ease-out-expo);
}
.specialties__item.visible {
  opacity: 1; transform: translateY(0);
}

.specialties__item-icon {
  width: 32px; height: 32px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.specialties__item-icon svg {
  width: 24px; height: 24px; fill: none; stroke: var(--dark);
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}

/* Icon draw animation */
.specialties__item-icon svg path,
.specialties__item-icon svg circle,
.specialties__item-icon svg rect,
.specialties__item-icon svg line,
.specialties__item-icon svg polyline {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 0.8s ease 0.2s;
}
.specialties__item.visible .specialties__item-icon svg path,
.specialties__item.visible .specialties__item-icon svg circle,
.specialties__item.visible .specialties__item-icon svg rect,
.specialties__item.visible .specialties__item-icon svg line,
.specialties__item.visible .specialties__item-icon svg polyline {
  stroke-dashoffset: 0;
}

.specialties__item-text {
  font-family: var(--font-heading); font-size: 1.15rem;
  font-weight: 600; color: var(--dark);
}

/* ===== CHESS ANIMATION SECTION ===== */
.chess-anim {
  position: relative; padding: 5rem 2rem;
  background: var(--dark); overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.5rem;
}
.chess-anim__wrapper {
  position: relative;
  width: min(480px, 90vw);
}
.chess-anim__board {
  display: grid; grid-template-columns: repeat(8, 1fr);
  width: 100%; aspect-ratio: 1;
  border-radius: 8px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  position: relative;
}
.chess-anim__sq {
  aspect-ratio: 1; position: relative;
  display: flex; align-items: center; justify-content: center;
  font-size: 0;
  transition: background 0.3s ease;
}
.chess-anim__sq--light { background: #f0eeea; }
.chess-anim__sq--dark { background: #b8a88a; }
.chess-anim__sq--from { background: rgba(122, 158, 90, 0.55) !important; }
.chess-anim__sq--to { background: rgba(122, 158, 90, 0.7) !important; }

.chess-anim__sq svg {
  width: 80%; height: 80%;
  pointer-events: none;
  filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.25));
  transition: opacity 0.15s ease;
}

.chess-anim__move-label {
  font-family: 'Courier New', monospace; font-size: 1rem;
  color: var(--cream); opacity: 0.5; letter-spacing: 0.08em;
  text-align: center; min-height: 1.5em;
}

/* ===== ILLUMINATION SECTION ===== */
.illumination-section {
  padding: 10rem 3rem;
  max-width: 900px;
  margin: 0 auto;
  background: var(--dark);
}
.illuminate-text {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3.5vw, 2.8rem);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -0.01em;
}
.illuminate-text .word {
  display: inline-block;
  color: rgba(240, 238, 234, 0.08);
  transition: color 0.5s ease;
  margin-right: 0.3em;
}
.illuminate-text .word.lit {
  color: var(--cream);
}

/* ===== MARQUEE ===== */
.marquee {
  padding: 3rem 0;
  overflow: hidden;
  background: var(--dark);
  border-top: 1px solid rgba(240, 238, 234, 0.06);
  border-bottom: 1px solid rgba(240, 238, 234, 0.06);
}
.marquee__track {
  display: flex;
  gap: 3rem;
  animation: marqueeScroll 25s linear infinite;
  width: max-content;
}
.marquee__item {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  white-space: nowrap;
  color: rgba(240, 238, 234, 0.1);
  transition: color 0.3s;
}
.marquee__item:hover {
  color: var(--green);
}
.marquee__separator {
  color: var(--green);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  display: flex;
  align-items: center;
  opacity: 0.4;
}
@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===== ABOUT SECTION ===== */
.about {
  padding: 6rem 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  max-width: 1200px;
  margin: 0 auto;
  align-items: center;
  background: var(--dark);
  color: var(--cream);
}
/* ===== ABOUT VISUAL — KNIGHT FORK (PUZZLE STYLE) ===== */
.about__visual {
  display: flex;
  align-items: center;
  justify-content: center;
}
.about__diagram {
  position: relative;
  width: 100%;
  max-width: 380px;
}

/* 5x5 Grid Board */
.fork__board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  border: 3px solid rgba(240,238,234,0.12);
}
.fork__sq {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background 0.3s ease;
}
.fork__sq--light { background: #f0eeea; }
.fork__sq--dark  { background: #b8a88a; }

/* Highlighted green square (knight destination) */
.fork__sq.sq--green {
  background: #7a9e5a !important;
}
/* Red attacked squares */
.fork__sq.sq--red {
  background: #e8674a !important;
}
/* Origin square subtle */
.fork__sq.sq--origin {
  background: rgba(122,158,90,0.35) !important;
}

/* Pieces on board — BIG and clear */
.fork__p {
  font-size: clamp(2rem, 5.5vw, 3rem);
  line-height: 1;
  z-index: 2;
  position: relative;
  transition: transform 0.2s ease;
  user-select: none;
}
.fork__p--black { color: #222; }

/* Shaking attacked pieces */
.fork__p.p--shake {
  animation: forkShake 0.3s linear infinite;
}
@keyframes forkShake {
  0%   { transform: translate(0,0) rotate(0); }
  25%  { transform: translate(-2px,1px) rotate(-2deg); }
  50%  { transform: translate(2px,-1px) rotate(2deg); }
  75%  { transform: translate(-1px,-2px) rotate(-1deg); }
  100% { transform: translate(0,0) rotate(0); }
}

/* Floating Knight — positioned absolutely, animated by JS */
.fork__knight {
  position: absolute;
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  color: #fff;
  z-index: 10;
  pointer-events: none;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.4));
  opacity: 0;
  transition: none;
}

/* SVG Arrows overlay */
.fork__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}
.fork__arrow {
  fill: none !important;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.15));
}

/* Label below */
.fork__label {
  text-align: center;
  margin-top: 1rem;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  color: rgba(240,238,234,0.4);
  letter-spacing: 0.5px;
}
.fork__label em {
  color: var(--green);
  font-style: italic;
}
.about__label {
  font-size: 0.8rem; text-transform: uppercase;
  letter-spacing: 0.2em; color: var(--green);
  margin-bottom: 1rem; font-weight: 600;
}
.about__title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800; line-height: 1.1;
  margin-bottom: 1.5rem;
}
.about__title .accent { color: var(--green); }
.about__text {
  font-size: 1rem; line-height: 1.8;
  color: rgba(240, 238, 234, 0.5);
  margin-bottom: 1.5rem;
}
.about__text strong { color: var(--cream); }
.about__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem; margin-top: 2.5rem;
}
.stat__number {
  font-family: var(--font-heading);
  font-size: 2.5rem; font-weight: 800;
  color: var(--green);
}
.stat__label {
  font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(240, 238, 234, 0.35);
  margin-top: 0.25rem;
}

/* ===== PORTFOLIO SECTION ===== */
.portfolio-section {
  padding: 6rem 2rem; background: var(--cream); color: var(--dark);
}
.portfolio-section__header {
  max-width: 1200px; margin: 0 auto 3rem;
  display: flex; align-items: flex-end; justify-content: space-between;
}
.portfolio-section__title {
  font-family: var(--font-heading); font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800; line-height: 1.1;
}
.portfolio-section__title .accent { color: var(--green); }
.portfolio-section__subtitle {
  font-size: 0.85rem; opacity: 0.5;
}

.portfolio-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.portfolio-card {
  position: relative; border-radius: 20px; overflow: hidden;
  aspect-ratio: 4/3; cursor: pointer;
  background: #e8e6e2;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transition: transform 0.4s var(--ease-spring), box-shadow 0.4s ease;
}
.portfolio-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 16px 40px rgba(0,0,0,0.15);
}
.portfolio-card__img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s ease;
}
.portfolio-card:hover .portfolio-card__img {
  transform: scale(1.05);
}
.portfolio-card__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(40,35,29,0.95) 0%, rgba(40,35,29,0.3) 50%, transparent 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.8rem;
  opacity: 0; transition: opacity 0.4s ease;
}
.portfolio-card:hover .portfolio-card__overlay { opacity: 1; }

.portfolio-card__tag {
  font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--green); font-weight: 600; margin-bottom: 0.4rem;
}
.portfolio-card__name {
  font-family: var(--font-heading); font-size: 1.3rem;
  font-weight: 700; color: var(--cream); margin-bottom: 0.4rem;
}
.portfolio-card__desc {
  font-size: 0.8rem; color: rgba(240,238,234,0.7);
  margin-bottom: 1rem; line-height: 1.5;
}
.portfolio-card__btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--green); color: var(--dark);
  padding: 0.6rem 1.4rem; border-radius: 50px;
  font-size: 0.8rem; font-weight: 600;
  transition: transform 0.3s var(--ease-spring);
  width: fit-content;
}
.portfolio-card__btn:hover { transform: scale(1.05); }
.portfolio-card__btn svg { width: 14px; height: 14px; }

/* Coming soon card */
.portfolio-card--placeholder {
  background: repeating-conic-gradient(
    rgba(40,35,29,0.05) 0% 25%, transparent 0% 50%
  ) 0 0 / 40px 40px;
  display: flex; align-items: center; justify-content: center;
  border: 2px dashed rgba(40,35,29,0.15);
}
.portfolio-card--placeholder span {
  font-family: var(--font-heading); font-size: 1rem;
  font-weight: 600; opacity: 0.3;
}

/* ===== PROJECT MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(40,35,29,0.7); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0.4s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }

.modal {
  background: var(--cream); color: var(--dark);
  border-radius: 24px; max-width: 700px; width: 90%;
  max-height: 85vh; overflow-y: auto;
  padding: 2.5rem; position: relative;
  transform: translateY(30px) scale(0.95);
  transition: transform 0.4s var(--ease-spring);
}
.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}
.modal__close {
  position: absolute; top: 1.2rem; right: 1.2rem;
  width: 36px; height: 36px; border-radius: 50%;
  border: none; background: rgba(40,35,29,0.08);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.3s ease;
}
.modal__close:hover { background: rgba(40,35,29,0.15); }
.modal__close svg { width: 16px; height: 16px; stroke: var(--dark); fill: none; stroke-width: 2; }

.modal__images {
  display: flex; gap: 0.75rem; overflow-x: auto;
  margin-bottom: 1.5rem; border-radius: 16px;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none; scrollbar-width: none;
}
.modal__images::-webkit-scrollbar { display: none; }
.modal__images img {
  flex: 0 0 100%; border-radius: 16px; scroll-snap-align: start;
  aspect-ratio: 16/10; object-fit: cover;
}
.modal__tag {
  font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--green); font-weight: 600; margin-bottom: 0.3rem;
}
.modal__name {
  font-family: var(--font-heading); font-size: 1.8rem;
  font-weight: 800; margin-bottom: 0.75rem;
}
.modal__desc {
  font-size: 0.95rem; opacity: 0.7; line-height: 1.7;
  margin-bottom: 1rem;
}
.modal__services {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem;
}
.modal__service-tag {
  font-size: 0.7rem; padding: 0.35rem 0.8rem;
  border-radius: 50px; background: var(--green-dim);
  color: var(--green); font-weight: 600; letter-spacing: 0.03em;
}
.modal__visit {
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: var(--dark); color: var(--cream);
  padding: 0.9rem 2rem; border-radius: 50px;
  font-weight: 600; font-size: 0.9rem;
  transition: transform 0.3s var(--ease-spring), background 0.3s ease;
}
.modal__visit:hover { transform: scale(1.05); background: var(--green); color: var(--dark); }
.modal__visit svg { width: 16px; height: 16px; }

/* ===== PRICING SECTION ===== */
.pricing {
  background: var(--dark);
  padding: 8rem 2rem;
  position: relative;
  overflow: hidden;
}
.pricing::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(122,158,90,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.pricing__container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.pricing__header {
  text-align: center;
  margin-bottom: 4rem;
}
.pricing__label {
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--green);
  display: block;
  margin-bottom: 1rem;
}
.pricing__title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  color: var(--cream);
  margin-bottom: 1rem;
}
.pricing__subtitle {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: rgba(240,238,234,0.5);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Grid */
.pricing__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: stretch;
}

/* Card base */
.pricing__card {
  background: var(--dark-lighter);
  border: 1px solid rgba(240,238,234,0.06);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.4s var(--ease-out-expo), border-color 0.4s ease, box-shadow 0.4s ease;
}
.pricing__card:hover {
  transform: translateY(-8px);
  border-color: rgba(122,158,90,0.25);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 0 40px rgba(122,158,90,0.06);
}

/* Featured card */
.pricing__card--featured {
  background: linear-gradient(165deg, #3a342b 0%, #28231D 100%);
  border-color: var(--green);
  box-shadow: 0 0 40px rgba(122,158,90,0.1), 0 8px 30px rgba(0,0,0,0.3);
  transform: scale(1.04);
}
.pricing__card--featured:hover {
  transform: scale(1.04) translateY(-8px);
  box-shadow: 0 0 60px rgba(122,158,90,0.15), 0 20px 60px rgba(0,0,0,0.4);
}

/* Badge */
.pricing__card-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green);
  color: var(--dark);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0.35rem 1.2rem;
  border-radius: 20px;
  white-space: nowrap;
}

/* Chess piece icon */
.pricing__card-piece {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: 0.2;
  filter: grayscale(1);
  transition: opacity 0.3s ease, filter 0.3s ease, transform 0.3s ease;
}
.pricing__card:hover .pricing__card-piece {
  opacity: 0.5;
  filter: grayscale(0);
  transform: scale(1.1) rotate(-5deg);
}
.pricing__card--featured .pricing__card-piece {
  opacity: 0.4;
  color: var(--green);
  filter: none;
}

/* Header */
.pricing__card-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(240,238,234,0.08);
}
.pricing__card-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--green);
  display: block;
  margin-bottom: 0.3rem;
}
.pricing__card-name {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--cream);
  margin-bottom: 0.8rem;
}
.pricing__card-price {
  display: flex;
  align-items: flex-start;
  gap: 2px;
}
.pricing__card-currency {
  font-family: var(--font-body);
  font-size: 1.2rem;
  color: var(--green);
  margin-top: 0.4rem;
  font-weight: 600;
}
.pricing__card-amount {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  color: var(--cream);
  line-height: 1;
}
.pricing__card--featured .pricing__card-amount {
  color: var(--green);
}
.pricing__card-period {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: rgba(240,238,234,0.4);
  display: block;
  margin-top: 0.3rem;
}

/* Description */
.pricing__card-desc {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: rgba(240,238,234,0.5);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Features list */
.pricing__card-features {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.pricing__card-features li {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: rgba(240,238,234,0.75);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.pricing__check {
  color: var(--green);
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
}
.pricing__x {
  color: rgba(240,238,234,0.2);
  font-size: 0.85rem;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
}
.pricing__feature--disabled {
  opacity: 0.35;
}

/* Button */
.pricing__card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid rgba(240,238,234,0.12);
  background: transparent;
  color: var(--cream);
  width: 100%;
  text-align: center;
}
.pricing__card-btn:hover {
  background: rgba(240,238,234,0.06);
  border-color: rgba(240,238,234,0.25);
  transform: translateY(-2px);
}
.pricing__card-btn--featured {
  background: var(--green);
  color: var(--dark);
  border-color: var(--green);
  font-weight: 600;
}
.pricing__card-btn--featured:hover {
  background: #8bb066;
  border-color: #8bb066;
  box-shadow: 0 6px 25px rgba(122,158,90,0.3);
  color: var(--dark);
}

/* Note */
.pricing__note {
  text-align: center;
  margin-top: 3rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: rgba(240,238,234,0.4);
}
.pricing__note a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.3s ease;
}
.pricing__note a:hover {
  color: #8bb066;
}

/* Pricing responsive */
@media (max-width: 900px) {
  .pricing__grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
    gap: 2rem;
  }
  .pricing__card--featured {
    transform: none;
    order: -1;
  }
  .pricing__card--featured:hover {
    transform: translateY(-8px);
  }
}

/* ===== CTA SECTION ===== */
.cta-section {
  padding: 6rem 2rem; text-align: center;
  background: var(--dark); position: relative; overflow: hidden;
}
.cta-section__board-fade {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  display: grid; grid-template-columns: repeat(8, 1fr);
  width: 500px; opacity: 0.04; pointer-events: none;
}
.cta-section__board-fade .sq { aspect-ratio: 1; }
.cta-section__board-fade .sq--light { background: var(--cream); }

.cta-section__content { position: relative; z-index: 2; }
.cta-section__title {
  font-family: var(--font-heading); font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800; margin-bottom: 1.5rem; line-height: 1.1;
}
.cta-section__title .accent { color: var(--green); }
.cta-section__btn {
  display: inline-flex; align-items: center; gap: 0.75rem;
  background: var(--green); color: var(--dark);
  padding: 1rem 2.5rem; border-radius: 50px;
  font-weight: 700; font-size: 1rem;
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s ease;
}
.cta-section__btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 30px var(--green-glow);
}

/* ===== FOOTER ===== */
.footer {
  padding: 3rem; background: var(--dark);
  border-top: 1px solid rgba(240,238,234,0.06);
}
.footer__inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.footer__copy {
  font-size: 0.8rem; opacity: 0.4;
}
.footer__socials {
  display: flex; gap: 1.5rem;
}
.footer__socials a {
  font-size: 0.8rem; opacity: 0.4;
  transition: opacity 0.3s ease, color 0.3s ease;
}
.footer__socials a:hover { opacity: 1; color: var(--green); }

/* ===== SCROLL REVEAL (enhanced with stagger) ===== */
.reveal {
  opacity: 0; transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.9s var(--ease-out-expo);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }

/* ===== HOW WE WORK — STICKY STACKING CARDS ===== */
.process-section {
  background: var(--dark);
  position: relative;
}
.process__header {
  text-align: center; max-width: 700px;
  margin: 0 auto;
  padding: 6rem 2rem 2rem;
  position: sticky; top: 0; z-index: 1;
  background: var(--dark);
}
.process__label {
  font-size: 0.8rem; text-transform: uppercase;
  letter-spacing: 0.2em; color: var(--green);
  margin-bottom: 1rem; font-weight: 600;
}
.process__title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800; line-height: 1.15;
}
.process__title .accent { color: var(--green); font-style: italic; }

.process__stack {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 2rem 6rem;
  position: relative;
}

.process__card {
  position: sticky;
  top: calc(120px + var(--i) * 30px);
  margin-bottom: 2rem;
  z-index: calc(var(--i) + 2);
}
.process__card-inner {
  display: flex; gap: 2rem; align-items: flex-start;
  background: var(--dark-lighter);
  border: 1px solid rgba(240, 238, 234, 0.08);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
  transition: border-color 0.3s ease, transform 0.3s var(--ease-spring);
}
.process__card-inner:hover {
  border-color: var(--green);
  transform: scale(1.01);
}

.process__card-left {
  flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
}
.process__step-icon {
  width: 56px; height: 56px;
  color: var(--green);
}
.process__step-icon svg {
  width: 100%; height: 100%;
}
.process__card-num {
  font-family: var(--font-serif); font-size: 0.8rem;
  font-weight: 700; color: var(--green); opacity: 0.5;
}
.process__card-right {
  flex: 1;
}
.process__card-title {
  font-family: var(--font-heading); font-size: 1.5rem;
  font-weight: 700; margin-bottom: 0.6rem;
}
.process__card-desc {
  font-size: 0.9rem; opacity: 0.5; line-height: 1.7;
}

/* Subtle scale-down for cards that stack behind */
.process__card[data-step="1"] .process__card-inner { background: #332e27; }
.process__card[data-step="2"] .process__card-inner { background: #3a342b; }
.process__card[data-step="3"] .process__card-inner { background: #413a30; }
.process__card[data-step="4"] .process__card-inner { background: #484036; }

/* ===== ENHANCED GREEN ACCENTS ===== */
/* Green glow line under section titles */
.value-section__title::after,
.process__title::after,
.about__title::after {
  content: '';
  display: block; width: 60px; height: 3px;
  background: var(--green);
  border-radius: 2px;
  margin-top: 1rem;
}
.value-section__title::after { margin: 1rem auto 0; }
.process__title::after { margin: 1rem auto 0; }

/* Green left border on about text */
.about__text {
  border-left: 2px solid var(--green-dim);
  padding-left: 1.2rem;
}

/* Value card green top accent on hover */
.value-card {
  border-top: 3px solid transparent;
}
.value-card:hover {
  border-top-color: var(--green);
}

/* Green gradient glow on CTA section */
.cta-section::before {
  content: '';
  position: absolute; top: -100px; left: 50%; transform: translateX(-50%);
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--green-glow) 0%, transparent 70%);
  pointer-events: none; opacity: 0.3;
}

/* Specialties item green dot on hover */
.specialties__item:hover .specialties__item-icon svg {
  stroke: var(--green);
}
.specialties__item {
  transition: opacity 0.5s ease, transform 0.5s var(--ease-out-expo), padding-left 0.3s ease;
}
.specialties__item:hover {
  padding-left: 0.5rem;
}

/* ===== CINEMATIC PORTFOLIO HOVER ===== */
.portfolio-card__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(40,35,29,0.95) 0%, rgba(40,35,29,0.4) 40%, transparent 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.8rem;
  opacity: 0;
  clip-path: inset(100% 0 0 0);
  transition: clip-path 0.6s var(--ease-out-expo), opacity 0.4s ease;
}
.portfolio-card:hover .portfolio-card__overlay {
  opacity: 1;
  clip-path: inset(0 0 0 0);
}
.portfolio-card__img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.8s var(--ease-out-expo), filter 0.6s ease;
}
.portfolio-card:hover .portfolio-card__img {
  transform: scale(1.08);
  filter: brightness(0.7);
}
.portfolio-card__name {
  font-family: var(--font-serif);
  transform: translateY(20px);
  transition: transform 0.5s var(--ease-out-expo) 0.1s;
}
.portfolio-card:hover .portfolio-card__name {
  transform: translateY(0);
}
.portfolio-card__desc {
  transform: translateY(15px);
  opacity: 0;
  transition: transform 0.5s var(--ease-out-expo) 0.15s, opacity 0.4s ease 0.15s;
}
.portfolio-card:hover .portfolio-card__desc {
  transform: translateY(0);
  opacity: 0.7;
}
.portfolio-card__btn {
  transform: translateY(10px);
  opacity: 0;
  transition: transform 0.5s var(--ease-out-expo) 0.2s, opacity 0.4s ease 0.2s, background 0.3s ease;
}
.portfolio-card:hover .portfolio-card__btn {
  transform: translateY(0);
  opacity: 1;
}

/* ===== SERIF ON KEY HEADINGS ===== */
.portfolio-section__title,
.cta-section__title,
.about__title {
  font-family: var(--font-serif);
}
.cta-section__title .accent { font-style: italic; }

/* ===== SECTION DIVIDERS ===== */
.value-section,
.specialties-section,
.portfolio-section {
  position: relative;
}

/* Green corner accent on process cards */
.process__card-inner::before {
  content: '';
  position: absolute; top: -1px; left: -1px;
  width: 24px; height: 24px;
  border-top: 2px solid var(--green);
  border-left: 2px solid var(--green);
  border-radius: 24px 0 0 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.process__card-inner { position: relative; }
.process__card-inner:hover::before { opacity: 1; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .specialties__inner { gap: 2rem; }
  .about { grid-template-columns: 1fr; gap: 3rem; }
  .process__card-inner { padding: 2rem; }
}

@media (max-width: 768px) {
  /* === GLOBAL MOBILE SAFETY === */
  html, body { overflow-x: hidden; }

  /* === NAVBAR === */
  .navbar { padding: 0.8rem 1rem; }
  .navbar__links { gap: 0.8rem; }
  .navbar__links a { font-size: 0.7rem; letter-spacing: 0.08em; }
  .navbar__logo { font-size: 1rem; }
  .navbar__logo svg { width: 22px; height: 22px; }

  /* === HERO === */
  .hero__content { padding: 0 1.2rem; }
  .hero__title { font-size: clamp(2rem, 9vw, 3.5rem); }
  .hero__subtitle { font-size: 0.85rem; padding: 0 0.5rem; }
  .hero__label { font-size: 0.65rem; letter-spacing: 0.15em; }
  .hero__cta { padding: 0.9rem 2rem; font-size: 0.85rem; }
  .hero__board-container { perspective: 800px; }
  .hero__board {
    transform: rotateX(60deg) rotateZ(0deg) scale(1.2);
    width: 150vw; height: 150vw;
  }
  .hero__board .hsq svg {
    transform: rotateZ(0deg) rotateX(-60deg) translateZ(14px);
    width: 55%; height: 55%;
    filter:
      drop-shadow(0 2px 1px rgba(0,0,0,0.3))
      drop-shadow(0 4px 3px rgba(0,0,0,0.2))
      drop-shadow(0 8px 6px rgba(0,0,0,0.15));
  }
  .hero__board .hsq--has-piece::after {
    transform: rotateZ(0deg) rotateX(-60deg) translateZ(1px);
  }
  .hero__game-info {
    bottom: 0.8rem; left: 50%; transform: translateX(-50%);
    gap: 0.5rem; padding: 0.5rem 0.8rem; font-size: 0.6rem;
    width: max-content; max-width: 90vw;
  }

  /* === VALUE CARDS === */
  .value-card { flex: 0 0 240px; padding: 2rem 1.2rem; }
  .value-section { padding: 4rem 0; }

  /* === HOW WE WORK (Process) === */
  .process-section { padding: 4rem 1rem; }
  .process__header { padding: 0 0.5rem; margin-bottom: 2rem; }
  .process__header h2 { font-size: clamp(1.8rem, 7vw, 2.5rem); }
  .process__card-inner { flex-direction: column; gap: 1rem; padding: 1.5rem; }
  .process__card-left { flex-direction: row; }
  .process__card-title { font-size: 1.2rem; }
  .process__card-desc { font-size: 0.85rem; }

  /* === SPECIALTIES === */
  .specialties { padding: 4rem 1.2rem; }
  .specialties__inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .specialties__title { font-size: clamp(1.5rem, 6vw, 2rem); }

  /* === ILLUMINATION TEXT === */
  .illumination-section { padding: 4rem 1.2rem; min-height: 60vh; }
  .illumination-section p { font-size: clamp(1.2rem, 5vw, 1.8rem) !important; line-height: 1.6 !important; }

  /* === MARQUEE === */
  .marquee { padding: 1.5rem 0; }
  .marquee span { font-size: clamp(1.5rem, 8vw, 3rem); }

  /* === ABOUT === */
  .about { padding: 4rem 1.2rem; grid-template-columns: 1fr; gap: 2.5rem; }
  .about__visual { max-width: 280px; margin: 0 auto; }
  .about__title { font-size: clamp(1.8rem, 7vw, 2.5rem); }
  .about__text { font-size: 0.9rem; }
  .about__stats { gap: 1rem; }
  .stat__number { font-size: 2rem; }
  .stat__label { font-size: 0.65rem; }
  .about__diagram { max-width: 260px; }

  /* === PORTFOLIO === */
  .portfolio-section { padding: 4rem 1.2rem; }
  .portfolio-section__header { flex-direction: column; align-items: flex-start; gap: 0.5rem; padding: 0; }
  .portfolio-section__title { font-size: clamp(1.6rem, 6vw, 2.2rem); }
  .portfolio-grid { grid-template-columns: 1fr; max-width: 100%; margin: 0 auto; gap: 1rem; }
  .portfolio-card { border-radius: 14px; }
  .portfolio-card__overlay { opacity: 0; padding: 1.2rem; }
  .portfolio-card.tapped .portfolio-card__overlay { opacity: 1; }
  .portfolio-card__name { font-size: 1.1rem; }
  .portfolio-card__desc { font-size: 0.75rem; }
  .portfolio-card__tag { font-size: 0.6rem; }

  /* === PRICING === */
  .pricing { padding: 4rem 1.2rem; }
  .pricing__title { font-size: clamp(1.8rem, 7vw, 2.5rem); }
  .pricing__subtitle { font-size: 0.9rem; }
  .pricing__card { padding: 2rem 1.5rem; border-radius: 16px; }
  .pricing__card-amount { font-size: 2.4rem; }
  .pricing__card-name { font-size: 1.5rem; }
  .pricing__card-features li { font-size: 0.82rem; }
  .pricing__card-btn { padding: 0.8rem 1.5rem; font-size: 0.85rem; }

  /* === CTA === */
  .cta-section { padding: 4rem 1.2rem; }
  .cta-section__title { font-size: clamp(1.8rem, 7vw, 2.5rem); }
  .cta-section__btn { padding: 0.9rem 2rem; font-size: 0.9rem; }

  /* === FOOTER === */
  .footer { padding: 2rem 1.2rem; }
  .footer__inner { flex-direction: column; gap: 1.5rem; text-align: center; }

  /* === MODAL === */
  .modal { padding: 1.5rem; border-radius: 16px; margin: 1rem; max-height: 85vh; }
  .modal__name { font-size: 1.3rem; }
}

/* === EXTRA SMALL (iPhone SE, etc) === */
@media (max-width: 380px) {
  .navbar__links { gap: 0.5rem; }
  .navbar__links a { font-size: 0.6rem; }
  .hero__title { font-size: clamp(1.8rem, 8vw, 2.5rem); }
  .hero__game-info { font-size: 0.55rem; padding: 0.4rem 0.6rem; }
  .pricing__card { padding: 1.5rem 1.2rem; }
  .pricing__card-amount { font-size: 2rem; }
  .process__card-inner { padding: 1.2rem; }
  .about__diagram { max-width: 220px; }
  .fork__p { font-size: 1.5rem !important; }
}
