/* ==========================================================================
   MectarisTech — styles.css
   Premium, dark-mode-oriented design system. No framework, no external
   fonts/icons/CDNs (CSP: style-src 'self', script-src 'self' — everything
   ships from this origin). Mobile-first, then progressively enhanced.
   ========================================================================== */

:root {
  color-scheme: dark;

  /* ---- Surfaces (dark-oriented, with a light band for rhythm) ---- */
  --bg-void: #06070a;
  --bg-base: #0a0b10;
  --bg-surface: #12141c;
  --bg-surface-2: #181b26;
  --bg-light: #f4f3ef;
  --bg-light-2: #ebe9e3;

  /* ---- Text ---- */
  --text-primary: #f5f6f8;
  --text-secondary: #a6abba;
  --text-tertiary: #6f7383;
  --text-on-light: #16171d;
  --text-on-light-muted: #55586a;

  /* ---- Borders ---- */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-on-light: rgba(20, 20, 30, 0.1);

  /* ---- Brand accent: single indigo-violet family, used deliberately ---- */
  --accent-300: #a9b4ff;
  --accent-400: #8a93ff;
  --accent-500: #6a6bf0;
  --accent-600: #5850e0;
  --accent-700: #4640b8;
  --accent-glow: rgba(106, 107, 240, 0.45);
  --gradient-brand: linear-gradient(135deg, #6a6bf0 0%, #8b5cf6 100%);
  --gradient-brand-soft: linear-gradient(135deg, rgba(106, 107, 240, 0.16), rgba(139, 92, 246, 0.10));

  --success-500: #34d399;
  --error-500: #f87171;
  --error-bg: rgba(248, 113, 113, 0.1);
  --success-bg: rgba(52, 211, 153, 0.1);

  /* ---- Type ---- */
  --font-display: -apple-system, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI",
    ui-sans-serif, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: -apple-system, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI",
    ui-sans-serif, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Code", Consolas, monospace;

  /* ---- Radius / shadow / motion ---- */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 999px;

  --shadow-card: 0 1px 1px rgba(0, 0, 0, 0.2), 0 12px 32px -16px rgba(0, 0, 0, 0.55);
  --shadow-elevated: 0 24px 64px -20px rgba(0, 0, 0, 0.65);
  --shadow-glow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 24px 70px -16px var(--accent-glow);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 180ms;
  --dur-med: 420ms;
  --dur-slow: 800ms;

  --container: 1240px;
  --container-narrow: 820px;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;
  --space-7: 9rem;
}

/* ---------------------------------------------------------------------- */
/* Reset / base                                                            */
/* ---------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-wrap: break-word;
  word-break: break-word;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-2);
  font-weight: 650;
  color: var(--text-primary);
}
h1 { font-size: clamp(2.6rem, 6.2vw, 5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(2rem, 4.2vw, 3rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); letter-spacing: -0.01em; }

p { margin: 0 0 var(--space-2); color: var(--text-secondary); }
p:last-child { margin-bottom: 0; }

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

ul { list-style: none; margin: 0; padding: 0; }

button { font-family: inherit; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container-narrow { max-width: var(--container-narrow); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0; padding: 0; margin: -1px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--accent-500);
  color: #fff;
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius-sm);
  z-index: 200;
  transition: top var(--dur-fast) var(--ease-out);
  font-weight: 600;
}
.skip-link:focus { top: 1rem; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent-300);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Eyebrow / labels used across sections */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-300);
  margin: 0 0 var(--space-2);
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gradient-brand);
  box-shadow: 0 0 12px var(--accent-glow);
}
.section-alt .eyebrow,
.section-light .eyebrow { color: var(--accent-600); }

