/* ========================================
   KODIMIA — project.css
   ========================================
   Table of Contents:
    1.  Custom Properties
    2.  Reset & Base
    3.  Typography
    4.  Layout
    5.  Components — Buttons
    6.  Components — Cards
    7.  Components — Tags
    8.  Components — Section Headers
    9.  Components — Forms
   10.  Navigation
   11.  Hero
   12.  Services
   13.  Portfolio (compact)
   14.  About
   15.  Process
   16.  Contact
   17.  Footer
   18.  Service Detail Page
   19.  Animations & Reveal
   20.  Responsive — Tablet  (≥ 768px)
   21.  Responsive — Desktop (≥ 1024px)
   22.  Responsive — Large   (≥ 1280px)
   23.  Reduced Motion
   ======================================== */


/* ========================================
   1. CUSTOM PROPERTIES
   ======================================== */

:root {
  /* ---- Palette: Blue + Green ---- */
  --c-blue:           #2563eb;
  --c-blue-dark:      #1d4ed8;
  --c-blue-light:     #3b82f6;
  --c-blue-rgb:       37, 99, 235;

  --c-green:          #10b981;
  --c-green-dark:     #059669;
  --c-green-light:    #34d399;
  --c-green-rgb:      16, 185, 129;

  /* Primary = blue, accent = green */
  --c-primary:        var(--c-blue);
  --c-primary-dark:   var(--c-blue-dark);
  --c-primary-light:  var(--c-blue-light);
  --c-primary-rgb:    var(--c-blue-rgb);

  --c-accent:         var(--c-green);
  --c-accent-dark:    var(--c-green-dark);
  --c-accent-light:   var(--c-green-light);
  --c-accent-rgb:     var(--c-green-rgb);

  /* Dark tones (hero, footer, nav) */
  --c-dark:           #0b1120;
  --c-dark-surface:   #111827;
  --c-dark-surface-2: #1e293b;
  --c-dark-border:    #1e293b;

  /* Light tones (unified section bg) */
  --c-body:           #f8fafc;
  --c-surface:        #ffffff;
  --c-border:         #e2e8f0;

  /* Text */
  --c-text:           #0f172a;
  --c-text-muted:     #64748b;
  --c-text-on-dark:   #f1f5f9;
  --c-text-muted-dk:  #94a3b8;

  /* WhatsApp */
  --c-whatsapp:       #25d366;
  --c-whatsapp-dark:  #1ebe57;

  /* Error / Success */
  --c-error:          #ef4444;
  --c-success:        #10b981;

  /* ---- Typography ---- */
  --ff-sans:  system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
              Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --ff-mono:  'Cascadia Code', 'Fira Code', Consolas, 'Monaco', monospace;

  --fs-xs:    0.75rem;
  --fs-sm:    0.875rem;
  --fs-base:  1rem;
  --fs-md:    1.125rem;
  --fs-lg:    1.25rem;
  --fs-xl:    1.5rem;
  --fs-2xl:   2rem;
  --fs-3xl:   2.5rem;
  --fs-4xl:   3rem;
  --fs-5xl:   4rem;

  --fw-normal:  400;
  --fw-medium:  500;
  --fw-semi:    600;
  --fw-bold:    700;
  --fw-black:   900;

  --lh-tight:   1.15;
  --lh-snug:    1.3;
  --lh-normal:  1.6;

  /* ---- Spacing ---- */
  --sp-xs:  0.25rem;
  --sp-sm:  0.5rem;
  --sp-md:  1rem;
  --sp-lg:  1.5rem;
  --sp-xl:  2rem;
  --sp-2xl: 3rem;
  --sp-3xl: 4rem;
  --sp-4xl: 6rem;
  --sp-5xl: 8rem;

  /* ---- Layout ---- */
  --container-max:     1200px;
  --container-padding: 1.25rem;

  /* ---- Borders ---- */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-full: 9999px;

  /* ---- Shadows ---- */
  --shadow-sm:  0 1px  3px rgba(0,0,0,.06);
  --shadow-md:  0 4px  12px rgba(0,0,0,.08);
  --shadow-lg:  0 10px 30px rgba(0,0,0,.1);
  --shadow-xl:  0 20px 50px rgba(0,0,0,.14);

  /* ---- Transitions ---- */
  --tr-fast: 150ms ease;
  --tr-base: 300ms ease;
  --tr-slow: 500ms ease;

  /* ---- Z-index ---- */
  --z-nav:     1000;
  --z-overlay: 900;
}


