/* ==========================================================================
   Kreasera Theme — mobile-first.
   Base rules target small screens; min-width queries enhance upward
   (576 / 768 / 992 / 1200).
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --orange: #f37021;
  --orange-600: #e2590a;
  --orange-400: #ff9248;
  --orange-100: #ffe5d2;
  --orange-50: #fff3ea;
  --ink: #17120e;
  --body: #4e4640;
  --muted: #7d746b;
  --line: #f0e4d9;
  --bg: #fffaf5;
  --white: #fff;
  --danger: #c0392b;
  --wa: #25d366;
  --wa-dark: #128c4a;

  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 28px;
  --shadow-sm: 0 2px 10px rgba(80, 40, 10, 0.06);
  --shadow-md: 0 12px 32px -10px rgba(120, 60, 15, 0.2);
  --shadow-orange: 0 10px 24px -8px rgba(243, 112, 33, 0.55);

  --gutter: 20px;
  --header-h: 64px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--body);
  background:
    radial-gradient(900px 500px at 100% -5%, var(--orange-50), transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Author display rules (grid/flex) would otherwise beat the UA [hidden] style. */
[hidden] { display: none !important; }

img, svg { max-width: 100%; height: auto; }
svg { flex: none; }

h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 6px;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  left: 12px; top: -80px;
  z-index: 1000;
  padding: 12px 18px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-sm);
  font-weight: 700;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container-narrow { max-width: 780px; }

.hl { color: var(--orange); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.98); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 0.875rem; }
.btn-lg { min-height: 56px; padding: 0 30px; font-size: 1rem; }
.btn-block { width: 100%; }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--orange-400), var(--orange) 45%, var(--orange-600));
  box-shadow: var(--shadow-orange);
}
.btn-primary:hover { box-shadow: 0 14px 28px -8px rgba(243, 112, 33, 0.7); transform: translateY(-1px); }

.btn-outline {
  color: var(--orange-600);
  background: var(--white);
  border-color: var(--orange-100);
}
.btn-outline:hover { border-color: var(--orange); }

.btn-white { color: var(--orange-600); background: #fff; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.35); }
.btn-white:hover { transform: translateY(-1px); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--orange-600);
  font-weight: 700;
  font-size: 0.9rem;
}
.text-link:hover { color: var(--orange); }

/* ---------- Pills & tags ---------- */
.pill, .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--orange);
}

.tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--orange-50);
  color: var(--orange-600);
  font-size: 0.75rem;
  font-weight: 700;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 250, 245, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 6px 20px -12px rgba(80, 40, 10, 0.25); }
.admin-bar .site-header { top: 46px; }

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}

.brand-logo { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; }
.brand-logo img { max-height: 40px; width: auto; }
.brand-logo .logo-mark { height: 38px; }
.brand-logo .logo-wordmark { height: 21px; }

.header-actions { display: flex; align-items: center; gap: 12px; }
.header-cta { display: none; }