.section-lede {
  max-width: 60ch;
  color: var(--text-secondary);
  font-size: 1.08rem;
}
.section-head {
  max-width: 46rem;
  margin-bottom: var(--space-5);
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.lede-center { margin-left: auto; margin-right: auto; }

/* ---------------------------------------------------------------------- */
/* Buttons                                                                 */
/* ---------------------------------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.7rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 30px 80px -18px var(--accent-glow); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  border-color: var(--border-strong);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { border-color: var(--accent-300); background: rgba(255, 255, 255, 0.06); transform: translateY(-2px); }

.section-light .btn-ghost {
  background: rgba(20, 20, 30, 0.03);
  color: var(--text-on-light);
  border-color: var(--border-on-light);
}
.section-light .btn-ghost:hover { background: rgba(20, 20, 30, 0.06); }

.btn-lg { padding: 1.05rem 2.1rem; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

.btn-arrow { transition: transform var(--dur-fast) var(--ease-out); }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ---------------------------------------------------------------------- */
/* Navbar                                                                  */
/* ---------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.1rem 0;
  transition: background var(--dur-med) var(--ease-out), border-color var(--dur-med) var(--ease-out),
    padding var(--dur-med) var(--ease-out), backdrop-filter var(--dur-med) var(--ease-out);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(10, 11, 16, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--border-subtle);
  padding: 0.75rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.brand-mark {
  display: inline-flex;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--accent-600);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 1px 2px rgba(0, 0, 0, 0.35);
}
.brand-mark svg { margin: auto; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 2.1rem;
}
.site-nav a:not(.btn) {
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.4rem 0.1rem;
  position: relative;
  transition: color var(--dur-fast) var(--ease-out);
}
.site-nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 1px;
  background: var(--accent-300);
  transition: right var(--dur-med) var(--ease-out);
}
.site-nav a:not(.btn):hover { color: var(--text-primary); }
.site-nav a:not(.btn):hover::after { right: 0; }

.nav-links { display: flex; align-items: center; gap: 2.1rem; }
.nav-actions { display: flex; align-items: center; gap: 0.75rem; }

.lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
}
.lang-switch-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.lang-switch-btn:hover { color: var(--text-primary); }
.lang-switch-btn.is-active { background: var(--accent-600); color: #fff; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle-box { display: flex; flex-direction: column; gap: 4px; width: 18px; }
.nav-toggle-line {
  display: block; height: 2px; width: 100%;
  background: var(--text-primary);
  transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .site-nav {
    position: fixed;
    inset: 0;
    top: 68px;
    background: rgba(8, 9, 13, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: var(--space-3) 1.5rem;
    gap: 0;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out), visibility var(--dur-med);
  }
  .site-nav.is-open { opacity: 1; transform: translateY(0); visibility: visible; pointer-events: auto; }
  .site-nav .nav-links {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    width: 100%;
  }
  .site-nav .nav-links a { padding: 1.05rem 0.25rem; border-bottom: 1px solid var(--border-subtle); font-size: 1.05rem; }
  .site-nav .nav-actions { margin-top: var(--space-3); flex-direction: column; align-items: stretch; }
  .site-nav .nav-actions .btn { width: 100%; }
  .site-nav .nav-actions .lang-switch { align-self: center; }
}
@media (min-width: 901px) { .nav-toggle { display: none; } }

/* ---------------------------------------------------------------------- */
/* Sections / theming bands                                                */
/* ---------------------------------------------------------------------- */
.section { position: relative; padding: var(--space-6) 0; background: var(--bg-base); }
.section-surface { background: var(--bg-surface); }
.section-light { background: var(--bg-light); color: var(--text-on-light); }
.section-light h2, .section-light h3, .section-light p { color: var(--text-on-light); }
.section-light p { color: var(--text-on-light-muted); }
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-subtle) 20%, var(--border-subtle) 80%, transparent);
}

/* Reveal-on-scroll (progressive enhancement; content is visible without JS) */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
[data-reveal="scale"] { transform: translateY(0) scale(0.94); }
[data-reveal="scale"].is-visible { transform: scale(1); }
.no-js [data-reveal] { opacity: 1; transform: none; }