/* ========================================
   2. RESET & BASE
   ======================================== */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--ff-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--c-text);
  background: var(--c-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 3px;
}


/* ========================================
   3. TYPOGRAPHY
   ======================================== */

h1, h2, h3, h4 {
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
}


/* ========================================
   4. LAYOUT
   ======================================== */

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

/* --- Unified section: all non-hero sections share same light bg --- */
.section {
  padding: var(--sp-2xl) 0;
  background: var(--c-body);
  color: var(--c-text);
}

/* Subtle divider between sections */
.section + .section {
  border-top: 1px solid var(--c-border);
}


/* ========================================
   5. COMPONENTS — Buttons
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  padding: 0.75rem 1.75rem;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  letter-spacing: 0.02em;
  border-radius: var(--radius-full);
  border: none;
  transition: background var(--tr-base),
              color var(--tr-base),
              box-shadow var(--tr-base),
              transform var(--tr-fast);
  cursor: pointer;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

/* Primary: Blue */
.btn--primary {
  background: var(--c-primary);
  color: #fff;
}
.btn--primary:hover {
  background: var(--c-primary-dark);
  box-shadow: 0 4px 20px rgba(var(--c-primary-rgb), .3);
}

/* Outline: transparent with white border (for dark bgs) */
.btn--outline {
  background: transparent;
  color: #fff;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.4);
}
.btn--outline:hover {
  background: rgba(255,255,255,.1);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.7);
}

/* Outline on light bg */
.btn--outline-light {
  background: transparent;
  color: var(--c-primary);
  box-shadow: inset 0 0 0 2px var(--c-primary);
}
.btn--outline-light:hover {
  background: rgba(var(--c-primary-rgb), .06);
}

/* White btn */
.btn--white {
  background: #fff;
  color: var(--c-primary);
}
.btn--white:hover {
  background: var(--c-body);
  box-shadow: 0 4px 20px rgba(255,255,255,.25);
}

/* WhatsApp btn */
.btn--whatsapp {
  background: var(--c-whatsapp);
  color: #fff;
  border-radius: var(--radius-full);
}
.btn--whatsapp:hover {
  background: var(--c-whatsapp-dark);
  box-shadow: 0 4px 16px rgba(37, 211, 102, .35);
}

/* Size: large */
.btn--lg {
  padding: 0.9rem 2.25rem;
  font-size: var(--fs-base);
}


/* ========================================
   6. COMPONENTS — Cards
   ======================================== */

.card {
  position: relative;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-lg) var(--sp-md);
  text-align: center;
  transition: transform var(--tr-base),
              box-shadow var(--tr-base),
              border-color var(--tr-base);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(var(--c-primary-rgb), .25);
}

/* Card as link */
.card--link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.card__icon {
  width: 36px;
  height: 36px;
  margin: 0 auto var(--sp-sm);
  color: var(--c-primary);
}

.card__icon svg {
  width: 100%;
  height: 100%;
}

.card__title {
  font-size: var(--fs-base);
  font-weight: var(--fw-semi);
  margin-bottom: var(--sp-xs);
  color: var(--c-text);
}

.card__text {
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  line-height: var(--lh-normal);
}

/* Arrow indicator on link cards */
.card__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-top: var(--sp-sm);
  color: var(--c-primary);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity var(--tr-base), transform var(--tr-base);
}

.card__arrow svg {
  width: 18px;
  height: 18px;
}

.card:hover .card__arrow {
  opacity: 1;
  transform: translateX(0);
}


/* ========================================
   7. COMPONENTS — Tags
   ======================================== */

.tag {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--c-primary);
  background: rgba(var(--c-primary-rgb), .08);
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

.tag--green {
  color: var(--c-accent-dark);
  background: rgba(var(--c-green-rgb), .1);
}