/* Hamburger: three CSS bars that morph into an X while the menu is open. */
.mobile-toggle {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  -webkit-tap-highlight-color: transparent;
  transition: background-color .3s, border-color .3s, transform .2s;
}
.mobile-toggle:active { transform: scale(0.94); }
.burger { position: relative; display: block; width: 20px; height: 14px; }
.burger i {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2.5px;
  border-radius: 2px;
  background: var(--ink);
  transition: top .35s cubic-bezier(.7, 0, .2, 1), bottom .35s cubic-bezier(.7, 0, .2, 1),
              transform .35s cubic-bezier(.7, 0, .2, 1) .12s, opacity .2s, background-color .3s;
}
.burger i:nth-child(1) { top: 0; }
.burger i:nth-child(2) { top: 50%; margin-top: -1.25px; }
.burger i:nth-child(3) { bottom: 0; }
.mobile-toggle[aria-expanded="true"] { background: var(--orange); border-color: var(--orange); }
.mobile-toggle[aria-expanded="true"] .burger i { background: #fff; }
.mobile-toggle[aria-expanded="true"] .burger i:nth-child(1) { top: 50%; margin-top: -1.25px; transform: rotate(45deg); }
.mobile-toggle[aria-expanded="true"] .burger i:nth-child(2) { opacity: 0; }
.mobile-toggle[aria-expanded="true"] .burger i:nth-child(3) { bottom: 50%; margin-bottom: -1.25px; transform: rotate(-45deg); }

.desktop-nav { display: none; }

/* While the menu is open the header turns see-through so the overlay shows
   behind the logo and the close button. */
body.menu-open .site-header {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-color: transparent;
  box-shadow: none;
}

/* Full-screen menu: reveals as a circle growing from the hamburger. */
.menu-overlay {
  --origin-x: calc(100% - var(--gutter) - 24px);
  --origin-y: calc(var(--header-h) / 2);
  position: fixed;
  inset: 0;
  z-index: 99;
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    radial-gradient(700px 420px at 100% 0, var(--orange-100), transparent 70%),
    var(--bg);
  clip-path: circle(0px at var(--origin-x) var(--origin-y));
  visibility: hidden;
  transition: clip-path .75s cubic-bezier(.7, 0, .2, 1), visibility 0s linear .75s;
}
.menu-overlay.is-open {
  clip-path: circle(150vmax at var(--origin-x) var(--origin-y));
  visibility: visible;
  transition: clip-path .75s cubic-bezier(.7, 0, .2, 1), visibility 0s;
}
.menu-blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 35% 35%, rgba(255, 170, 110, 0.55), rgba(243, 112, 33, 0) 70%);
}
.menu-blob-1 { width: 340px; height: 340px; right: -160px; bottom: 18%; }
.menu-blob-2 { width: 260px; height: 260px; left: -130px; bottom: -60px; }

.menu-inner {
  position: relative;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding-block: calc(var(--header-h) + 20px) max(28px, env(safe-area-inset-bottom, 0px));
}
.overlay-nav li { border-bottom: 1px solid var(--line); }
.overlay-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  font-size: clamp(1.7rem, 7.4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  transition: color .2s, padding-left .25s;
}
.overlay-nav a::after {
  content: '\2192';
  font-size: 1.4rem;
  color: var(--orange);
  opacity: 0.55;
  transition: opacity .2s, transform .25s;
}
.overlay-nav a:hover, .overlay-nav .current-menu-item > a { color: var(--orange-600); padding-left: 6px; }
.overlay-nav a:hover::after { opacity: 1; transform: translateX(4px); }

/* Staggered entrance (delays only apply while opening). */
.overlay-nav li, .menu-foot {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .25s ease, transform .25s ease;
}
.menu-overlay.is-open .overlay-nav li,
.menu-overlay.is-open .menu-foot {
  opacity: 1;
  transform: none;
  transition: opacity .55s ease, transform .65s cubic-bezier(.2, .8, .2, 1);
  transition-delay: calc(.28s + var(--i, 0) * .07s);
}
.menu-overlay.is-open .menu-foot { transition-delay: calc(.28s + var(--i, 6) * .07s); }

.menu-foot { display: grid; gap: 16px; }
.menu-contact { text-align: center; font-size: 0.9rem; line-height: 1.7; color: var(--muted); }

/* ---------- Hero ---------- */
/* The artwork (phone + laptop on orange waves) is a portrait image anchored to
   the bottom of the hero; the copy sits in its pale upper area and
   .hero-space reserves the height where the devices show. */
.hero {
  --art-w: min(100vw, 560px);
  position: relative;
  overflow: hidden;
  padding: 24px 0 0;
}
.hero::before {
  content: '';
  position: absolute;
  z-index: 0;
  bottom: 0;
  left: 50%;
  width: var(--art-w);
  height: calc(var(--art-w) * 1.777);
  transform: translateX(-50%);
  background: var(--hero-bg) center bottom / 100% 100% no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 30%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 30%);
  pointer-events: none;
}

.hero-space { height: var(--art-w); }

.hero-grid { position: relative; z-index: 1; display: grid; gap: 28px; }
.hero-copy { text-align: center; display: grid; justify-items: center; gap: 18px; }