/* ---------------------------------------------------------------------- */
/* Hero                                                                    */
/* ---------------------------------------------------------------------- */
.hero {
  padding-top: calc(var(--space-7) + 2rem);
  padding-bottom: var(--space-6);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 55% at 78% 8%, rgba(106, 107, 240, 0.28), transparent 60%),
    radial-gradient(45% 40% at 8% 30%, rgba(139, 92, 246, 0.16), transparent 65%);
}
.hero-grid-lines {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(var(--border-subtle) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(60% 60% at 60% 20%, black, transparent 75%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  align-items: center;
}
.hero-inner > * { min-width: 0; }
.hero-copy { max-width: 40rem; }
.hero-heading { margin-bottom: var(--space-3); }
.hero-heading .grad {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 34rem;
  margin-bottom: var(--space-4);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: var(--space-4); }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  font-size: 0.85rem;
  color: var(--text-tertiary);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 0.5rem; }
.hero-meta svg { width: 14px; height: 14px; color: var(--success-500); }

/* --- Hero visual: floating browser + device mockup, built from CSS/SVG --- */
.hero-visual {
  position: relative;
  min-height: 420px;
}
.mock-stage {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  perspective: 1400px;
}
.browser-mockup {
  position: relative;
  border-radius: var(--radius-md);
  background: var(--bg-surface-2);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-elevated);
  overflow: hidden;
}
.browser-mockup .browser-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-subtle);
}
.browser-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.browser-bar .dot:nth-child(1) { background: #f87171; opacity: 0.7; }
.browser-bar .dot:nth-child(2) { background: #fbbf24; opacity: 0.7; }
.browser-bar .dot:nth-child(3) { background: #34d399; opacity: 0.7; }
.browser-bar .addr {
  margin-left: 0.6rem;
  flex: 1;
  height: 16px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
}

.hero-mock-primary {
  transform: rotate3d(1, -1, 0, 6deg) rotateZ(-1.5deg);
  animation: floatY 7s var(--ease-out) infinite;
}
.hero-mock-secondary {
  position: absolute;
  width: 46%;
  right: -6%;
  bottom: -12%;
  transform: rotate3d(1, -1, 0, 8deg) rotateZ(2deg);
  animation: floatY 8s var(--ease-out) infinite;
  animation-delay: 0.6s;
  box-shadow: var(--shadow-elevated);
}
.hero-badge {
  position: absolute;
  top: -8%;
  left: -8%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  backdrop-filter: blur(14px);
  font-size: 0.82rem;
  font-weight: 600;
  animation: floatY 6s var(--ease-out) infinite;
  animation-delay: 1.1s;
  box-shadow: var(--shadow-card);
}
.hero-badge .pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success-500);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18);
}

.mockup-block { border-radius: 5px; background: rgba(255, 255, 255, 0.06); }
.mockup-body { padding: 1.1rem; display: grid; gap: 0.6rem; }
.mockup-row-nav { display: flex; gap: 0.4rem; margin-bottom: 0.3rem; }
.mockup-row-nav .mockup-block { height: 8px; width: 34px; }
.mockup-hero-block { height: 64px; background: var(--gradient-brand-soft); border-radius: 8px; margin-bottom: 0.2rem; }
.mockup-line { height: 8px; }
.mockup-line.w-60 { width: 60%; }
.mockup-line.w-40 { width: 40%; }
.mockup-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-top: 0.3rem; }
.mockup-cards .mockup-block { height: 38px; border-radius: 7px; }
.mockup-hero-block-sm { height: 34px; }

@keyframes floatY {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -14px; }
}

@media (min-width: 980px) {
  .hero-inner { grid-template-columns: 1.05fr 0.95fr; gap: var(--space-6); }
  .hero-visual { min-height: 480px; }
}