.skill-tag {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--c-primary);
  background: rgba(var(--c-primary-rgb), .06);
  border: 1px solid rgba(var(--c-primary-rgb), .12);
  border-radius: var(--radius-full);
  margin: 0.2rem;
}


/* ========================================
   8. COMPONENTS — Section Headers
   ======================================== */

.section__header {
  text-align: center;
  margin-bottom: var(--sp-xl);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.section__tag {
  display: inline-block;
  padding: 0.3rem 1rem;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-accent-dark);
  background: rgba(var(--c-green-rgb), .1);
  border-radius: var(--radius-full);
  margin-bottom: var(--sp-md);
}

.section__title {
  font-size: var(--fs-2xl);
  margin-bottom: var(--sp-md);
  color: var(--c-text);
}

.section__title--left {
  text-align: left;
}

.section__subtitle {
  font-size: var(--fs-md);
  color: var(--c-text-muted);
  line-height: var(--lh-normal);
}


/* ========================================
   9. COMPONENTS — Forms
   ======================================== */

.form-group {
  margin-bottom: var(--sp-lg);
}

.form-group label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--c-text);
  margin-bottom: var(--sp-xs);
}

.form-group .required {
  color: var(--c-error);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--ff-sans);
  font-size: var(--fs-base);
  color: var(--c-text);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  transition: border-color var(--tr-fast), box-shadow var(--tr-fast);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--c-text-muted);
  opacity: 0.6;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(var(--c-primary-rgb), .12);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.form-error {
  display: block;
  margin-top: var(--sp-xs);
  font-size: var(--fs-xs);
  color: var(--c-error);
}


/* ========================================
   10. NAVIGATION
   ======================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  padding: var(--sp-lg) 0;
  transition: background var(--tr-base),
              padding var(--tr-base),
              box-shadow var(--tr-base);
}

.nav.is-scrolled {
  background: rgba(11, 17, 32, .94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  padding: var(--sp-sm) 0;
  box-shadow: 0 1px 20px rgba(0,0,0,.25);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* -- Logo -- */
.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  z-index: calc(var(--z-nav) + 1);
}

.nav__logo-img {
  height: 32px;
  width: auto;
}

.nav__logo-text {
  font-size: var(--fs-xl);
  font-weight: var(--fw-black);
  color: #fff;
  letter-spacing: -0.02em;
}

/* -- Hamburger toggle -- */
.nav__toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: calc(var(--z-nav) + 1);
  padding: var(--sp-sm);
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform var(--tr-base), opacity var(--tr-base);
}

.nav__toggle.is-active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav__toggle.is-active span:nth-child(2) {
  opacity: 0;
}
.nav__toggle.is-active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* -- Overlay (mobile) -- */
.nav__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--tr-base), visibility var(--tr-base);
  z-index: var(--z-overlay);
}

.nav__overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

/* -- Menu (mobile-first: slide-in panel) -- */
.nav__menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  height: 100dvh;
  background: var(--c-dark-surface);
  padding: 6rem var(--sp-xl) var(--sp-xl);
  transform: translateX(100%);
  transition: transform var(--tr-base);
  z-index: var(--z-nav);
  overflow-y: auto;
}

.nav__menu.is-open {
  transform: translateX(0);
}

.nav__list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.nav__link {
  display: block;
  padding: var(--sp-sm) var(--sp-md);
  font-size: var(--fs-md);
  font-weight: var(--fw-medium);
  color: var(--c-text-muted-dk);
  border-radius: var(--radius-md);
  transition: color var(--tr-fast), background var(--tr-fast);
}

.nav__link:hover,
.nav__link.is-active {
  color: #fff;
  background: rgba(255,255,255,.05);
}

.nav__link--cta {
  margin-top: var(--sp-md);
  text-align: center;
  background: var(--c-primary);
  color: #fff;
}
.nav__link--cta:hover {
  background: var(--c-primary-dark);
  color: #fff;
}


/* ========================================
   11. HERO
   ======================================== */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--c-dark);
  overflow: hidden;
  text-align: center;
  color: var(--c-text-on-dark);
}

