/* ==========================================================================
   Shunisi.uz — design tokens
   ========================================================================== */

:root {
  --ink: #12262b;
  --amber: #f5a524;
  --paper: #fbf9f4;
  --muted: #5c6b70;

  --bg: var(--paper);
  --bg-soft: #f2efe4;
  --surface: #ffffff;
  --surface-alt: #f5f2e9;
  --border: #e7e2d3;
  --text: var(--ink);
  --text-muted: var(--muted);
  --text-faint: #8fa0a1;

  --primary: var(--amber);
  --primary-2: #ffc15c;
  --primary-dark: #cf8712;
  --primary-tint: #fbe7c2;
  --on-primary: var(--ink);

  --green: #2f8f5b;
  --green-tint: #e2f3e8;

  --shadow-sm: 0 1px 2px rgba(18, 38, 43, 0.05), 0 1px 3px rgba(18, 38, 43, 0.05);
  --shadow-md: 0 8px 24px rgba(18, 38, 43, 0.08);
  --shadow-lg: 0 20px 48px rgba(18, 38, 43, 0.14);
  --shadow-primary: 0 12px 28px rgba(245, 165, 36, 0.32);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --font-body: 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-head: 'Quicksand', -apple-system, sans-serif;

  --container: 1180px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0e1b1f;
  --bg-soft: #0a1518;
  --surface: #12262b;
  --surface-alt: #182f35;
  --border: #244046;
  --text: var(--paper);
  --text-muted: #a9babc;
  --text-faint: #6d8285;

  --primary-tint: rgba(245, 165, 36, 0.16);
  --green-tint: rgba(47, 143, 91, 0.18);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
  --shadow-primary: 0 16px 32px rgba(245, 165, 36, 0.3);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1b1f;
    --bg-soft: #0a1518;
    --surface: #12262b;
    --surface-alt: #182f35;
    --border: #244046;
    --text: var(--paper);
    --text-muted: #a9babc;
    --text-faint: #6d8285;

    --primary-tint: rgba(245, 165, 36, 0.16);
    --green-tint: rgba(47, 143, 91, 0.18);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
    --shadow-primary: 0 16px 32px rgba(245, 165, 36, 0.3);
    color-scheme: dark;
  }
}

/* ==========================================================================
   Reset
   ========================================================================== */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }
input, textarea, button { font-family: inherit; font-size: 1rem; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0; }

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

section { position: relative; }

/* ==========================================================================
   Reusable bits
   ========================================================================== */

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--primary);
  background: var(--primary-tint);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
}

.section-head {
  max-width: 620px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 14px; }
.section-head p { color: var(--text-muted); font-size: 1.05rem; line-height: 1.6; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}

.grid { display: grid; gap: 24px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.98rem;
  border: 1px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: var(--on-primary);
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 34px rgba(245, 165, 36, 0.4); }

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }

.btn-sm { padding: 10px 20px; font-size: 0.9rem; }
.btn-block { width: 100%; }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background-color .25s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 24px;
}

.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); }
.logo-mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: block;
  flex-shrink: 0;
}
.logo-text { font-weight: 700; font-size: 1.25rem; color: var(--text); }
.logo-text .dot { color: var(--primary); }

.main-nav ul { display: flex; align-items: center; gap: 4px; }
.nav-link {
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color .2s ease, background-color .2s ease;
}
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--surface-alt); }

.header-actions { display: flex; align-items: center; gap: 12px; }

.theme-toggle {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--primary); color: var(--primary); }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.menu-trigger {
  display: none;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}
.menu-trigger span {
  width: 18px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}
.menu-trigger.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-trigger.active span:nth-child(2) { opacity: 0; }
.menu-trigger.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding: 176px 0 100px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -220px; right: -160px;
  width: 640px; height: 640px;
  background: radial-gradient(circle, rgba(245,165,36,0.22), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
  z-index: -1;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  margin-bottom: 22px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-text {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 540px;
  margin-bottom: 36px;
}

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 48px; }

.hero-stats { display: flex; gap: 40px; flex-wrap: wrap; }
.hero-stat { display: flex; flex-direction: column; gap: 2px; }
.hero-stat-num { font-family: var(--font-head); font-weight: 700; font-size: 1.6rem; }
.hero-stat-label { font-size: 0.86rem; color: var(--text-muted); }

/* --- hero dashboard mock --- */

.hero-visual { display: flex; justify-content: center; }

.mock-panel {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: perspective(1400px) rotateY(-6deg) rotateX(2deg);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: perspective(1400px) rotateY(-6deg) rotateX(2deg) translateY(0); }
  50% { transform: perspective(1400px) rotateY(-6deg) rotateX(2deg) translateY(-14px); }
}

