/* =============================================================
   ISHTAR WEB DEVELOPMENT — Main Stylesheet
   ─────────────────────────────────────────────────────────────
   Structure:
   1. CSS Variables (Light + Dark Themes)
   2. Reset & Base
   3. Typography
   4. Layout Utilities
   5. Navbar
   6. Hero
   7. Projects Grid
   8. About
   9. Contact
   10. Footer
   11. Scroll-Up Button
   12. Animations & Transitions
   13. Responsive Breakpoints
   ============================================================= */

/* ─── 1. CSS VARIABLES ──────────────────────────────────────── */
:root {
  /* Palette — Light */
  --bg: #f5f4f0;
  --bg-2: #eceae4;
  --surface: #ffffff;
  --border: #d9d6ce;
  --text: #1a1917;
  --text-muted: #6b6760;
  --accent: #c8a96e; /* warm gold */
  --accent-dark: #a8893e;
  --accent-rgb: 200, 169, 110;

  /* Typography */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'DM Sans', system-ui, sans-serif;

  /* Spacing scale */
  --sp-xs: 0.25rem;
  --sp-sm: 0.5rem;
  --sp-md: 1rem;
  --sp-lg: 1.75rem;
  --sp-xl: 3rem;
  --sp-2xl: 5rem;

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-lg: 20px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 0.18s;
  --dur-mid: 0.35s;
  --dur-slow: 0.65s;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.07), 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.09), 0 2px 6px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.07);

  /* Navbar height (used for offset) */
  --nav-h: 72px;
}

/* Dark theme overrides */
[data-theme='dark'] {
  --bg: #111110;
  --bg-2: #1a1917;
  --surface: #232220;
  --border: #2e2c29;
  --text: #f0ede7;
  --text-muted: #8a8680;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
}

/* Auto dark from OS preference (when no manual toggle) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #111110;
    --bg-2: #1a1917;
    --surface: #232220;
    --border: #2e2c29;
    --text: #f0ede7;
    --text-muted: #8a8680;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
  }
}

/* ─── 2. RESET & BASE ────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition:
    background-color var(--dur-mid) var(--ease),
    color var(--dur-mid) var(--ease);
  overflow-x: hidden;
}

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

/* Focus styles — accessibility */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ─── 3. TYPOGRAPHY ─────────────────────────────────────────── */
h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 5rem);
}
h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
}
h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
}

p {
  max-width: 65ch;
}

.label {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ─── 4. LAYOUT UTILITIES ───────────────────────────────────── */
.container {
  width: min(90%, 1180px);
  margin-inline: auto;
}

.section {
  padding-block: var(--sp-2xl);
}

.section-header {
  margin-bottom: var(--sp-xl);
}

.section-header .label {
  margin-bottom: var(--sp-sm);
}

/* Page header band — used on About, Projects, Contact inner pages */
.page-header {
  padding-top: calc(var(--nav-h) + var(--sp-2xl));
  padding-bottom: var(--sp-xl);
}

/* Intro paragraph below h1 on inner pages */
.intro-text {
  color: var(--text-muted);
  margin-top: var(--sp-md);
  font-size: 1.05rem;
}

/* ─── CENTERED GRID ───────────────────────────────────────────
   Used for: "What We Do" (home) and "How We Work" (about).
   Renders items in a 3-column flex layout. Any orphan items
   on the last row are automatically centred because the parent
   uses justify-content:center.

   To change column count: update flex-basis calc() below and
   the responsive overrides in section 13.
──────────────────────────────────────────────────────────────── */
.centered-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-lg);
  justify-content: center; /* centres full rows AND orphan last row */
}

/* Each item occupies exactly 1/3 of the width minus gaps */
.centered-grid > * {
  flex: 0 0 calc((100% - 2 * var(--sp-lg)) / 3);
  max-width: calc((100% - 2 * var(--sp-lg)) / 3);
}

/* ─── SERVICE CARD (home "What We Do") ──────────────────────── */
.svc-card {
  padding: var(--sp-xl) var(--sp-lg);
}

/* Service icon — colour matches accent; size is consistent */
.svc-icon {
  width: 28px;
  height: 28px;
  stroke: var(--accent);
  margin-bottom: var(--sp-md);
  display: block;
}