.hero-title {
  font-size: clamp(2.15rem, 9.2vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.hero-title .hl { display: block; }

.hero-desc { max-width: 520px; font-size: 1.0625rem; color: var(--body); }

.hero-actions {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
}
.hero-actions .btn-primary { width: 100%; max-width: 340px; }

/* ---------- Stats ---------- */
/* Glass card that straddles the bottom of the hero artwork. */
.stats { position: relative; z-index: 2; margin-top: -56px; padding: 0; }
.stats-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 18px 4px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.28));
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  backdrop-filter: blur(18px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--r-lg);
  box-shadow: 0 18px 40px -16px rgba(150, 60, 5, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 4px 6px;
  text-align: center;
}
.stat + .stat { border-left: 1px solid rgba(255, 255, 255, 0.6); }
.stat-icon {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  color: var(--orange-600);
  box-shadow: 0 4px 10px -4px rgba(150, 60, 5, 0.3);
}
.stat-text { display: grid; line-height: 1.2; min-width: 0; }
.stat-text strong { font-size: 1.3rem; font-weight: 800; color: var(--ink); }
.stat-text small { font-size: 0.75rem; font-weight: 500; color: var(--body); }

/* ---------- Tech stack marquee ---------- */
.stack { padding: 28px 0 4px; }
.stack-label {
  text-align: center;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.stack-marquee {
  overflow: hidden;
  margin-top: 14px;
  padding-block: 6px;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}
.stack-track {
  display: flex;
  width: max-content;
  animation: stack-scroll 40s linear infinite;
}
.stack-marquee:hover .stack-track,
.stack-marquee:focus-within .stack-track { animation-play-state: paused; }
/* gap and padding-right must match so the doubled list loops seamlessly */
.stack-list { display: flex; flex: none; gap: 40px; padding-right: 40px; }
.stack-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--muted);
  white-space: nowrap;
  transition: color .2s;
}
.stack-icon {
  width: 28px; height: 28px;
  background-color: #a99d92;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
  transition: background-color .2s;
}
.stack-item:hover { color: var(--ink); }
.stack-item:hover .stack-icon { background-color: var(--brand); }

@keyframes stack-scroll { to { transform: translateX(-50%); } }

/* ---------- Clients ---------- */
.clients { padding: 36px 0 4px; text-align: center; }
.clients-label { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.clients-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; margin-top: 18px; }
.clients-list li { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em; color: #a89d92; }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-head { display: grid; justify-items: center; gap: 14px; max-width: 640px; margin: 0 auto 28px; text-align: center; }
.section-title { font-size: clamp(1.75rem, 6.6vw, 2.6rem); }
.section-title .hl { display: block; }
.section-sub { color: var(--body); }
.section-more { margin-top: 28px; text-align: center; }

/* ---------- Services ---------- */
.services-grid { display: grid; gap: 12px; }
.service-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 92px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.service-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--orange-100); }
.service-icon {
  display: grid; place-items: center;
  width: 54px; height: 54px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--orange-400), var(--orange-600));
  color: #fff;
  box-shadow: var(--shadow-orange);
}
.service-body { display: grid; gap: 2px; flex: 1; min-width: 0; }
.service-body strong { font-size: 1.0625rem; color: var(--ink); line-height: 1.25; }
.service-body span { font-size: 0.875rem; color: var(--muted); line-height: 1.5; }
.service-arrow {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--orange-50);
  color: var(--orange);
  transition: background-color .2s, color .2s;
}
.service-card:hover .service-arrow { background: var(--orange); color: #fff; }

/* ---------- Sliders (portfolio + testimonials) ---------- */
.slider-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 6px 2px 22px;
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
  scroll-padding-inline: var(--gutter);
}
.slider-track::-webkit-scrollbar { display: none; }
.slider-track:focus-visible { outline-offset: -3px; }

.slide { flex: 0 0 100%; scroll-snap-align: start; min-width: 0; }

.slider-nav { display: flex; align-items: center; justify-content: center; gap: 14px; }
.slider-btn {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  box-shadow: var(--shadow-orange);
  transition: transform .2s, opacity .2s;
  -webkit-tap-highlight-color: transparent;
}
.slider-btn:active { transform: scale(0.94); }
.slider-btn[disabled] { opacity: 0.35; box-shadow: none; cursor: default; }
.slider-dots { display: flex; align-items: center; }
.slider-dots button {
  display: grid; place-items: center;
  width: 30px; height: 44px;
  padding: 0; border: 0; background: none;
}
.slider-dots button::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 999px;
  background: #e3d5c8;
  transition: width .25s, background-color .25s;
}
.slider-dots button[aria-selected="true"]::before { width: 22px; background: var(--orange); }