/* Dot grid pattern */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    circle at 1px 1px,
    rgba(255,255,255,.04) 1px,
    transparent 0
  );
  background-size: 40px 40px;
  pointer-events: none;
}

/* Two-color glow */
.hero::after {
  content: '';
  position: absolute;
  top: 30%;
  left: 50%;
  width: 700px;
  height: 700px;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle at 40% 50%, rgba(var(--c-blue-rgb), .15) 0%, transparent 55%),
    radial-gradient(circle at 65% 55%, rgba(var(--c-green-rgb), .1) 0%, transparent 50%);
  pointer-events: none;
  animation: hero-glow 6s ease-in-out infinite alternate;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

/* -- Badge -- */
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 0.4rem 1.1rem;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-accent-light);
  border: 1px solid rgba(var(--c-green-rgb), .3);
  border-radius: var(--radius-full);
  margin-bottom: var(--sp-xl);
  animation: fade-in-up .8s ease both;
}

.hero__badge-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--c-accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

/* -- Title -- */
.hero__title {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-black);
  line-height: var(--lh-tight);
  margin-bottom: var(--sp-lg);
  animation: fade-in-up .8s ease both .15s;
}

.hero__title-line {
  display: block;
}

.hero__title-accent {
  display: block;
  background: linear-gradient(135deg, var(--c-blue-light) 0%, var(--c-green-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* -- Subtitle -- */
.hero__subtitle {
  font-size: var(--fs-md);
  color: var(--c-text-muted-dk);
  max-width: 540px;
  margin: 0 auto var(--sp-2xl);
  line-height: var(--lh-normal);
  animation: fade-in-up .8s ease both .3s;
}

/* -- Actions -- */
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-md);
  animation: fade-in-up .8s ease both .45s;
}

/* -- Scroll indicator -- */
.hero__scroll {
  position: absolute;
  bottom: var(--sp-xl);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-sm);
  color: var(--c-text-muted-dk);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  animation: fade-in-up .8s ease both 1s;
}

.hero__scroll-line {
  display: block;
  width: 1px;
  height: 40px;
  background: var(--c-text-muted-dk);
  animation: scroll-line 2s ease-in-out infinite;
  transform-origin: top;
}


/* ========================================
   12. SERVICES
   ======================================== */

.services__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-sm);
}


/* ========================================
   13. PORTFOLIO (compact)
   ======================================== */

.portfolio-compact {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-md);
  max-width: 800px;
  margin: 0 auto;
}

.portfolio-compact__item {
  display: flex;
  align-items: center;
  gap: var(--sp-lg);
  padding: var(--sp-md);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  transition: transform var(--tr-base), box-shadow var(--tr-base);
}

.portfolio-compact__item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Thumbnail placeholder */
.portfolio-compact__thumb {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  background: linear-gradient(
    135deg,
    hsl(var(--ph-hue, 220) 45% 92%) 0%,
    hsl(var(--ph-hue, 220) 50% 82%) 100%
  );
  overflow: hidden;
}

.portfolio-compact__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portfolio-compact__body {
  flex: 1;
  min-width: 0;
}

.portfolio-compact__title {
  font-size: var(--fs-base);
  font-weight: var(--fw-semi);
  margin-bottom: 0.15rem;
  color: var(--c-text);
}

.portfolio-compact__text {
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  line-height: var(--lh-normal);
  margin-bottom: var(--sp-xs);
}

.portfolio-compact__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-xs);
}


/* ========================================
   14. ABOUT
   ======================================== */

.about__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3xl);
  align-items: center;
}

.about__photo-placeholder {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 3 / 4;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  overflow: hidden;
}

/* Decorative offset border */
.about__photo-placeholder::after {
  content: '';
  position: absolute;
  inset: -8px;
  border: 2px solid var(--c-accent);
  border-radius: var(--radius-lg);
  transform: translate(10px, 10px);
  z-index: -1;
}

.about__content .section__tag {
  margin-bottom: var(--sp-sm);
}

.about__content .section__title {
  margin-bottom: var(--sp-lg);
}

.about__text {
  font-size: var(--fs-base);
  color: var(--c-text-muted);
  line-height: var(--lh-normal);
  margin-bottom: var(--sp-md);
}