.svc-card h3 {
  font-size: 1.1rem;
  margin-bottom: var(--sp-sm);
}

.svc-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: none;
}

/* ─── PROCESS STEP (about "How We Work") ────────────────────── */
.process-step {
  padding: var(--sp-lg);
}

/* Step number label (01, 02…) */
.step-num {
  color: var(--text-muted);
  font-size: 0.65rem;
  margin-bottom: var(--sp-sm);
}

.process-step h3 {
  font-size: 1rem;
  margin-bottom: var(--sp-sm);
}

.process-step p {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: none;
}

/* ─── CTA BAND ───────────────────────────────────────────────
   Centred call-to-action section used on home and projects pages.
──────────────────────────────────────────────────────────────── */
.cta-band {
  background: var(--bg-2);
  text-align: center;
}

.cta-band .container {
  max-width: 600px;
}

.cta-band h2 {
  margin-bottom: var(--sp-md);
}
.cta-band p {
  color: var(--text-muted);
  margin-inline: auto;
  margin-bottom: var(--sp-xl);
}

/* Values section spacing on About page */
.values-block {
  margin-top: var(--sp-xl);
  margin-bottom: var(--sp-xl);
}

.values-block .label {
  margin-bottom: var(--sp-md);
  display: block;
}

/* Large button variant used on Contact CTA */
/* .btn-lg {
  font-size: 1rem;
  padding: 16px 36px;
} */

/* ─── 5. NAVBAR ─────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: transparent;
  transition:
    background var(--dur-mid) var(--ease),
    box-shadow var(--dur-mid) var(--ease),
    backdrop-filter var(--dur-mid) var(--ease);
}

/* Scrolled state */
#navbar.scrolled {
  background: rgba(var(--bg, 245, 244, 240), 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
}

/* Dark theme navbar backdrop */
[data-theme='dark'] #navbar.scrolled {
  background: rgba(17, 17, 16, 0.88);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) #navbar.scrolled {
    background: rgba(17, 17, 16, 0.88);
  }
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* ─── LOGO ───────────────────────────────────────────────────
   Logo image + text fallback.
   TO ADD YOUR LOGO: place logo.png (or logo.svg) at:
     /assets/img/logo.png
   The image shows when present; the text "Ishtar." shows as
   fallback via onerror if the file is missing.
   Recommended logo size: height 36px, any width.
───────────────────────────────────────────────────────────── */
.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: opacity var(--dur-fast) var(--ease);
}

.nav-logo:hover {
  opacity: 0.75;
}

/* Logo image */
.nav-logo-img {
  height: 80px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* Footer logo */
.footer-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.footer-logo-img {
  height: 80px;
  width: auto;
  object-fit: contain;
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-xl);
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding-bottom: 2px;
  transition: color var(--dur-fast) var(--ease);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width var(--dur-mid) var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Nav right: lang + toggle + hamburger */
.nav-right {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}

/* Language selector */
.lang-select {
  appearance: none;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 4px 28px 4px 10px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236b6760'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition:
    border-color var(--dur-fast),
    color var(--dur-fast),
    background-color var(--dur-mid);
}

.lang-select:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* Dark mode: solid dark background so text is always legible */
[data-theme='dark'] .lang-select {
  background-color: var(--bg-2);
  color: var(--text);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .lang-select {
    background-color: var(--bg-2);
    color: var(--text);
  }
}

/* Dark mode toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  width: 44px;
  height: 24px;
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 3px;
  position: relative;
  transition:
    border-color var(--dur-fast),
    background var(--dur-mid);
  flex-shrink: 0;
}

.theme-toggle::before {
  content: '';
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-muted);
  transition:
    transform var(--dur-mid) var(--ease-bounce),
    background var(--dur-mid) var(--ease);
}

[data-theme='dark'] .theme-toggle::before,
.theme-is-dark .theme-toggle::before {
  transform: translateX(20px);
  background: var(--accent);
}

/* Sun/moon icons via aria-label change only; icons injected by JS */
.theme-toggle .toggle-icon {
  position: absolute;
  right: 5px;
  font-size: 10px;
  pointer-events: none;
  transition: opacity var(--dur-fast);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition:
    transform var(--dur-mid) var(--ease),
    opacity var(--dur-fast) var(--ease),
    width var(--dur-mid) var(--ease);
}

.hamburger span:nth-child(1) {
  width: 24px;
}
.hamburger span:nth-child(2) {
  width: 18px;
}
.hamburger span:nth-child(3) {
  width: 24px;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
  width: 24px;
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
  width: 24px;
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: var(--sp-lg) var(--sp-xl);
  z-index: 999;
  flex-direction: column;
  gap: var(--sp-md);
  box-shadow: var(--shadow-md);
  transform: translateY(-10px);
  opacity: 0;
  transition:
    transform var(--dur-mid) var(--ease),
    opacity var(--dur-mid) var(--ease);
}

.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
}