/* Portfolio card */
.project-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 14px 14px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
}
.project-visual { order: -1; }
.project-info { display: grid; justify-items: start; gap: 8px; padding-inline: 6px; }
.project-info h3 { font-size: 1.35rem; }
.project-info p { color: var(--body); }

.frame {
  aspect-ratio: 4 / 3;
  border-radius: var(--r-md);
  overflow: hidden;
  background: linear-gradient(135deg, var(--orange-50), var(--orange-100));
  border: 1px solid var(--line);
}
.frame-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.frame-placeholder {
  height: 100%;
  padding: 14px;
  display: grid;
  grid-template: 14px 1fr 1fr / 1fr 1fr;
  gap: 10px;
}
.frame-placeholder span { border-radius: 10px; background: rgba(255, 255, 255, 0.75); }
.frame-placeholder span:first-child { grid-column: 1 / 2; width: 55%; background: rgba(243, 112, 33, 0.35); }
.frame-placeholder span:nth-child(2) { grid-column: 1 / 3; background: rgba(255, 255, 255, 0.9); }

/* Testimonial card */
.testi-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: 24px 20px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
}
.testi-avatar {
  display: grid; place-items: center;
  flex: none;
  width: 72px; height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--orange-100), var(--orange-50));
  color: var(--orange-600);
  font-size: 1.6rem;
  font-weight: 800;
  border: 3px solid #fff;
  box-shadow: var(--shadow-sm);
}
.avatar-img { width: 100%; height: 100%; object-fit: cover; }
.testi-body { display: grid; gap: 14px; }
.testi-body blockquote { margin: 0; color: var(--ink); line-height: 1.7; }
.testi-body figcaption { display: grid; justify-items: center; gap: 2px; }
.testi-body figcaption strong { color: var(--ink); }
.testi-body figcaption > span:not(.stars) { font-size: 0.875rem; color: var(--muted); }
.stars { display: inline-flex; gap: 2px; margin-top: 6px; }
.stars .on { fill: var(--orange); stroke: var(--orange); }
.stars .off { fill: none; stroke: #d9cdc2; }

/* ---------- CTA ---------- */
.cta { padding: 8px 0 56px; }
.cta-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 22px;
  padding: 30px 24px;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--orange-600), var(--orange) 55%, var(--orange-400));
  color: #fff;
  box-shadow: var(--shadow-orange);
}
.cta-card::before, .cta-card::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  pointer-events: none;
}
.cta-card::before { width: 220px; height: 220px; right: -70px; top: -90px; }
.cta-card::after { width: 160px; height: 160px; left: 30%; bottom: -100px; }
.cta-copy { position: relative; z-index: 1; display: grid; gap: 8px; }
.cta-copy h2 { color: #fff; font-size: clamp(1.6rem, 6.4vw, 2.3rem); }
.cta-copy p { color: rgba(255, 255, 255, 0.92); }
.cta .btn { position: relative; z-index: 1; width: 100%; }

/* ---------- Footer ---------- */
.site-footer { background: #17120e; color: #cdc3b9; }
.footer-grid { display: grid; gap: 32px; padding-block: 48px 36px; }
.footer-brand { display: grid; gap: 16px; justify-items: start; }
.footer-brand p { max-width: 380px; }
.footer-heading { margin-bottom: 12px; font-size: 1rem; color: #fff; letter-spacing: 0; }
.footer-menu a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-contact a { display: inline-flex; align-items: center; min-height: 32px; }
.footer-menu a:hover, .footer-contact a:hover { color: var(--orange-400); }
.footer-contact { display: grid; gap: 14px; }
.footer-contact li { display: flex; gap: 12px; align-items: flex-start; }
.footer-contact svg { margin-top: 3px; color: var(--orange-400); }
.social-links { display: flex; flex-wrap: wrap; gap: 10px; }
.social-links a {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transition: background-color .2s;
}
.social-links a:hover { background: var(--orange); }
.subfooter { border-top: 1px solid rgba(255, 255, 255, 0.1); padding: 18px 0; font-size: 0.875rem; text-align: center; }

/* ---------- Inner pages ---------- */
.page-hero {
  padding: 40px 0 24px;
  text-align: center;
  background: linear-gradient(180deg, var(--orange-50), transparent);
}
.page-hero .container { display: grid; justify-items: center; gap: 14px; }
.page-title { font-size: clamp(1.9rem, 7vw, 3rem); }
.page-lead { max-width: 560px; color: var(--body); }
.entry-meta { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.9rem; }
.section-tight { padding-block: 24px 56px; }
.empty-note { padding: 40px 0; text-align: center; color: var(--muted); }

.post-grid { display: grid; gap: 18px; }
.post-card {
  display: flex; flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.post-card-thumb { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: linear-gradient(135deg, var(--orange-50), var(--orange-100)); }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-placeholder { display: block; height: 100%; }
.post-card-body { display: grid; justify-items: start; gap: 8px; padding: 18px; flex: 1; align-content: start; }
.post-card-title { font-size: 1.15rem; }
.post-card-title a:hover { color: var(--orange-600); }
.post-card-excerpt { color: var(--muted); font-size: 0.95rem; }
.post-card-meta { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 6px; font-size: 0.85rem; color: var(--muted); }

.navigation.pagination { margin-top: 36px; }
.nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.page-numbers {
  display: inline-grid; place-items: center;
  min-width: 44px; min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-weight: 700;
  color: var(--ink);
}
.page-numbers.current { background: var(--orange); border-color: var(--orange); color: #fff; }
a.page-numbers:hover { border-color: var(--orange); }

.entry-thumb { margin: 0 0 28px; }
.entry-thumb img { width: 100%; border-radius: var(--r-md); display: block; }

.prose { font-size: 1.0625rem; line-height: 1.85; color: var(--body); overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.2em; }
.prose h2 { font-size: 1.6rem; margin-top: 1.8em; }
.prose h3 { font-size: 1.3rem; margin-top: 1.6em; }
.prose a { color: var(--orange-600); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.4em; }
.prose img, .prose video, .prose iframe { max-width: 100%; border-radius: var(--r-sm); }
.prose blockquote { margin-inline: 0; padding: 4px 0 4px 18px; border-left: 4px solid var(--orange); color: var(--ink); font-weight: 600; }
.prose pre { overflow-x: auto; padding: 16px; border-radius: var(--r-sm); background: #17120e; color: #f6eee6; font-size: 0.9rem; }
.prose table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; }
.prose th, .prose td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; }

.entry-nav { display: grid; gap: 12px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); font-weight: 700; }
.entry-nav a { display: block; padding: 12px 0; color: var(--orange-600); }

.search-form { display: flex; gap: 8px; width: 100%; max-width: 480px; margin-inline: auto; }
.search-field {
  flex: 1; min-width: 0;
  min-height: 52px;
  padding: 0 20px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  color: var(--ink);
}
.search-field:focus { border-color: var(--orange); outline: none; box-shadow: 0 0 0 4px var(--orange-50); }
.search-submit {
  display: grid; place-items: center;
  width: 52px; height: 52px;
  border: 0; border-radius: 50%;
  background: var(--orange); color: #fff;
}

.not-found { padding: 64px 0 80px; text-align: center; }
.not-found .container { display: grid; justify-items: center; gap: 18px; }
.not-found-code { font-size: clamp(5rem, 28vw, 9rem); font-weight: 800; line-height: 1; letter-spacing: -0.05em; color: var(--orange); }

.comments { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); }
.comments-title, .comment-reply-title { font-size: 1.4rem; margin-bottom: 18px; }
.comment-list { display: grid; gap: 18px; margin-bottom: 28px; }
.comment-list .children { margin: 14px 0 0 18px; display: grid; gap: 14px; }
.comment-body { padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); }
.comment-author { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); }
.comment-author img { border-radius: 50%; }
.comment-metadata { font-size: 0.8rem; color: var(--muted); }
.comment-form { display: grid; gap: 14px; }
.comment-form label { display: block; margin-bottom: 4px; font-weight: 600; font-size: 0.9rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
  font: inherit;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--orange); outline: none; box-shadow: 0 0 0 4px var(--orange-50); }