.about__skills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-xs);
  margin-bottom: var(--sp-xl);
}

.about__stats {
  display: flex;
  gap: var(--sp-2xl);
  margin-top: var(--sp-lg);
}

.stat {
  text-align: center;
}

.stat__number {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-black);
  color: var(--c-primary);
  line-height: 1;
}

.stat__plus {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--c-primary);
  line-height: 1;
  margin-left: 2px;
}

.stat > span:first-child,
.stat > span:nth-child(2) {
  display: inline;
}

.stat__label {
  display: block;
  margin-top: var(--sp-xs);
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}


/* ========================================
   15. PROCESS
   ======================================== */

.process__grid {
  display: flex;
  gap: var(--sp-md);
  position: relative;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--sp-sm);
}

/* Hide scrollbar but keep scroll */
.process__grid::-webkit-scrollbar {
  height: 4px;
}
.process__grid::-webkit-scrollbar-track {
  background: transparent;
}
.process__grid::-webkit-scrollbar-thumb {
  background: rgba(var(--c-primary-rgb), .15);
  border-radius: 2px;
}

.process__step {
  flex: 0 0 72%;
  scroll-snap-align: center;
  text-align: center;
  padding: var(--sp-md);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
}

.process__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-family: var(--ff-mono);
  font-size: var(--fs-base);
  font-weight: var(--fw-bold);
  color: var(--c-primary);
  border: 2px solid rgba(var(--c-primary-rgb), .2);
  border-radius: 50%;
  margin-bottom: var(--sp-sm);
  background: var(--c-surface);
}

.process__title {
  font-size: var(--fs-base);
  font-weight: var(--fw-semi);
  margin-bottom: var(--sp-xs);
}

.process__text {
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  line-height: var(--lh-snug);
  max-width: 260px;
  margin: 0 auto;
}


/* ========================================
   16. CONTACT
   ======================================== */

.contact {
  border-top: 1px solid var(--c-border);
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-xl);
}

/* --- Left: info channels --- */
.contact__info {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.contact__channel {
  display: flex;
  gap: var(--sp-md);
  align-items: flex-start;
}

.contact__channel-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(var(--c-primary-rgb), .08);
  color: var(--c-primary);
}

.contact__channel-icon svg {
  width: 24px;
  height: 24px;
}

.contact__channel-icon--wa {
  background: rgba(37, 211, 102, .1);
  color: var(--c-whatsapp);
}

.contact__channel-title {
  font-size: var(--fs-base);
  font-weight: var(--fw-semi);
  margin-bottom: 0.15rem;
}

.contact__channel-text {
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  margin-bottom: var(--sp-sm);
}

/* Social links */
.contact__socials {
  display: flex;
  gap: var(--sp-md);
  margin-top: var(--sp-md);
}

.contact__social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--c-border);
  color: var(--c-text-muted);
  transition: color var(--tr-fast),
              border-color var(--tr-fast),
              background var(--tr-fast);
}

.contact__social:hover {
  color: var(--c-primary);
  border-color: var(--c-primary);
  background: rgba(var(--c-primary-rgb), .04);
}

.contact__social svg {
  width: 20px;
  height: 20px;
}

/* --- Right: form --- */
.contact__form-wrap {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-xl);
  padding: var(--sp-md);
}

.contact-form__submit {
  width: 100%;
}

/* Loading spinner on submit btn */
.contact-form__submit.is-loading {
  pointer-events: none;
  opacity: 0.7;
}

.contact-form__submit.is-loading::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: var(--sp-sm);
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spinner .6s linear infinite;
}

/* Success / error messages */
.contact__success {
  text-align: center;
  padding: var(--sp-2xl) var(--sp-md);
  color: var(--c-success);
}

.contact__success svg {
  margin: 0 auto var(--sp-md);
}

.contact__success h3 {
  font-size: var(--fs-xl);
  margin-bottom: var(--sp-sm);
  color: var(--c-text);
}

.contact__success p {
  color: var(--c-text-muted);
}

.contact__alert {
  padding: var(--sp-md);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-lg);
}