/* ---------------------------------------------------------------------- */
/* Social proof                                                            */
/* ---------------------------------------------------------------------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-3);
  margin: var(--space-4) 0 var(--space-5);
  padding: var(--space-4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
}
.stat-tile { text-align: center; padding: 0.5rem; }
.stat-value {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: block;
}
.stat-label { font-size: 0.88rem; color: var(--text-tertiary); margin-top: 0.25rem; }

.testimonial-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
.testimonial-card {
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--border-strong);
  transition: transform var(--dur-med) var(--ease-out), border-color var(--dur-med) var(--ease-out), background var(--dur-med) var(--ease-out);
}
.testimonial-card:not(.is-placeholder) { border-style: solid; }
.testimonial-card:hover { transform: translateY(-4px); background: rgba(255, 255, 255, 0.05); }
.testimonial-quote { font-size: 1.02rem; color: var(--text-primary); margin-bottom: var(--space-2); font-style: italic; }
.testimonial-card.is-placeholder .testimonial-quote { color: var(--text-tertiary); }
.testimonial-person { display: flex; align-items: center; gap: 0.75rem; }
.testimonial-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--gradient-brand-soft);
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.testimonial-name { font-weight: 600; font-size: 0.92rem; color: var(--text-primary); }
.testimonial-role { font-size: 0.82rem; color: var(--text-tertiary); }

@media (min-width: 780px) {
  .testimonial-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------------------------------------------------------------------- */
/* Services — bento grid (deliberately not five identical cards)          */
/* ---------------------------------------------------------------------- */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-top: var(--space-5);
}
.bento-card {
  position: relative;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: transform var(--dur-med) var(--ease-out), border-color var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out);
}
.bento-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: var(--gradient-brand-soft);
  opacity: 0;
  transition: opacity var(--dur-med) var(--ease-out);
  z-index: 0;
}
.bento-card:hover { transform: translateY(-6px); border-color: var(--border-strong); box-shadow: var(--shadow-card); }
.bento-card:hover::before { opacity: 1; }
.bento-card > * { position: relative; z-index: 1; }
.bento-card.lg { padding: var(--space-5) var(--space-4); }

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--accent-300);
  margin-bottom: var(--space-2);
}
.bento-card h3 { margin-bottom: 0.5rem; }
.bento-card p { font-size: 0.96rem; }

@media (min-width: 780px) {
  .bento-grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 1fr; }
  .bento-card.lg { grid-column: span 2; }
  .bento-card.sm { grid-column: span 2; }
}
@media (min-width: 1100px) {
  .bento-grid { grid-template-columns: repeat(6, 1fr); }
  .bento-card.lg { grid-column: span 3; }
  .bento-card.sm { grid-column: span 2; }
}

/* ---------------------------------------------------------------------- */
/* Portfolio                                                               */
/* ---------------------------------------------------------------------- */
.portfolio-group { margin-top: var(--space-6); }
.portfolio-group:first-of-type { margin-top: 0; }
.portfolio-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}
.portfolio-group-head h3 { margin: 0; font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
.portfolio-group-head p { margin: 0; max-width: 42ch; }

.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
.project-card {
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: transform var(--dur-med) var(--ease-out), border-color var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out);
}
.project-card:hover { transform: translateY(-6px); border-color: var(--border-strong); box-shadow: var(--shadow-elevated); }