.comment-form .form-submit { margin: 0; }

.alignleft { float: left; margin: 0 1.2em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.2em; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption-text { font-size: 0.85rem; color: var(--muted); }

/* ---------- Tablet: 576+ ---------- */
@media (min-width: 576px) {
  :root { --gutter: 28px; }
  /* Artwork is narrower than the screen: fade its side edges too. */
  .hero::before {
    -webkit-mask-image:
      linear-gradient(to bottom, transparent 0, #000 30%),
      linear-gradient(to right, transparent 0, #000 12%, #000 88%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image:
      linear-gradient(to bottom, transparent 0, #000 30%),
      linear-gradient(to right, transparent 0, #000 12%, #000 88%, transparent 100%);
    mask-composite: intersect;
  }
  .header-cta { display: inline-flex; }
  .stats-card { padding: 22px 8px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .cta .btn { width: auto; justify-self: start; }
}

/* ---------- Tablet: 768+ ---------- */
@media (min-width: 768px) {
  .admin-bar .site-header { top: 32px; }
  .section { padding: 72px 0; }
  .section-head { margin-bottom: 40px; }

  .stats-card { max-width: 900px; margin-inline: auto; padding: 26px 16px; }
  .stat { flex-direction: row; justify-content: center; gap: 14px; text-align: left; padding: 6px 12px; }
  .stat-icon { width: 52px; height: 52px; }
  .stat-text strong { font-size: 1.6rem; }
  .stat-text small { font-size: 0.875rem; }
  .stack-list { gap: 56px; padding-right: 56px; }
  .stack-item { font-size: 1rem; }
  .stack-icon { width: 30px; height: 30px; }

  .project-card { flex-direction: row; align-items: center; gap: 28px; padding: 22px 26px; }
  .project-info { flex: 1; padding: 0; }
  .project-visual { order: 0; flex: 1.15; }
  .frame { aspect-ratio: 16 / 11; }

  .testi-card { flex-direction: row; align-items: center; text-align: left; gap: 26px; padding: 30px 32px; }
  .testi-avatar { width: 92px; height: 92px; font-size: 2rem; }
  .testi-body figcaption { justify-items: start; }

  .cta-card { grid-template-columns: 1fr auto; align-items: center; padding: 40px 44px; gap: 32px; }
  .cta .btn { justify-self: end; }

  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .subfooter { text-align: left; }
  .page-hero { padding: 64px 0 36px; }
  .entry-nav { grid-template-columns: 1fr 1fr; }
  .entry-nav a:last-child { text-align: right; }
}

/* ---------- Desktop: 992+ ---------- */
@media (min-width: 992px) {
  :root { --header-h: 76px; }

  .mobile-toggle, .menu-overlay { display: none !important; }
  .desktop-nav { display: block; }
  .nav-list { display: flex; align-items: center; gap: 4px; }
  .nav-list a {
    display: inline-flex; align-items: center;
    min-height: 44px; padding: 0 16px;
    border-radius: 999px;
    font-weight: 600; font-size: 0.95rem;
    color: var(--ink);
    transition: color .2s, background-color .2s;
  }
  .nav-list a:hover, .nav-list .current-menu-item > a { color: var(--orange-600); background: var(--orange-50); }

  .hero { --art-w: min(46vw, 600px); padding: 56px 0 0; }
  .hero::before {
    left: auto;
    right: max(0px, calc((100vw - 1180px) / 2 - 24px));
    transform: none;
  }
  .hero-grid { grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; }
  .hero-space { height: calc(var(--art-w) * 1.15); }
  .hero-copy { text-align: left; justify-items: start; gap: 22px; }
  .hero-title { font-size: clamp(3rem, 4.6vw, 4.2rem); }
  .hero-actions { display: flex; align-items: center; gap: 28px; width: auto; }
  .hero-actions .btn-primary { width: auto; max-width: none; }

  .section { padding: 96px 0; }
  .stats { margin-top: -72px; }

  .slide { flex-basis: 88%; }
  .project-info h3 { font-size: 1.7rem; }
  .testimonials .slide { flex-basis: 78%; }

  .post-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 40px; padding-block: 64px 48px; }
}

/* ---------- Wide: 1200+ ---------- */
@media (min-width: 1200px) {
  .services-grid { grid-template-columns: repeat(4, 1fr); }
  .service-card { flex-direction: column; align-items: flex-start; gap: 16px; padding: 22px; min-height: 100%; }
  .service-body { gap: 6px; }
  .service-arrow { align-self: flex-end; margin-top: auto; }
}

/* ---------- Consultation popup ---------- */
/* Mobile: bottom sheet. 576px+: centred card. */
.btn-wa {
  color: var(--wa-dark);
  background: #fff;
  border-color: #bfe8d0;
}
.btn-wa:hover { color: #fff; background: var(--wa); border-color: var(--wa); }
.btn[disabled] { opacity: 0.7; cursor: wait; transform: none; }

html.modal-open { overflow: hidden; }

.consult {
  width: 100%;
  max-width: 100%;
  max-height: none;
  margin: auto 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--body);
  overflow: visible;
}
.consult::backdrop {
  background: rgba(23, 18, 14, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.consult[open] { animation: consult-in .38s cubic-bezier(.2, .8, .2, 1); }
.consult[open]::backdrop { animation: consult-fade .3s ease; }
.consult.is-closing { animation: consult-out .22s ease forwards; }
.consult.is-closing::backdrop { animation: consult-fade .22s ease reverse forwards; }

@keyframes consult-in { from { opacity: 0; transform: translateY(32px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes consult-out { to { opacity: 0; transform: translateY(24px) scale(.98); } }
@keyframes consult-fade { from { opacity: 0; } to { opacity: 1; } }

.consult-sheet {
  position: relative;
  max-height: 92vh;
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px var(--gutter) max(20px, env(safe-area-inset-bottom, 0px));
  background: var(--bg);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: 0 -20px 60px -20px rgba(60, 25, 0, 0.45);
}
.consult-close {
  position: absolute;
  top: 14px; right: 14px;
  display: grid; place-items: center;
  width: 44px; height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
.consult-close:hover { border-color: var(--orange); color: var(--orange); }

.consult-head { display: grid; justify-items: start; gap: 6px; padding-right: 52px; margin-bottom: 16px; }
.consult-head h2 { font-size: clamp(1.4rem, 6vw, 1.75rem); }
.consult-head p:last-child { color: var(--body); font-size: 0.95rem; }

.consult-form { display: grid; gap: 12px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: 0.875rem; color: var(--ink); }
.field input, .field textarea {
  width: 100%;
  padding: 0 16px;
  min-height: 52px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fff;
  font: inherit;
  font-size: 1rem; /* 16px: stops iOS from zooming on focus */
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { padding-block: 14px; min-height: 96px; resize: vertical; line-height: 1.55; }
.field input::placeholder, .field textarea::placeholder { color: #a99d92; }
.field input:focus, .field textarea:focus { border-color: var(--orange); outline: none; box-shadow: 0 0 0 4px var(--orange-50); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field [aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.12); }
.field-error { font-size: 0.8125rem; font-weight: 600; color: var(--danger); }

.form-status {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(192, 57, 43, 0.08);
  color: var(--danger);
  font-size: 0.9rem;
  font-weight: 600;
}

/* Honeypot: off-screen, not display:none (some bots skip hidden fields). */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.consult-success {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 18px 8px 8px;
  text-align: center;
}
.consult-success:focus { outline: none; }
.success-icon {
  display: grid; place-items: center;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--orange-50);
  color: var(--orange);
}
.consult-success h3 { font-size: 1.4rem; }
.consult-success strong { color: var(--ink); white-space: nowrap; }

.consult-divider { height: 1px; margin: 16px 0; border: 0; background: var(--line); }

@media (min-width: 576px) {
  .consult { margin: auto; max-width: 480px; }
  .consult-sheet { padding: 34px 32px 30px; border-radius: var(--r-lg); box-shadow: var(--shadow-md), 0 30px 80px -20px rgba(60, 25, 0, 0.5); max-height: 90vh; }
  .consult-close { top: 18px; right: 18px; }
}

/* ---------- Inner pages: Testimoni, Kontak ---------- */
.page-title .hl { display: block; }
.page-extra { margin-top: 40px; }

.testi-grid { display: grid; gap: 16px; }

.contact-grid { display: grid; gap: 12px; }
.contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 84px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
a.contact-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--orange-100); }
.contact-icon {
  display: grid; place-items: center;
  flex: none;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--orange-50);
  color: var(--orange-600);
}
.contact-body { display: grid; gap: 2px; min-width: 0; line-height: 1.4; }
.contact-body small { font-size: 0.8125rem; font-weight: 600; color: var(--muted); }
.contact-body strong { font-size: 1.0625rem; color: var(--ink); overflow-wrap: anywhere; }

.contact-actions { display: grid; justify-items: center; gap: 20px; margin-top: 28px; }
.contact-actions .btn { width: 100%; max-width: 380px; }
.social-links-light a { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.social-links-light a:hover { background: var(--orange); border-color: var(--orange); color: #fff; }

@media (min-width: 576px) {
  .contact-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .contact-actions .btn { width: auto; }
}
@media (min-width: 992px) {
  .testi-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}

/* ---------- Legal & Terms pages ---------- */
.nowrap { white-space: nowrap; }

.legal-card {
  margin-bottom: 16px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}
.legal-card h2 { margin-bottom: 14px; font-size: 1.15rem; }
.legal-list { display: grid; margin: 0; }
.legal-list > div { display: grid; gap: 2px; padding: 12px 0; border-top: 1px solid var(--line); }
.legal-list > div:first-child { border-top: 0; padding-top: 0; }
.legal-list > div:last-child { padding-bottom: 0; }
.legal-list dt { font-size: 0.8125rem; font-weight: 600; color: var(--muted); }
.legal-list dd { margin: 0; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.legal-note { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 0.875rem; color: var(--muted); }
.legal-links { margin-top: 8px; }

.kbli-list { display: grid; gap: 14px; }
.kbli-list li { display: flex; gap: 14px; align-items: flex-start; font-weight: 600; color: var(--ink); line-height: 1.5; }
.kbli-code {
  flex: none;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--orange-50);
  color: var(--orange-600);
  font-size: 0.8125rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.terms-updated { margin-bottom: 20px; font-size: 0.875rem; color: var(--muted); }
/* Clauses are a real sequence (Pasal 1, 2, ...), so numbering carries meaning here. */
.terms { counter-reset: clause; }
.terms section { counter-increment: clause; padding-top: 4px; }
.terms h2 { display: flex; gap: 12px; align-items: baseline; font-size: 1.15rem; margin-top: 1.6em; }
.terms h2::before {
  content: counter(clause) ".";
  flex: none;
  min-width: 1.6em;
  color: var(--orange);
  font-variant-numeric: tabular-nums;
}
.terms section:first-child h2 { margin-top: 0; }
.terms p { font-size: 1rem; line-height: 1.75; }

.form-note { font-size: 0.8125rem; text-align: center; color: var(--muted); line-height: 1.5; }
.form-note a { color: var(--orange-600); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

.subfooter-inner { display: grid; gap: 4px; }
.subfooter-nib { display: block; font-size: 0.8125rem; opacity: 0.75; }
.subfooter-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; }
.subfooter-links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.subfooter-links a:hover { color: var(--orange-400); }

@media (min-width: 576px) {
  /* Indent the clause text under its number once there is room for it. */
  .terms section > :not(h2) { padding-left: calc(1.6em + 12px); }
  .legal-card { padding: 26px 28px; }
  .legal-list > div { grid-template-columns: 220px 1fr; gap: 16px; align-items: baseline; }
}
@media (min-width: 768px) {
  .subfooter-inner { grid-template-columns: 1fr auto; align-items: center; }
  .subfooter-links { justify-content: flex-end; }
}

/* ---------- Accessibility / user prefs ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* Marquee becomes a manually scrollable row with a single copy of the logos. */
  .stack-marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; scrollbar-width: none; }
  .stack-track { animation: none; }
  .stack-list[aria-hidden="true"] { display: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