.contact__alert--error {
  background: rgba(239, 68, 68, .08);
  color: var(--c-error);
  border: 1px solid rgba(239, 68, 68, .2);
}

.contact__alert--success {
  background: rgba(var(--c-green-rgb), .08);
  color: var(--c-accent-dark);
  border: 1px solid rgba(var(--c-green-rgb), .2);
}


/* ========================================
   17. FOOTER
   ======================================== */

.footer {
  background: var(--c-dark);
  color: var(--c-text-muted-dk);
  padding: var(--sp-3xl) 0 var(--sp-xl);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-xl);
  text-align: center;
}

.footer__logo {
  font-size: var(--fs-xl);
  font-weight: var(--fw-black);
  color: #fff;
  letter-spacing: -0.02em;
}

.footer__tagline {
  font-size: var(--fs-sm);
  margin-top: var(--sp-xs);
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-md) var(--sp-lg);
}

.footer__nav a {
  font-size: var(--fs-sm);
  transition: color var(--tr-fast);
}

.footer__nav a:hover {
  color: #fff;
}

.footer__bottom {
  width: 100%;
  padding-top: var(--sp-xl);
  border-top: 1px solid var(--c-dark-border);
  font-size: var(--fs-xs);
  text-align: center;
}


/* ========================================
   18. SERVICE DETAIL PAGE
   ======================================== */

.svc-hero {
  padding: calc(5rem + var(--sp-3xl)) 0 var(--sp-3xl);
  background: var(--c-dark);
  color: var(--c-text-on-dark);
}

.svc-hero__back {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  font-size: var(--fs-sm);
  color: var(--c-text-muted-dk);
  margin-bottom: var(--sp-xl);
  transition: color var(--tr-fast);
}

.svc-hero__back:hover {
  color: #fff;
}

.svc-hero__back svg {
  display: inline-block;
}

.svc-hero__title {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-black);
  margin-bottom: var(--sp-md);
}

.svc-hero__intro {
  font-size: var(--fs-md);
  color: var(--c-text-muted-dk);
  max-width: 640px;
  line-height: var(--lh-normal);
}

/* Content section */
.section--content {
  padding: var(--sp-4xl) 0;
  background: var(--c-body);
}

.svc-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3xl);
}

.svc-detail__heading {
  font-size: var(--fs-xl);
  margin-bottom: var(--sp-lg);
}

.svc-detail__text {
  font-size: var(--fs-base);
  color: var(--c-text-muted);
  line-height: var(--lh-normal);
  margin-bottom: var(--sp-lg);
}

/* Sidebar */
.svc-detail__sidebar {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-xl);
  padding: var(--sp-xl);
}

.svc-detail__features-title {
  font-size: var(--fs-base);
  font-weight: var(--fw-semi);
  margin-bottom: var(--sp-md);
}

.svc-detail__features-list {
  margin-bottom: var(--sp-xl);
}

.svc-detail__features-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-sm);
  padding: var(--sp-sm) 0;
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  border-bottom: 1px solid var(--c-border);
}

.svc-detail__features-list li:last-child {
  border-bottom: none;
}

.svc-detail__features-list svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--c-accent);
}

.svc-detail__cta {
  width: 100%;
}

/* Service nav (prev/next) */
.svc-nav {
  background: var(--c-body);
  border-top: 1px solid var(--c-border);
  padding: var(--sp-xl) 0;
}

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

.svc-nav__link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  transition: color var(--tr-fast);
}

.svc-nav__link:hover {
  color: var(--c-primary);
}

.svc-nav__link span {
  display: flex;
  flex-direction: column;
}

.svc-nav__link small {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-text-muted);
}

.svc-nav__link--next {
  text-align: right;
  margin-left: auto;
}


/* ========================================
   19. ANIMATIONS & REVEAL
   ======================================== */

/* --- Keyframes --- */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes hero-glow {
  0%   { opacity: .5; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: .85; transform: translate(-50%, -50%) scale(1.12); }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(var(--c-green-rgb), .6); }
  50%      { box-shadow: 0 0 0 8px rgba(var(--c-green-rgb), 0); }
}