.mobile-menu a {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-muted);
  padding-block: var(--sp-sm);
  border-bottom: 1px solid var(--border);
  transition: color var(--dur-fast);
}

.mobile-menu a:last-child {
  border-bottom: none;
}
.mobile-menu a:hover {
  color: var(--accent);
}

/* ─── 6. HERO ───────────────────────────────────────────────── */
#hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-h);
}

/* Decorative background grain */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(
      ellipse 70% 55% at 80% 40%,
      rgba(var(--accent-rgb), 0.08) 0%,
      transparent 60%
    ),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  background-size:
    100% 100%,
    256px 256px;
  pointer-events: none;
}

/* Floating geometric accent */
.hero-shape {
  position: absolute;
  right: -80px;
  top: 15%;
  width: clamp(280px, 40vw, 560px);
  aspect-ratio: 1;
  border-radius: 38% 62% 63% 37% / 41% 44% 56% 59%;
  background: radial-gradient(
    circle at 40% 40%,
    rgba(var(--accent-rgb), 0.13),
    rgba(var(--accent-rgb), 0.03)
  );
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  animation: morphBlob 14s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes morphBlob {
  0% {
    border-radius: 38% 62% 63% 37% / 41% 44% 56% 59%;
  }
  33% {
    border-radius: 58% 42% 44% 56% / 54% 36% 64% 46%;
  }
  66% {
    border-radius: 30% 70% 58% 42% / 66% 44% 56% 34%;
  }
  100% {
    border-radius: 50% 50% 38% 62% / 48% 60% 40% 52%;
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-lg);
  opacity: 0;
  animation: fadeSlideUp 0.7s var(--ease) 0.2s forwards;
}

.hero-label::before {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--accent);
}

.hero-title {
  margin-bottom: var(--sp-lg);
  opacity: 0;
  animation: fadeSlideUp 0.7s var(--ease) 0.4s forwards;
}

.hero-title em {
  font-style: italic;
  color: var(--accent);
}

.hero-slogan {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-muted);
  margin-bottom: var(--sp-xl);
  max-width: 48ch;
  opacity: 0;
  animation: fadeSlideUp 0.7s var(--ease) 0.6s forwards;
}

.hero-cta {
  display: flex;
  gap: var(--sp-md);
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeSlideUp 0.7s var(--ease) 0.8s forwards;
}

/* ─── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 13px 28px;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition:
    transform var(--dur-fast) var(--ease-bounce),
    box-shadow var(--dur-fast) var(--ease),
    background var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease);
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--accent);
  color: #111;
  border-color: var(--accent);
}

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

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ─── 7. PROJECTS GRID ──────────────────────────────────────────
   CARD SIZING STRATEGY:
   - Flexbox grid: 3 columns at full width, 2 at tablet, 1 at mobile
   - All cards share the same computed width (no auto-stretching)
   - justify-content:center means any orphan cards on the last row
     are automatically centred instead of stretching to fill gaps
   - Each card is flex-column so the body always grows to equal height
   TO CHANGE COLUMN COUNT: update the flex-basis calc() below and
   the responsive overrides at the bottom of the file.
──────────────────────────────────────────────────────────────── */
#projects {
  background: var(--bg-2);
}

/* Flex wrapper — centres all rows including any orphan last row */
.projects-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-lg);
  justify-content: center;
}

/* Fixed card width: 3 per row, gap deducted proportionally
   Formula: (100% - (columns-1) × gap) / columns               */
.projects-grid .project-card {
  flex: 0 0 calc((100% - 2 * var(--sp-lg)) / 3);
  max-width: calc((100% - 2 * var(--sp-lg)) / 3);
}