.mock-panel-head {
  display: flex;
  gap: 6px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.mock-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.mock-dot:nth-child(1) { background: #ff5f56; }
.mock-dot:nth-child(2) { background: #ffbd2e; }
.mock-dot:nth-child(3) { background: #27c93f; }

.mock-panel-body { padding: 22px; display: flex; flex-direction: column; gap: 16px; }

.mock-card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  width: 48%;
}
.mock-panel-body > .mock-card-1 { margin-right: 4%; }
.mock-card-1, .mock-card-2 { display: inline-flex; }

.mock-icon {
  width: 32px; height: 32px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
}
.mock-icon-violet { background: var(--primary-tint); color: var(--primary); }
.mock-icon-green { background: var(--green-tint); color: var(--green); }

.mock-card-num { font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; }
.mock-card-label { font-size: 0.78rem; color: var(--text-muted); }

.mock-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 90px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
}
.mock-chart span {
  flex: 1;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, var(--primary-2), var(--primary));
  opacity: 0.85;
}
.mock-chart span:nth-child(6) { opacity: 1; }

.mock-list {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px 14px;
}
.mock-list-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-size: 0.85rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.mock-list-row:last-child { border-bottom: none; }
.mock-list-row span:nth-child(2) { flex: 1; }
.mock-list-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.mock-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--green);
  background: var(--green-tint);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

/* ==========================================================================
   Services
   ========================================================================== */

.services { padding: 100px 0; }
.services-grid { grid-template-columns: repeat(3, 1fr); }

.service-card { padding: 32px 28px; }
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: transparent; }

.service-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.icon-violet, .icon-green, .icon-pink { background: var(--primary-tint); color: var(--primary); }
.icon-blue, .icon-cyan, .icon-orange { background: var(--surface-alt); color: var(--text); border: 1px solid var(--border); }

.service-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.service-card p { color: var(--text-muted); line-height: 1.65; font-size: 0.96rem; }

/* ==========================================================================
   About
   ========================================================================== */

.about { padding: 40px 0 110px; }

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-content h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 18px; }
.about-content > p { color: var(--text-muted); line-height: 1.75; margin-bottom: 28px; font-size: 1.03rem; }

.feature-list { display: flex; flex-direction: column; gap: 16px; }
.feature-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 600;
  font-size: 0.98rem;
}
.feature-check {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--green-tint);
  color: var(--green);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.stat-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.stat-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.stat-tile:nth-child(2) { margin-top: 24px; }
.stat-tile:nth-child(4) { margin-top: -24px; }

.stat-icon {
  width: 40px; height: 40px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
}

.stat-num { font-family: var(--font-head); font-weight: 700; font-size: 1.7rem; }
.stat-label { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }

/* ==========================================================================
   Portfolio
   ========================================================================== */

.portfolio { padding: 40px 0 110px; }
.portfolio-grid { grid-template-columns: repeat(3, 1fr); }

.portfolio-card { overflow: hidden; display: flex; flex-direction: column; }
.portfolio-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }

.portfolio-thumb { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--surface-alt); border-bottom: 1px solid var(--border); }
.portfolio-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .4s ease; }
.portfolio-card:hover .portfolio-thumb img { transform: scale(1.04); }

.portfolio-tag {
  position: absolute;
  top: 14px; left: 14px;
  background: rgba(18, 38, 43, 0.72);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  backdrop-filter: blur(6px);
}

.portfolio-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
}

.portfolio-body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.portfolio-body h3 { font-size: 1.1rem; }
.portfolio-body p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.6; flex: 1; }

.portfolio-stack { display: flex; gap: 8px; flex-wrap: wrap; }
.portfolio-stack span {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-tint);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.portfolio-card-placeholder .portfolio-body p { color: var(--text-faint); }

.portfolio-card-clickable { cursor: pointer; }
.portfolio-card-clickable:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

.portfolio-view {
  position: absolute;
  inset: 0;
  top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: linear-gradient(0deg, rgba(18,38,43,0.82), rgba(18,38,43,0));
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .25s ease, transform .25s ease;
}
.portfolio-card-clickable:hover .portfolio-view,
.portfolio-card-clickable:focus-visible .portfolio-view { opacity: 1; transform: translateY(0); }

.portfolio-card-cta {
  background: var(--ink);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.portfolio-cta-inner { padding: 40px 30px; text-align: center; color: var(--paper); }
.portfolio-cta-inner h3 { color: var(--paper); margin-bottom: 10px; }
.portfolio-cta-inner p { color: rgba(251,249,244,0.75); margin-bottom: 22px; font-size: 0.94rem; }

/* ==========================================================================
   Contact
   ========================================================================== */

.contact { padding: 40px 0 120px; }

.contact-inner {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: flex-start;
}

.contact-info h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 16px; }
.contact-info > p { color: var(--text-muted); line-height: 1.7; margin-bottom: 30px; font-size: 1.02rem; }