@keyframes scroll-line {
  0%   { transform: scaleY(0); transform-origin: top; }
  45%  { transform: scaleY(1); transform-origin: top; }
  55%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

@keyframes spinner {
  to { transform: rotate(360deg); }
}

/* --- Scroll reveal --- */
.js-loaded .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--tr-slow), transform var(--tr-slow);
}

.js-loaded .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}


/* ========================================
   20. RESPONSIVE — Tablet (≥ 768px)
   ======================================== */

@media (min-width: 768px) {

  :root {
    --container-padding: 2rem;
  }

  .section {
    padding: var(--sp-4xl) 0;
  }

  .section__header {
    margin-bottom: var(--sp-3xl);
  }

  .section__title {
    font-size: var(--fs-3xl);
  }

  .hero__title {
    font-size: var(--fs-4xl);
  }

  /* Cards scale up on tablet */
  .card {
    padding: var(--sp-2xl) var(--sp-xl);
  }

  .card__icon {
    width: 48px;
    height: 48px;
    margin-bottom: var(--sp-lg);
  }

  .card__title {
    font-size: var(--fs-lg);
    margin-bottom: var(--sp-sm);
  }

  /* Services: 2 columns with proper gap */
  .services__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-lg);
  }

  /* Portfolio compact: 2 columns */
  .portfolio-compact {
    grid-template-columns: repeat(2, 1fr);
  }

  /* About: 2 columns */
  .about__grid {
    grid-template-columns: 280px 1fr;
  }

  /* Process: grid on tablet, no scroll */
  .process__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    overflow: visible;
    scroll-snap-type: none;
    padding-bottom: 0;
  }

  .process__step {
    flex: initial;
    scroll-snap-align: initial;
  }

  .process__number {
    width: 56px;
    height: 56px;
    font-size: var(--fs-lg);
    margin-bottom: var(--sp-lg);
  }

  .process__title {
    font-size: var(--fs-lg);
  }

  /* Contact: 2 columns */
  .contact__grid {
    grid-template-columns: 1fr 1.3fr;
    gap: var(--sp-3xl);
    align-items: start;
  }

  .contact__info {
    gap: var(--sp-xl);
  }

  .contact__channel-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-lg);
  }

  .contact__form-wrap {
    padding: var(--sp-2xl);
  }

  .form-row {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-lg);
  }

  /* Footer row */
  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
    flex-wrap: wrap;
  }

  .footer__bottom {
    text-align: center;
  }

  /* Service detail */
  .svc-hero__title {
    font-size: var(--fs-4xl);
  }

  .svc-detail {
    grid-template-columns: 1.5fr 1fr;
  }
}


/* ========================================
   21. RESPONSIVE — Desktop (≥ 1024px)
   ======================================== */

@media (min-width: 1024px) {

  .section {
    padding: var(--sp-5xl) 0;
  }

  /* Show nav inline, hide hamburger */
  .nav__toggle {
    display: none;
  }

  .nav__overlay {
    display: none;
  }

  .nav__menu {
    position: static;
    width: auto;
    max-width: none;
    height: auto;
    background: none;
    padding: 0;
    transform: none;
    overflow: visible;
  }

  .nav__list {
    flex-direction: row;
    align-items: center;
    gap: var(--sp-xs);
  }

  .nav__link {
    font-size: var(--fs-sm);
    padding: var(--sp-xs) var(--sp-md);
  }

  .nav__link--cta {
    margin-top: 0;
    margin-left: var(--sp-sm);
  }

  /* Services: 3 columns */
  .services__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-xl);
  }

  /* Process: 4 columns with connecting line */
  .process__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-xl);
  }

  .process__grid::before {
    content: '';
    position: absolute;
    top: 52px;
    left: 12%;
    right: 12%;
    height: 2px;
    background: linear-gradient(
      to right,
      transparent,
      rgba(var(--c-primary-rgb), .15),
      rgba(var(--c-primary-rgb), .15),
      transparent
    );
    pointer-events: none;
  }

  .process__step {
    position: relative;
    z-index: 1;
  }

  .hero__title {
    font-size: var(--fs-5xl);
  }
}