.project-preview {
  aspect-ratio: 16 / 10.5;
  padding: 1.1rem;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-preview .browser-mockup { width: 100%; transition: transform var(--dur-med) var(--ease-out); }
.project-card:hover .project-preview .browser-mockup { transform: scale(1.03) translateY(-2px); }

/* Per-industry preview palettes (abstract, no stock photography) */
.theme-restaurant .project-preview { background: linear-gradient(160deg, #241712, #150d0a); }
.theme-restaurant .mockup-hero-block { background: linear-gradient(135deg, rgba(230, 160, 80, 0.35), rgba(150, 70, 40, 0.25)); }
.theme-restaurant .mockup-block { background: rgba(230, 180, 130, 0.14); }

.theme-business .project-preview { background: linear-gradient(160deg, #0c1b22, #081116); }
.theme-business .mockup-hero-block { background: linear-gradient(135deg, rgba(70, 170, 200, 0.32), rgba(40, 110, 150, 0.22)); }
.theme-business .mockup-block { background: rgba(120, 200, 220, 0.14); }

.theme-personal-brand .project-preview { background: linear-gradient(160deg, #17171c, #0c0c10); }
.theme-personal-brand .mockup-hero-block { background: linear-gradient(135deg, rgba(210, 190, 140, 0.3), rgba(140, 120, 80, 0.2)); }
.theme-personal-brand .mockup-block { background: rgba(220, 210, 190, 0.12); }

.theme-reference .project-preview { background: linear-gradient(160deg, #14151c, #0b0c11); }
.theme-reference .project-preview .placeholder-mark {
  color: var(--text-tertiary);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-full);
  padding: 0.5rem 1rem;
}

.project-body { padding: var(--space-3); }
.project-industry {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-300);
  margin-bottom: 0.5rem;
}
.project-body h4 { margin: 0 0 0.4rem; font-family: var(--font-display); font-size: 1.15rem; font-weight: 650; }
.project-body p { font-size: 0.94rem; margin-bottom: var(--space-2); }
.project-tech { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: var(--space-2); }
.tech-pill {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.28rem 0.65rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--accent-300);
}
.project-link svg { width: 15px; height: 15px; transition: transform var(--dur-fast) var(--ease-out); }
.project-link:hover svg { transform: translate(2px, -2px); }

@media (min-width: 780px) { .project-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .project-grid.grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* ---------------------------------------------------------------------- */
/* Process — light contrast band, numbered timeline                       */
/* ---------------------------------------------------------------------- */
.process-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: var(--space-5);
  border-top: 1px solid var(--border-on-light);
}
.process-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-3);
  align-items: start;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border-on-light);
  position: relative;
}
.process-index {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(20, 20, 30, 0.18);
  line-height: 1;
}
.process-item h3 { margin-bottom: 0.35rem; color: var(--text-on-light); }
.process-item p { color: var(--text-on-light-muted); max-width: 42ch; }
.process-item::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  height: 2px; width: 0;
  background: var(--gradient-brand);
  transition: width var(--dur-slow) var(--ease-out);
}
.process-item.is-visible::after { width: 100%; }

@media (min-width: 780px) {
  .process-list { grid-template-columns: repeat(2, 1fr); border-top: none; }
  .process-item { border-top: 1px solid var(--border-on-light); }
}
@media (min-width: 1100px) {
  .process-list { grid-template-columns: repeat(4, 1fr); }
  .process-item { grid-template-columns: 1fr; border-left: 1px solid var(--border-on-light); border-top: none; padding: 0 var(--space-3); }
  .process-item:first-child { border-left: none; padding-left: 0; }
}

/* ---------------------------------------------------------------------- */
/* Why us — borderless grid with dividers, not boxed cards                */
/* ---------------------------------------------------------------------- */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: var(--space-5);
  border-top: 1px solid var(--border-subtle);
  border-left: 1px solid var(--border-subtle);
}
.feature-item {
  padding: var(--space-4);
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--dur-med) var(--ease-out);
}
.feature-item:hover { background: rgba(255, 255, 255, 0.02); }
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  color: var(--accent-300);
  margin-bottom: var(--space-2);
}
.feature-item h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.feature-item p { font-size: 0.92rem; }

@media (min-width: 700px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------------------------------------------------------------------- */
/* CTA band                                                                */
/* ---------------------------------------------------------------------- */
.cta-section {
  position: relative;
  overflow: hidden;
  background: var(--bg-void);
  padding: var(--space-6) 0;
}
.cta-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 120% at 50% 0%, rgba(106, 107, 240, 0.35), transparent 60%),
    radial-gradient(40% 80% at 85% 100%, rgba(139, 92, 246, 0.22), transparent 60%);
  pointer-events: none;
}
.cta-inner { position: relative; z-index: 1; text-align: center; max-width: 42rem; margin: 0 auto; }
.cta-inner h2 { margin-bottom: var(--space-2); }
.cta-inner p { font-size: 1.1rem; margin-bottom: var(--space-4); }
.cta-inner .btn { margin: 0 auto; }