.contact-methods { display: flex; flex-direction: column; gap: 14px; }
.contact-method {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 600;
  padding: 8px 4px;
  transition: color .2s ease, transform .2s ease;
}
.contact-method:hover { color: var(--primary); transform: translateX(4px); }
.contact-method-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--primary-tint);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.contact-form-wrap { padding: 36px; }

.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field label { font-size: 0.85rem; font-weight: 700; color: var(--text-muted); }

.field input, .field textarea {
  width: 100%;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  color: var(--text);
  resize: vertical;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-tint);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-faint); }

#cf-submit { position: relative; margin-top: 6px; }
.btn-spinner { display: none; animation: spin 0.8s linear infinite; }
#cf-submit.loading .btn-label { visibility: hidden; }
#cf-submit.loading .btn-spinner { display: block; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

.form-note { text-align: center; font-size: 0.82rem; color: var(--text-faint); margin-top: 16px; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  padding-top: 64px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}

.footer-brand p { color: var(--text-muted); margin-top: 14px; line-height: 1.6; max-width: 320px; font-size: 0.94rem; }

.footer-links, .footer-social { display: flex; flex-direction: column; gap: 12px; }
.footer-links h5, .footer-social h5 { font-size: 0.9rem; color: var(--text); margin-bottom: 6px; }
.footer-links a { color: var(--text-muted); font-size: 0.94rem; transition: color .2s ease; }
.footer-links a:hover { color: var(--primary); }

.social-icons { display: flex; gap: 10px; }
.social-icons a {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: color .2s ease, border-color .2s ease, transform .2s ease;
}
.social-icons a:hover { color: var(--primary); border-color: var(--primary); transform: translateY(-3px); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 22px 24px;
  text-align: center;
}
.footer-bottom p { color: var(--text-faint); font-size: 0.85rem; }

/* ==========================================================================
   Toast
   ========================================================================== */

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translate(-50%, 24px);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 22px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-weight: 600;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
  z-index: 999;
  max-width: 90vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.success { border-color: var(--green); }
.toast.error { border-color: #ef4444; }

/* ==========================================================================
   Project detail modal
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 8, 14, 0.6);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.modal-overlay.open { opacity: 1; visibility: visible; }

.modal-box {
  position: relative;
  width: 100%;
  max-width: 760px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transform: translateY(24px) scale(0.98);
  transition: transform .25s ease;
}
.modal-overlay.open .modal-box { transform: translateY(0) scale(1); }

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  z-index: 2;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { color: var(--primary); border-color: var(--primary); }

.modal-gallery {
  position: relative;
  aspect-ratio: 16/9.5;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
}
.modal-gallery img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(18, 38, 43, 0.55);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
  transition: background-color .2s ease;
}
.modal-nav:hover { background: rgba(18, 38, 43, 0.8); }
.modal-prev { left: 14px; }
.modal-next { right: 14px; }
.modal-gallery.single .modal-nav,
.modal-gallery.single .modal-dots { display: none; }

.modal-dots {
  position: absolute;
  bottom: 14px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border-radius: var(--radius-pill);
  background: rgba(18, 38, 43, 0.55);
  backdrop-filter: blur(4px);
}
.modal-dots button {
  width: 7px; height: 7px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.5);
  padding: 0;
}
.modal-dots button.active { background: #fff; width: 20px; border-radius: 4px; }

.modal-content { padding: 30px 32px 32px; }
.modal-tag { margin-bottom: 14px; position: static; background: var(--primary-tint); color: var(--primary); }
.modal-content h3 { font-size: 1.4rem; margin-bottom: 12px; }
.modal-content > p { color: var(--text-muted); line-height: 1.7; font-size: 1rem; margin-bottom: 18px; }

.modal-contact {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.modal-contact span { font-weight: 600; color: var(--text-muted); font-size: 0.94rem; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 992px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 460px; margin: 0 auto; }
  .hero { padding-top: 150px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .about-inner { grid-template-columns: 1fr; gap: 48px; }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-inner { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .main-nav { display: none; }
  .menu-trigger { display: flex; }

  .main-nav.open {
    display: block;
    position: fixed;
    top: 76px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 24px;
    box-shadow: var(--shadow-md);
  }
  .main-nav.open ul { flex-direction: column; align-items: stretch; gap: 4px; }
  .main-nav.open .nav-link { display: block; padding: 12px 16px; }

  .header-actions .btn { display: none; }

  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

  .services-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .stat-tile:nth-child(2), .stat-tile:nth-child(4) { margin-top: 0; }

  .form-row-2 { grid-template-columns: 1fr; }
  .contact-form-wrap { padding: 26px; }

  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .hero { padding: 140px 0 70px; }
  .hero-stats { gap: 20px; }
  .mock-panel { max-width: 100%; }

  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-box { max-width: 100%; max-height: 92vh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .modal-content { padding: 24px 20px 26px; }
  .modal-contact { justify-content: flex-start; }
}