/* ========================================
   22. RESPONSIVE — Large (≥ 1280px)
   ======================================== */

@media (min-width: 1280px) {

  :root {
    --container-max: 1280px;
  }

  .hero__subtitle {
    font-size: var(--fs-lg);
  }
}


/* ========================================
   24. COOKIE CONSENT
   ======================================== */

/* --- Banner (bottom bar) --- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  background: var(--c-dark-surface);
  border-top: 1px solid var(--c-dark-border);
  padding: var(--sp-md) var(--container-padding);
  animation: cookie-slide-up .4s ease both;
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.cookie-banner__text {
  font-size: var(--fs-sm);
  color: var(--c-text-muted-dk);
  line-height: var(--lh-normal);
}

.cookie-banner__text strong {
  color: var(--c-text-on-dark);
}

.cookie-banner__link {
  color: var(--c-primary-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
}

.btn--cookie {
  padding: 0.55rem 1.2rem;
  font-size: var(--fs-xs);
  border-radius: var(--radius-md);
}

.btn--ghost {
  background: transparent;
  color: var(--c-text-muted-dk);
  border: none;
}
.btn--ghost:hover {
  color: #fff;
  background: rgba(255,255,255,.06);
}

/* --- Configuration panel (modal) --- */
.cookie-panel {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.cookie-panel[hidden] {
  display: none;
}

.cookie-panel__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.cookie-panel__content {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 85dvh;
  background: var(--c-surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  overflow-y: auto;
  animation: cookie-slide-up .3s ease both;
}

.cookie-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-lg) var(--sp-lg) var(--sp-sm);
  position: sticky;
  top: 0;
  background: var(--c-surface);
  z-index: 1;
}

.cookie-panel__title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semi);
}

.cookie-panel__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--c-text-muted);
  transition: background var(--tr-fast);
}

.cookie-panel__close:hover {
  background: rgba(0,0,0,.06);
}

.cookie-panel__body {
  padding: 0 var(--sp-lg);
}

.cookie-panel__intro {
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  line-height: var(--lh-normal);
  margin-bottom: var(--sp-lg);
}

/* Category rows */
.cookie-cat {
  padding: var(--sp-md) 0;
  border-top: 1px solid var(--c-border);
}

.cookie-cat__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-md);
}

.cookie-cat__title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  margin-bottom: 0.15rem;
}

.cookie-cat__desc {
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  line-height: var(--lh-normal);
}

.cookie-cat__badge {
  flex-shrink: 0;
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--c-accent-dark);
  background: rgba(var(--c-green-rgb), .1);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

/* Toggle switch */
.cookie-toggle {
  flex-shrink: 0;
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-toggle__slider {
  position: absolute;
  inset: 0;
  background: var(--c-border);
  border-radius: var(--radius-full);
  transition: background var(--tr-fast);
}

.cookie-toggle__slider::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--tr-fast);
  box-shadow: var(--shadow-sm);
}

.cookie-toggle input:checked + .cookie-toggle__slider {
  background: var(--c-primary);
}

.cookie-toggle input:checked + .cookie-toggle__slider::before {
  transform: translateX(20px);
}

.cookie-panel__footer {
  padding: var(--sp-md) var(--sp-lg) var(--sp-lg);
  position: sticky;
  bottom: 0;
  background: var(--c-surface);
}

.cookie-panel__footer .btn--cookie {
  width: 100%;
  padding: 0.7rem 1.5rem;
  font-size: var(--fs-sm);
}

@keyframes cookie-slide-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Desktop: banner becomes horizontal row */
@media (min-width: 768px) {
  .cookie-banner__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .cookie-banner__text {
    flex: 1;
  }

  .cookie-banner__actions {
    flex-wrap: nowrap;
  }

  /* Panel centers vertically on tablet+ */
  .cookie-panel {
    align-items: center;
  }

  .cookie-panel__content {
    border-radius: var(--radius-xl);
    max-height: 70vh;
  }
}


/* ========================================
   25. REDUCED MOTION
   ======================================== */

@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;
  }

  .js-loaded .reveal {
    opacity: 1;
    transform: none;
  }
}