/* ---------------------------------------------------------------------- */
/* Contact / consultation form                                            */
/* ---------------------------------------------------------------------- */
.contact-section { }
.contact-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-4); align-items: start; }
.contact-grid > * { min-width: 0; }
.contact-intro dl { margin-top: var(--space-3); display: grid; gap: var(--space-2); }
.contact-intro dt { font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent-300); }
.contact-intro dd { margin: 0.15rem 0 0; color: var(--text-secondary); }

.contact-form-wrap {
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
}
.form-row { display: grid; grid-template-columns: 1fr; gap: var(--space-3); }
.form-field { margin-bottom: var(--space-3); }
.form-field label { display: block; font-weight: 600; margin-bottom: 0.45rem; font-size: 0.92rem; }
.required { color: var(--error-500); }
.optional { font-weight: 400; color: var(--text-tertiary); font-size: 0.82rem; }

.form-field input,
.form-field textarea {
  width: 100%;
  font: inherit;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--text-tertiary); }
.form-field textarea { resize: vertical; min-height: 8rem; }
.form-field input:focus,
.form-field textarea:focus { border-color: var(--accent-400); background: rgba(255, 255, 255, 0.05); }
.form-field input[aria-invalid="true"],
.form-field textarea[aria-invalid="true"] { border-color: var(--error-500); background: var(--error-bg); }

.field-error { display: block; min-height: 1.1em; margin-top: 0.4rem; font-size: 0.84rem; color: var(--error-500); }

.form-status { margin: var(--space-2) 0; font-weight: 600; border-radius: var(--radius-sm); }
.form-status:empty { margin: 0; }
.form-status.is-success { color: var(--success-500); background: var(--success-bg); padding: 0.85rem 1rem; }
.form-status.is-error { color: var(--error-500); background: var(--error-bg); padding: 0.85rem 1rem; }

@media (min-width: 900px) {
  .contact-grid { grid-template-columns: 0.85fr 1.15fr; gap: var(--space-6); }
  .form-row-2 { grid-template-columns: 1fr 1fr; }
}
.form-row-2 { display: grid; grid-template-columns: 1fr; gap: 0 var(--space-3); }

/* ---------------------------------------------------------------------- */
/* Footer                                                                  */
/* ---------------------------------------------------------------------- */
.site-footer { background: var(--bg-void); border-top: 1px solid var(--border-subtle); padding: var(--space-5) 0 var(--space-3); }
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
}
.footer-grid > * { min-width: 0; }
.footer-brand-col p { max-width: 32ch; margin-top: 0.75rem; font-size: 0.92rem; }
.footer-col h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-tertiary); margin-bottom: var(--space-2); font-family: var(--font-body); font-weight: 700; }
.footer-col ul { display: grid; gap: 0.6rem; }
.footer-col a { font-size: 0.92rem; color: var(--text-secondary); transition: color var(--dur-fast) var(--ease-out); }
.footer-col a:hover { color: var(--text-primary); }

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: var(--space-3);
  font-size: 0.84rem;
  color: var(--text-tertiary);
}
.footer-social { display: flex; gap: 0.6rem; }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.footer-social a:hover { border-color: var(--accent-400); color: var(--accent-300); transform: translateY(-2px); }
.footer-social svg { width: 16px; height: 16px; }

.footer-bottom-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.footer-admin-link {
  color: var(--text-tertiary);
  font-size: 0.78rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.footer-admin-link:hover { color: var(--text-secondary); border-color: var(--border-subtle); }

@media (min-width: 780px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .footer-bottom { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* ---------------------------------------------------------------------- */
/* Reduced motion                                                          */
/* ---------------------------------------------------------------------- */
.noscript-fallback {
  padding: 2rem;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  font-family: var(--font-body);
  color: #eee;
  background: #0a0b10;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}