/* Project card — flex column so body grows to fill card height */
.project-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--dur-mid) var(--ease-bounce),
    box-shadow var(--dur-mid) var(--ease);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

/* Card image: fixed 16/9 ratio, never shrinks */
.card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--dur-slow) var(--ease);
}

.project-card:hover .card-img img {
  transform: scale(1.05);
}

/* Placeholder shown when project image is missing */
.card-img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bg-2) 0%, var(--border) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-img-placeholder svg {
  width: 40px;
  height: 40px;
  opacity: 0.3;
  color: var(--text-muted);
}

/* Category tag badge overlaid on card image */
.card-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--surface);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  backdrop-filter: blur(6px);
  pointer-events: none; /* tag never captures hover/click */
}

/* Card body: flex column, grows to fill card, arrow always at bottom */
.card-body {
  padding: var(--sp-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-body h3 {
  font-size: 1.1rem;
  margin-bottom: var(--sp-sm);
  transition: color var(--dur-fast);
}

.project-card:hover .card-body h3 {
  color: var(--accent);
}

/* Description — flex:1 pushes card-arrow to the bottom */
.card-body p {
  flex: 1;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: none;
  margin-bottom: 0;
}

/* "View project →" at the bottom of every card */
.card-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--sp-md);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
  transition: gap var(--dur-fast) var(--ease);
}

.project-card:hover .card-arrow {
  gap: 10px;
}

/* ─── 8. ABOUT ──────────────────────────────────────────────── */

/* Large standalone page title replacing the old h1+label pair */
.about-page-title {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 7vw, 6rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-top: 0;
}
#about .about-grid {
  display: grid;
  grid-template-columns: 1fr; /* single column — image stacks above text */
  gap: var(--sp-xl);
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: var(--sp-md);
  font-size: 1.02rem;
}

.about-text p strong {
  color: var(--text);
  font-weight: 600;
}

/* .about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-md);
  margin-top: var(--sp-xl);
} */

.stat-item {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-lg);
  transition:
    border-color var(--dur-fast),
    transform var(--dur-fast) var(--ease-bounce);
}

.stat-item:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.stat-item strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-item span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* About image */
.about-visual {
  position: relative;
}

.about-img-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/7; /* wide banner when on top */
  background: var(--bg-2);
  border: 1px solid var(--border);
  position: relative;
  max-height: 360px;
}

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

/* Decorative accent box */
.about-visual::before {
  content: '';
  position: absolute;
  bottom: -16px;
  right: -16px;
  width: 60%;
  height: 60%;
  background: rgba(var(--accent-rgb), 0.08);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  z-index: -1;
}

/* Values list */
.values-list {
  margin-top: var(--sp-lg);
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.values-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-sm);
  font-size: 0.95rem;
  color: var(--text-muted);
}

.values-list li::before {
  content: '—';
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ─── 9. CONTACT ────────────────────────────────────────────────
   Compact layout — items are close together, not spread wide.
   To adjust spacing: change the margin/gap values below.
──────────────────────────────────────────────────────────────── */

/* Section background */
.contact-section {
  background: var(--bg-2);
}

/* Centred container, max 580px wide */
.contact-inner {
  max-width: 580px;
  margin-inline: auto;
  text-align: center;
}

/* "Write to us directly" sub-label above email */
.contact-sub-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--sp-sm); /* tight gap before email */
}

/* Email address link */
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
  margin-bottom: var(--sp-md); /* was var(--sp-xl) — now much tighter */
  transition:
    color var(--dur-fast),
    border-color var(--dur-fast);
}

.contact-email:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* "or find us on" divider line */
.contact-divider {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  margin-block: var(--sp-md); /* tight top and bottom */
  max-width: 400px;
  margin-inline: auto;
}

.contact-divider::before,
.contact-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.contact-divider span {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Social links row */
.social-links {
  display: flex;
  justify-content: center;
  gap: var(--sp-sm); /* tighter gap between pills */
  flex-wrap: wrap;
  margin-bottom: var(--sp-md); /* tight gap before CTA */
}

/* Individual social pill */
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 16px; /* slightly smaller than before */
  transition:
    color var(--dur-fast),
    border-color var(--dur-fast),
    transform var(--dur-fast) var(--ease-bounce);
}

.social-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.social-link svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* Bottom CTA block */
.contact-cta {
  margin-top: var(--sp-lg); /* was var(--sp-2xl) — much tighter */
  padding-top: var(--sp-lg);
  border-top: 1px solid var(--border);
}

.contact-cta p {
  color: var(--text-muted);
  margin-inline: auto;
  margin-bottom: var(--sp-md);
}

/* ─── 10. FOOTER ────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding-block: var(--sp-lg);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
  flex-wrap: wrap;
}

.footer-logo {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.footer-logo span {
  color: var(--accent);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ─── 11. SCROLL-UP BUTTON ───────────────────────────────────── */
#scroll-up {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 500;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #111;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition:
    opacity var(--dur-mid) var(--ease),
    transform var(--dur-mid) var(--ease),
    background var(--dur-fast),
    box-shadow var(--dur-fast);
}

#scroll-up.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#scroll-up:hover {
  background: var(--accent-dark);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

#scroll-up svg {
  width: 18px;
  height: 18px;
}

/* ─── 12. ANIMATIONS ────────────────────────────────────────── */

/* Base reveal state (applied by JS) */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity var(--dur-slow) var(--ease),
    transform var(--dur-slow) var(--ease);
}

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

/* Stagger children */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity var(--dur-slow) var(--ease),
    transform var(--dur-slow) var(--ease);
}

.reveal-stagger.visible > *:nth-child(1) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.05s;
}
.reveal-stagger.visible > *:nth-child(2) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.12s;
}
.reveal-stagger.visible > *:nth-child(3) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.19s;
}
.reveal-stagger.visible > *:nth-child(4) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.26s;
}
.reveal-stagger.visible > *:nth-child(5) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.33s;
}
.reveal-stagger.visible > *:nth-child(6) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.4s;
}
.reveal-stagger.visible > *:nth-child(7) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.47s;
}
.reveal-stagger.visible > *:nth-child(8) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.54s;
}

/* Keyframes */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Divider line */
.divider {
  width: 48px;
  height: 2px;
  background: var(--accent);
  margin-bottom: var(--sp-lg);
}

/* ─── 13. RESPONSIVE ─────────────────────────────────────────────
   Breakpoints:
   ≥ 1400px  Large desktop  — extra breathing room
   ≤ 900px   Tablet         — 2-column grids, hamburger nav
   ≤ 600px   Mobile         — 1-column grids, stacked buttons
──────────────────────────────────────────────────────────────── */

/* Tablet: ≤ 900px */
@media (max-width: 900px) {
  /* Hide desktop nav links, show hamburger */
  .nav-links {
    display: none;
  }
  .hamburger {
    display: flex;
  }

  .about-visual::before {
    display: none;
  }

  /* Switch all centred grids to 2 columns at tablet
     (services, process steps, project cards)               */
  .centered-grid > *,
  .projects-grid .project-card {
    flex: 0 0 calc((100% - 1 * var(--sp-lg)) / 2);
    max-width: calc((100% - 1 * var(--sp-lg)) / 2);
  }
}

/* Mobile: ≤ 600px */
@media (max-width: 600px) {
  :root {
    --nav-h: 60px;
  }

  /* Stack hero CTAs vertically */
  .hero-cta {
    flex-direction: column;
  }
  .btn {
    width: 100%;
    justify-content: center;
  }

  /* Single column for all grids on mobile */
  .centered-grid > *,
  .projects-grid .project-card {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* Stats grid stays 2-col on mobile (it's compact enough) */
  /* .about-stats {
    grid-template-columns: 1fr 1fr;
  } */

  /* Footer stacks on mobile */
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  #scroll-up {
    bottom: 20px;
    right: 20px;
  }
}

/* Large screens: ≥ 1400px */
@media (min-width: 1400px) {
  :root {
    --sp-2xl: 7rem;
  }
}

/* ─── Shared placeholder for About image ─── */
.img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  background: linear-gradient(145deg, var(--bg-2), var(--border));
  color: var(--text-muted);
  font-size: 0.8rem;
}

.img-placeholder svg {
  width: 48px;
  height: 48px;
  opacity: 0.25;
}
