/* ===== Components ===== */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: .9rem 1.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .01em;
  border-radius: var(--r-md);
  transition: background var(--dur) var(--ease),
              color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              transform var(--dur-fast) var(--ease),
              box-shadow var(--dur) var(--ease);
  cursor: pointer;
  white-space: nowrap;
  min-height: 48px;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; }

.btn-primary {
  background: var(--brand);
  color: var(--on-brand);
  border: 1px solid var(--brand);
}
.btn-primary:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
  color: var(--on-brand);
  box-shadow: var(--shadow-md);
}

.btn-accent {
  background: var(--accent);
  color: var(--on-accent);
  border: 1px solid var(--accent);
}
.btn-accent:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--on-accent);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--accent);
  padding: .25rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), gap var(--dur) var(--ease);
}
.btn-link svg { width: 18px; height: 18px; transition: transform var(--dur) var(--ease); }
.btn-link:hover { border-bottom-color: var(--accent); gap: var(--s-3); }
.btn-link:hover svg { transform: translateX(3px); }

/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.card-body { padding: var(--s-6); }
.card-img { aspect-ratio: 16/10; overflow: hidden; background: var(--bg-muted); }
.card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--dur-slow) var(--ease);
}
.card:hover .card-img img { transform: scale(1.04); }

/* Pill / Tag */
.pill {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: .35rem .75rem;
  font-size: .8rem; font-weight: 600;
  font-family: var(--font-display);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 999px;
}

/* ===== Navbar ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.nav.scrolled { border-bottom-color: var(--border); background: color-mix(in srgb, var(--bg) 96%, transparent); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-6);
  min-height: 92px;
}
.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
}
.nav-logo .logo-mark     { height: 64px; width: auto; }
.nav-logo .logo-wordmark { height: 42px; width: auto; transition: filter var(--dur) var(--ease); }

/* Footer + drawer use slightly different sizes. */
.footer-brand .logo-mark     { height: 72px; }
.footer-brand .logo-wordmark { height: 48px; }
.mobile-panel .panel-head .logo-mark     { height: 48px; }
.mobile-panel .panel-head .logo-wordmark { height: 32px; }

/* Dark mode: bleach ONLY the wordmark; keep brand-blue icon untouched. */
[data-theme='dark'] .logo-wordmark {
  filter: brightness(0) invert(1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .logo-wordmark {
    filter: brightness(0) invert(1);
  }
}

@media (max-width: 600px) {
  .nav-logo .logo-mark { height: 52px; }
  .nav-logo .logo-wordmark { height: 32px; }
}
@media (max-width: 600px) {
  .nav-inner { min-height: 76px; }
  .nav-logo img { height: 52px; }
}
.nav-logo .wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -.01em;
  font-size: 1.05rem;
  color: var(--text);
}
.nav-links { display: flex; align-items: center; gap: var(--s-1); }
.nav-link {
  padding: .6rem .9rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: .95rem;
  color: var(--text-muted);
  border-radius: var(--r-md);
  position: relative;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.nav-link:hover { color: var(--text); background: var(--bg-muted); }
.nav-link.active { color: var(--accent); }

/* ===== Dropdown (Kurumsal) ===== */
.nav-item.has-dropdown { position: relative; display: inline-flex; align-items: stretch; }
.nav-item.has-dropdown > .nav-link { display: inline-flex; align-items: center; gap: .25rem; }
.nav-item.has-dropdown .caret {
  width: 14px; height: 14px;
  transition: transform var(--dur) var(--ease);
  opacity: .7;
}
.nav-item.has-dropdown.open > .nav-link .caret,
.nav-item.has-dropdown:hover > .nav-link .caret { transform: rotate(180deg); }

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, -6px);
  min-width: 260px;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  border-radius: 10px;
  box-shadow: 0 16px 40px -12px rgba(15, 23, 42, .18),
              0 4px 12px -4px rgba(15, 23, 42, .08);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms cubic-bezier(.2, .8, .2, 1),
              transform 220ms cubic-bezier(.2, .8, .2, 1);
  z-index: var(--z-nav);
  margin-top: 0;
}
[data-theme='dark'] .nav-dropdown {
  background: var(--bg-elevated);
  border-color: color-mix(in srgb, var(--border) 80%, transparent);
  box-shadow: 0 18px 44px -14px rgba(0, 0, 0, .55),
              0 6px 14px -4px rgba(0, 0, 0, .35);
}
/* Subtle pointer triangle */
.nav-dropdown::after {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  width: 12px;
  height: 12px;
  background: inherit;
  border-left: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  transform: translateX(-50%) rotate(45deg);
}
/* Invisible hover bridge so cursor can travel from nav link to dropdown without losing hover. */
.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
}
.nav-item.has-dropdown:hover .nav-dropdown,
.nav-item.has-dropdown:focus-within .nav-dropdown,
.nav-item.has-dropdown.open .nav-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
.nav-sublink {
  position: relative;
  display: flex;
  align-items: center;
  padding: 10px 14px 10px 18px;
  border-radius: 6px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: .92rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 160ms var(--ease),
              color 160ms var(--ease),
              padding-left 200ms var(--ease);
  white-space: nowrap;
}
/* Accent indicator bar (hidden by default, slides in on hover/active) */
.nav-sublink::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  width: 3px;
  height: 0;
  background: var(--accent);
  border-radius: 2px;
  transform: translateY(-50%);
  transition: height 200ms var(--ease);
}
.nav-sublink:hover {
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  color: var(--text);
  padding-left: 22px;
}
.nav-sublink:hover::before { height: 18px; }
.nav-sublink.active {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  padding-left: 22px;
}
.nav-sublink.active::before { height: 18px; }

/* Mobile drawer — flatten dropdown to indented sub-items */
@media (max-width: 960px) {
  .nav-item.has-dropdown,
  .nav-item.has-dropdown .nav-dropdown { display: contents; }
  .nav-item.has-dropdown .nav-dropdown {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
    position: static !important;
  }
  .mobile-panel .nav-item.has-dropdown .nav-link .caret { display: none; }
  .mobile-panel .nav-sublink {
    display: flex;
    align-items: center;
    padding: .8rem 0 .8rem 1.25rem;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
    color: var(--text-muted);
    border-radius: 0;
  }
  .mobile-panel .nav-sublink::before {
    content: '';
    width: 12px; height: 1px;
    background: var(--border-strong);
    display: inline-block;
    margin-right: .6rem;
  }
  .mobile-panel .nav-sublink.active { color: var(--accent); background: transparent; }
}
.nav-links .nav-link.active::after {
  content: ''; position: absolute; left: 50%; bottom: -2px;
  width: 16px; height: 2px; background: var(--accent);
  transform: translateX(-50%);
  border-radius: 2px;
}
.nav-tools { display: flex; align-items: center; gap: var(--s-2); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: var(--r-md);
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }
.icon-btn svg { width: 20px; height: 20px; }
/* Show the icon that REPRESENTS the current theme (sun = light, moon = dark). */
.icon-btn .sun, .icon-btn .moon { display: none; }
:root:not([data-theme='dark']) .icon-btn .sun { display: block; }
[data-theme='dark'] .icon-btn .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .icon-btn .sun { display: none; }
  :root:not([data-theme]) .icon-btn .moon { display: block; }
}

/* ===== Language toggle: globe button + popup menu ===== */
.lang-picker { position: relative; display: inline-flex; }
.lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              color var(--dur) var(--ease);
}
.lang-toggle:hover,
.lang-toggle[aria-expanded='true'] {
  background: var(--bg-muted);
  border-color: var(--border-strong);
  color: var(--text);
}
.lang-toggle svg {
  width: 18px;
  height: 18px;
  transition: transform var(--dur) var(--ease);
}
.lang-toggle:hover svg { transform: rotate(15deg); }

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  padding: .35rem;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: var(--z-overlay);
  opacity: 0;
  transform: translateY(-6px) scale(.98);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.lang-menu.open {
  display: flex;
  opacity: 1;
  transform: translateY(0) scale(1);
}
.lang-menu button {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  padding: .55rem .7rem;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--text);
  font-family: var(--font-display);
  font-size: .92rem;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.lang-menu button:hover { background: var(--bg-muted); color: var(--accent); }
.lang-menu button > span:first-child { flex: 1; }
.lang-menu .tick {
  font-size: 1rem;
  color: var(--accent);
  opacity: 0;
  font-weight: 700;
}
.lang-menu button.active { color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.lang-menu button.active .tick { opacity: 1; }

/* ===== Theme toggle (sun/moon crossfade) ===== */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: background var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              color var(--dur) var(--ease);
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: var(--bg-muted);
  border-color: var(--border-strong);
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
  transition: transform var(--dur-slow) var(--ease), color var(--dur) var(--ease);
}
.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  position: absolute;
  transition: opacity var(--dur-slow) var(--ease),
              transform var(--dur-slow) var(--ease),
              color var(--dur) var(--ease);
}
/* Active-icon tint on hover */
.theme-toggle:hover .icon-sun  { color: #F59E0B; transform: rotate(25deg); }
.theme-toggle:hover .icon-moon { color: #94A3B8; transform: rotate(-15deg); }

/* Light = sun visible, moon hidden. Dark = moon visible, sun hidden. */
:root:not([data-theme='dark']) .theme-toggle .icon-sun  { opacity: 1; transform: rotate(0)    scale(1); }
:root:not([data-theme='dark']) .theme-toggle .icon-moon { opacity: 0; transform: rotate(90deg) scale(.5); }
[data-theme='dark'] .theme-toggle .icon-sun  { opacity: 0; transform: rotate(-90deg) scale(.5); }
[data-theme='dark'] .theme-toggle .icon-moon { opacity: 1; transform: rotate(0)      scale(1); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle .icon-sun  { opacity: 0; transform: rotate(-90deg) scale(.5); }
  :root:not([data-theme]) .theme-toggle .icon-moon { opacity: 1; transform: rotate(0)      scale(1); }
}

/* Mobile nav */
.menu-toggle { display: none; }
.mobile-panel { display: none; }
.mobile-backdrop { display: none; }

@media (max-width: 960px) {
  .nav-links { display: none; }
  /* Keep lang-toggle in the appbar on mobile. Theme icon moves to drawer. */
  .nav-tools .lang-toggle { display: inline-flex; }
  .nav-tools > .icon-btn[data-theme-toggle] { display: none; }
  .menu-toggle { display: inline-flex; }

  /* Hamburger lives on the far RIGHT of the appbar. */
  .nav-inner { gap: var(--s-3); }
  .nav-inner > .nav-tools { margin-left: auto; }
  .nav-inner > .menu-toggle {
    order: 99;
    margin-left: 0; /* nav-inner gap (12px) is the only spacing */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    transition: background var(--dur) var(--ease),
                border-color var(--dur) var(--ease),
                color var(--dur) var(--ease);
  }
  .nav-inner > .menu-toggle:hover {
    background: var(--bg-muted);
    border-color: var(--border-strong);
    color: var(--text);
  }
  .nav-inner > .menu-toggle svg { width: 18px; height: 18px; }

  .mobile-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 38, .55);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur) var(--ease);
    z-index: var(--z-overlay);
  }
  .mobile-backdrop.open { opacity: 1; pointer-events: auto; }

  .mobile-panel {
    display: block;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: min(88vw, 360px);
    background: var(--bg-elevated);
    box-shadow: 16px 0 48px rgba(0,0,0,.18);
    z-index: calc(var(--z-overlay) + 1);
    transform: translateX(-100%);
    transition: transform var(--dur-slow) var(--ease);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }
  .mobile-panel.open { transform: translateX(0); }
  .mobile-panel .container {
    padding: var(--s-6) var(--s-6) calc(var(--s-12) + env(safe-area-inset-bottom));
    flex: 1;
    display: flex;
    flex-direction: column;
  }
  .mobile-panel .panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: var(--s-5);
    margin-bottom: var(--s-5);
    border-bottom: 1px solid var(--border);
  }
  .mobile-panel .panel-head img { height: 44px; }
  .mobile-panel .panel-tools {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
  }
  .mobile-panel .panel-tools .theme-toggle { background: var(--surface); }
  .mobile-panel .panel-close {
    width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
  }
  .mobile-panel .panel-close svg { width: 18px; height: 18px; }
  .mobile-panel .panel-close:hover { color: var(--accent); border-color: var(--accent); }

  .mobile-panel nav { display: flex; flex-direction: column; }
  .mobile-panel .nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.05rem 0;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 500;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    transition: color var(--dur) var(--ease), padding-left var(--dur) var(--ease);
    position: relative;
  }
  .mobile-panel .nav-link .chev {
    width: 8px; height: 8px;
    border-right: 2px solid currentColor;
    border-top: 2px solid currentColor;
    transform: rotate(45deg);
    opacity: .3;
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
    flex-shrink: 0;
  }
  .mobile-panel .nav-link:hover { color: var(--accent); padding-left: .25rem; }
  .mobile-panel .nav-link:hover .chev { opacity: 1; }
  .mobile-panel .nav-link.active { color: var(--accent); font-weight: 600; }
  .mobile-panel .nav-link.active .chev { opacity: 1; }

  .mobile-panel .panel-foot {
    margin-top: auto;
    padding-top: var(--s-6);
    display: grid;
    gap: var(--s-2);
    font-size: .9rem;
    color: var(--text-muted);
  }
  .mobile-panel .panel-foot a { display: inline-flex; gap: .5rem; align-items: center; }
  .mobile-panel .panel-foot a svg { width: 16px; height: 16px; color: var(--accent); }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: clamp(560px, 88vh, 880px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #fff;
  isolation: isolate;
}
.hero-media {
  position: absolute; inset: 0; z-index: -2;
  overflow: hidden;
}
.hero-media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  filter: brightness(.82) saturate(1.05);
  opacity: 0;
  transition: opacity 1.2s var(--ease);
  animation: heroZoom 14s ease-in-out infinite alternate;
}
.hero-media img.is-active { opacity: 1; }

/* Service tab-panel image slider — crossfades a set of discovered images */
.svc-slider { position: relative; overflow: hidden; border-radius: var(--r-lg); }
.svc-slider img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}
.svc-slider img.is-active { opacity: 1; }
.svc-slider > img:only-child { opacity: 1; position: static; }

/* Theme-aware filter strength. Dark mode darkens more for text legibility. */
[data-theme='dark'] .hero-media img { filter: brightness(.55) saturate(1.05); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .hero-media img { filter: brightness(.55) saturate(1.05); }
}
.hero-overlay {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(10,22,38,.10) 0%, rgba(10,22,38,.35) 40%, rgba(10,22,38,.85) 100%),
    linear-gradient(90deg, rgba(20,184,166,.18) 0%, transparent 60%);
}
@keyframes heroZoom {
  from { transform: scale(1) translate(0, 0); }
  to   { transform: scale(1.18) translate(-1.5%, -1%); }
}
.hero-content {
  padding-block: var(--s-24) var(--s-20);
  max-width: 760px;
  margin-left: 15%;
  margin-right: auto;
  text-align: left;
}
@media (max-width: 1024px) { .hero-content { margin-left: 0; } }
.hero h1 { color: #fff; }
.hero h1 .accent { color: var(--teal-400); }

/* Hero eyebrow: pill with translucent backdrop so it reads on any image. */
.hero .eyebrow {
  display: inline-flex;
  padding: .4rem .8rem .4rem .65rem;
  background: rgba(10, 22, 38, .3);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.hero .eyebrow::before { width: 16px; background: var(--teal-400); }
@media (max-width: 600px) {
  .hero .eyebrow {
    font-size: .68rem;
    letter-spacing: .12em;
    padding: .3rem .65rem .3rem .55rem;
  }
  .hero .eyebrow::before { width: 12px; }
}
.hero-lead {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  color: rgba(255,255,255,.86);
  max-width: 60ch;
  margin-top: var(--s-6);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-8); }
.hero-meta {
  position: absolute;
  bottom: var(--s-8);
  right: clamp(1rem, 3vw, 2rem);
  display: flex; gap: var(--s-6);
  font-family: var(--font-display);
  font-size: .8rem;
  color: rgba(255,255,255,.7);
  text-transform: uppercase;
  letter-spacing: .14em;
}
@media (max-width: 700px) { .hero-meta { display: none; } }

/* Stats strip */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-6);
  padding: var(--s-8);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-top: calc(-1 * var(--s-12));
  position: relative;
  z-index: 2;
  box-shadow: var(--shadow-lg);
}
.stats .stat { text-align: left; }
.stats .num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  color: var(--brand);
  line-height: 1;
  display: block;
}
[data-theme='dark'] .stats .num { color: var(--accent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .stats .num { color: var(--accent); }
}
.stats .lbl { display: block; margin-top: var(--s-2); font-size: .9rem; color: var(--text-muted); }
@media (max-width: 800px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* Section header */
.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-12);
  align-items: end;
  margin-bottom: var(--s-12);
}
.section-head .lead { color: var(--text-muted); font-size: 1.1rem; }
@media (max-width: 800px) { .section-head { grid-template-columns: 1fr; gap: var(--s-4); } }

/* Service tabs */
.svc-tabs {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--s-10);
  align-items: start;
}
@media (max-width: 900px) { .svc-tabs { grid-template-columns: 1fr; } }

.tab-list {
  display: flex; flex-direction: column;
  gap: 2px;
  border-left: 1px solid var(--border);
}
@media (max-width: 900px) {
  /* Wrap the tab-list so we can paint edge fades + a hint arrow as siblings. */
  .svc-tabs > .tab-list {
    position: relative;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    border-left: 0;
    border-bottom: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    gap: var(--s-2);
    padding: var(--s-3) var(--s-5);
    margin-inline: calc(-1 * var(--s-5));
    /* Light surface so the pills read as a connected toolbar. */
    background: var(--bg-muted);
    border-radius: var(--r-md);
    /* Right-edge fade hints there's more to scroll. */
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 32px), transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 32px), transparent 100%);
  }
  .svc-tabs > .tab-list::-webkit-scrollbar { display: none; width: 0; height: 0; }
  .svc-tabs > .tab-list .tab-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: .55rem 1rem;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 600;
    font-size: .9rem;
    margin-left: 0;
    border-left: 0;
    border-bottom: 0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  }
  .svc-tabs > .tab-list .tab-btn .idx {
    display: inline-block;
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    color: var(--accent);
    border-radius: 999px;
    padding: 2px 8px;
    margin-right: 8px;
    font-weight: 700;
    font-size: .72rem;
  }
  .svc-tabs > .tab-list .tab-btn.active {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
  }
  .svc-tabs > .tab-list .tab-btn.active .idx {
    background: rgba(255, 255, 255, .22);
    color: #fff;
  }
  /* Subtle "swipe to see more" hint above the pill row. */
  .svc-tabs > .tab-list::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 6px;
    width: 18px;
    height: 18px;
    background: var(--accent);
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M9 18l6-6-6-6'/></svg>") center / contain no-repeat;
            mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M9 18l6-6-6-6'/></svg>") center / contain no-repeat;
    transform: translateY(-50%);
    opacity: .55;
    animation: tabHint 1.6s ease-in-out infinite;
    pointer-events: none;
  }
  @keyframes tabHint {
    0%, 100% { transform: translate(0, -50%); opacity: .35; }
    50%      { transform: translate(4px, -50%); opacity: .75; }
  }
}
.tab-btn {
  text-align: left;
  padding: var(--s-4) var(--s-5);
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--text-muted);
  border-left: 2px solid transparent;
  margin-left: -1px;
  position: relative;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), background var(--dur) var(--ease);
  white-space: nowrap;
}
.tab-btn .idx {
  font-size: .75rem; color: var(--text-subtle); margin-right: var(--s-3); font-variant-numeric: tabular-nums;
}
.tab-btn:hover { color: var(--text); background: var(--bg-muted); }
.tab-btn:focus { outline: none; }
.tab-btn:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: var(--r-sm); }
.tab-btn.active { color: var(--brand); border-left-color: var(--accent); background: var(--bg-muted); }
[data-theme='dark'] .tab-btn.active { color: var(--accent); }
@media (max-width: 900px) {
  .tab-btn { border-left: 0; border-bottom: 2px solid transparent; margin-left: 0; margin-bottom: -1px; }
  .tab-btn.active { border-left: 0; border-bottom-color: var(--accent); }
}

.tab-panel {
  display: none;
  animation: fadeUp var(--dur-slow) var(--ease);
}
.tab-panel.active { display: grid; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.tab-panel {
  grid-template-columns: 1.1fr 1fr;
  gap: var(--s-8);
  align-items: start;
}
@media (max-width: 800px) { .tab-panel { grid-template-columns: 1fr; } }
.tab-panel .img {
  aspect-ratio: 4/3;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}
.tab-panel .img img { width: 100%; height: 100%; object-fit: cover; }
.tab-panel h3 { margin-bottom: var(--s-4); }
.tab-panel p { color: var(--text-muted); margin-bottom: var(--s-5); }
.tab-panel ul { list-style: none; padding: 0; display: grid; gap: var(--s-3); margin-bottom: var(--s-6); }
.tab-panel ul li {
  display: flex; align-items: flex-start; gap: var(--s-3);
  color: var(--text-muted);
}
.tab-panel ul li svg { flex-shrink: 0; width: 20px; height: 20px; color: var(--accent); margin-top: 2px; }

/* Services grid (home) */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--s-6);
}

/* ===== Service marquee (single-row infinite carousel on home) ===== */
.svc-marquee {
  position: relative;
  overflow: hidden;
  padding-block: var(--s-4);
}
.svc-marquee__track {
  display: flex;
  width: max-content;
  gap: var(--s-6);
  animation: svcScroll 35s linear infinite;
  will-change: transform;
  user-select: none;
  -webkit-user-select: none;
}
.svc-marquee__track img,
.svc-marquee__track a { -webkit-user-drag: none; user-drag: none; }
.svc-marquee__track img { pointer-events: none; }
.svc-marquee__track .svc-card { touch-action: pan-y; }
/* Paused while user actively drags (set by JS). Hover no longer pauses. */
.svc-marquee.is-dragging { cursor: grabbing; }
.svc-marquee.is-dragging .svc-card { cursor: grabbing; }
.svc-marquee.is-dragging .svc-marquee__track { animation-play-state: paused; }
.svc-marquee { cursor: grab; }
.svc-marquee .svc-card { cursor: grab; }
@keyframes svcScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.svc-marquee .svc-card {
  flex: 0 0 320px;
  width: 320px;
  aspect-ratio: 3/4;
}
@media (max-width: 600px) {
  .svc-marquee .svc-card { flex-basis: 260px; width: 260px; }
}
@media (prefers-reduced-motion: reduce) {
  .svc-marquee__track { animation: none; }
}
.svc-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  aspect-ratio: 3/4;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  isolation: isolate;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .svc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
}
.svc-card:focus { outline: none; }
.svc-card:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; border-radius: var(--r-lg); }
.svc-card img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  z-index: -2;
  transition: transform var(--dur-slow) var(--ease), opacity 1s var(--ease);
}
/* When slider populated, every img except .is-active is hidden */
.svc-card[data-svc-slider] img { opacity: 0; }
.svc-card[data-svc-slider] img.is-active { opacity: 1; }
/* Fallback for cards with only one img (slider didn't populate) */
.svc-card[data-svc-slider] img:only-of-type { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .svc-card:hover img.is-active,
  .svc-card:hover > img:only-of-type { transform: scale(1.06); }
}
.svc-card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(10,22,38,.92) 100%);
  z-index: -1;
}
.svc-card .body { padding: var(--s-6); }
.svc-card .idx { font-family: var(--font-display); font-size: .8rem; opacity: .75; letter-spacing: .14em; }
.svc-card h3 { color: #fff; margin: var(--s-2) 0 var(--s-3); font-size: 1.5rem; }
.svc-card p { font-size: .95rem; opacity: .85; margin-bottom: var(--s-4); }
.svc-card .arrow {
  display: inline-flex; align-items: center; gap: var(--s-2);
  color: var(--teal-400);
  font-weight: 600; font-family: var(--font-display);
}
.svc-card .arrow svg { width: 18px; height: 18px; transition: transform var(--dur) var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .svc-card:hover .arrow svg { transform: translateX(4px); }
}

/* Project gallery */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--s-4);
  grid-auto-rows: 1fr;
  align-items: stretch;
}
.proj-tile {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--bg-muted);
  border: 1px solid var(--border);
  cursor: pointer;
}
/* Use padding-bottom intrinsic ratio instead of aspect-ratio inside the grid:
 * iOS Safari has known cases where a grid item with `aspect-ratio` collapses
 * to zero height (rotating featured grid was hitting this on phones).
 * The fixed padding-bottom box works the same way visually but is rock solid. */
.proj-tile { height: 0; padding-bottom: 75%; aspect-ratio: auto; }
.proj-tile img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0;
  transition: opacity 2s cubic-bezier(.4, 0, .2, 1),
              transform var(--dur-slow) var(--ease);
}
.proj-tile img.is-active,
.proj-tile > img:only-of-type { opacity: 1; }
.proj-tile:hover img.is-active,
.proj-tile:hover > img:only-of-type { transform: scale(1.05); }
.proj-tile .meta {
  position: absolute; inset: auto 0 0 0;
  padding: var(--s-5);
  background: linear-gradient(180deg, transparent, rgba(10,22,38,.92));
  color: #fff;
  transform: translateY(20%);
  opacity: 0;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.proj-tile:hover .meta { transform: translateY(0); opacity: 1; }
.proj-tile .meta h4 { color: #fff; margin-bottom: var(--s-1); }
.proj-tile .meta span { font-size: .85rem; color: var(--teal-400); font-family: var(--font-display); letter-spacing: .1em; text-transform: uppercase; }

/* Custom layout, 6-col grid:
 *   Row 1-2:  T1 (4×2 big)        T2 (2×2 tall)
 *   Row 3:    T3 (2×1)  T4 (2×1)  T5 (2×1)
 *   Row 4:    T6 (3×1 half)       T7 (3×1 half)
 * Index variant ships 5 tiles → rows 1-3 only.
 *
 * Padding-bottom math (every tile = own width × ratio, gaps ignored):
 *   Single row, 4:3 cell ⇒ pb = 75% of cell width.
 *   T1 (4 col × 2 row): width = 4u, height should be 2×row = 2×(2u×3/4) = 3u
 *       → pb = 3u / 4u = 75%
 *   T2 (2 col × 2 row): width = 2u, height = 3u → pb = 150%
 *   T3-T5 (2 col × 1 row): width = 2u, height = 1.5u → pb = 75%
 *   T6-T7 (3 col × 1 row): width = 3u, height = 1.5u → pb = 50%
 */
.proj-tile:nth-child(1) { grid-column: span 4; grid-row: span 2; padding-bottom: 75%; }
.proj-tile:nth-child(2) { grid-column: span 2; grid-row: span 2; padding-bottom: 150%; }
.proj-tile:nth-child(3),
.proj-tile:nth-child(4),
.proj-tile:nth-child(5) { grid-column: span 2; padding-bottom: 75%; }
.proj-tile:nth-child(6),
.proj-tile:nth-child(7) { grid-column: span 3; padding-bottom: 50%; }

/* Smaller, uniform thumbnail gallery (used below the rotating featured grid) */
.proj-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: var(--s-2);
}
.proj-thumbs .proj-tile,
.proj-thumbs .proj-tile:nth-child(n) {
  grid-column: span 1;
  grid-row: span 1;
  padding-bottom: 100%;
  border-radius: var(--r-sm);
}
.proj-thumbs .proj-tile .meta { display: none; }

@media (max-width: 800px) {
  /* Featured grid → 2 columns. T1 spans full width, the rest are uniform tiles. */
  .proj-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: auto; }
  .proj-grid > .proj-tile,
  .proj-grid > .proj-tile:nth-child(n) {
    grid-column: span 1;
    grid-row: span 1;
    padding-bottom: 75%; /* 4:3 per-cell */
  }
  .proj-grid > .proj-tile:nth-child(1) {
    grid-column: span 2;
    grid-row: span 1;
    padding-bottom: 56.25%; /* 16:9 wide hero for the lead tile on phones */
  }
  .proj-thumbs { grid-template-columns: repeat(4, 1fr); gap: var(--s-2); }
  .proj-thumbs .proj-tile { padding-bottom: 100%; }
}

/* Logo strip */
.logo-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: var(--s-8);
  align-items: center;
  padding-block: var(--s-8);
  border-block: 1px solid var(--border);
  opacity: .8;
}
.logo-strip .item {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-subtle);
  text-align: center;
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: color var(--dur) var(--ease);
}
.logo-strip .item:hover { color: var(--text); }

/* ===== Pledge (quality policy commitment block) ===== */
/* ===== Pledge (quality policy commitment block) — redesigned ===== */
.pledge {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding-top: clamp(4rem, 7vw, 6rem);
  padding-bottom: clamp(2.5rem, 4.5vw, 3.5rem);
  padding-inline: clamp(var(--s-8), 6vw, 5rem);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
/* Decorative oversized monogram in the background corner */
.pledge::after {
  content: 'MK';
  position: absolute;
  right: -.18em;
  bottom: -.42em;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(11rem, 22vw, 18rem);
  line-height: 1;
  color: var(--accent);
  opacity: .045;
  pointer-events: none;
  letter-spacing: -.04em;
}
[data-theme='dark'] .pledge::after { opacity: .08; }

/* Header: stacked, centered eyebrow + title with under-rule */
.pledge__head {
  text-align: center;
  margin-bottom: clamp(var(--s-7), 4vw, var(--s-9));
  position: relative;
  z-index: 1;
}
.pledge__head .eyebrow {
  font-size: .85rem;
  justify-content: center;
}
.pledge__head .eyebrow::before { display: none; }
.pledge .pledge__head h2 {
  font-family: var(--font-display) !important;
  font-size: clamp(1.5rem, 2.6vw, 2rem) !important;
  font-weight: 800 !important;
  letter-spacing: -.02em !important;
  line-height: 1.2 !important;
  color: var(--text) !important;
  text-transform: none !important;
  margin: var(--s-4) 0 var(--s-6) 0 !important;
}

/* Items: 2-col grid on large screens, generous spacing, hover lift */
.pledge__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4) var(--s-6);
  position: relative;
  z-index: 1;
}
@media (min-width: 820px) {
  .pledge__list { grid-template-columns: 1fr 1fr; }
}
.pledge__list li {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: start;
  gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg);
  color: var(--text-muted);
  font-size: .98rem;
  line-height: 1.65;
  max-width: none;
  transition: border-color var(--dur) var(--ease),
              transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.pledge__list li:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
/* Check badge: filled accent disc with white tick */
.pledge__list li::before {
  content: '';
  width: 22px;
  height: 22px;
  margin-top: .15em;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
}
.pledge__list li::after {
  content: '';
  position: absolute;
  left: calc(var(--s-5) + 5px);
  top: calc(var(--s-4) + .15em + 7px);
  width: 11px;
  height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
  transform-origin: center;
}

/* Sign-off line: centered with subtle flanking rules */
.pledge__sign {
  display: block;
  margin: clamp(1.25rem, 2.5vw, 2rem) auto 0;
  max-width: none;
  width: 100%;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.01em;
  text-align: center;
  position: relative;
  z-index: 1;
}

@media (max-width: 600px) {
  .pledge__list li { font-size: .93rem; padding: var(--s-3) var(--s-4); }
  .pledge__list li::after {
    left: calc(var(--s-4) + 5px);
    top: calc(var(--s-3) + .15em + 7px);
  }
  .pledge__sign { font-size: 1rem; gap: var(--s-3); }
}

/* CTA block */
/* Tender section header: single column, tight vertical rhythm */
.tender-head {
  max-width: 720px;
  margin-bottom: var(--s-9);
}
.tender-head h2 {
  margin: var(--s-3) 0 var(--s-5) 0;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: -.02em;
}
.tender-head .lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.65;
  margin: 0;
}

/* ===== Tender timeline (Projects page) ===== */
.tender-timeline {
  position: relative;
  padding-left: var(--s-8);
  margin-top: var(--s-8);
}
.tender-timeline::before {
  content: '';
  position: absolute;
  top: .5em;
  bottom: .5em;
  left: 11px;
  width: 2px;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--accent) 70%, transparent),
    color-mix(in srgb, var(--accent) 15%, transparent));
}
.tender-year {
  position: relative;
  margin-top: var(--s-8);
  margin-bottom: var(--s-4);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -.01em;
  color: var(--text);
}
.tender-year:first-of-type { margin-top: 0; }
.tender-year::before {
  content: '';
  position: absolute;
  left: -34px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg-muted), 0 0 0 5px color-mix(in srgb, var(--accent) 35%, transparent);
}
.tender-item {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-4);
  padding: var(--s-4) 0;
  border-top: 1px dashed var(--border);
}
.tender-item + .tender-year { margin-top: var(--s-8); }
.tender-item:first-of-type { border-top: 0; padding-top: var(--s-2); }
.tender-item::before {
  content: '';
  position: absolute;
  left: -27px;
  top: calc(var(--s-4) + .9em);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border-strong);
}
.tender-item[data-status="ongoing"]::before {
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 24%, transparent);
  animation: tenderPulse 2s ease-in-out infinite;
}
@keyframes tenderPulse {
  0%, 100% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 24%, transparent); }
  50%      { box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 10%, transparent); }
}
.tender-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  align-self: start;
  margin-top: 4px;
}
.tender-item[data-status="ongoing"] .tender-status {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}
.tender-item[data-status="done"] .tender-status {
  background: color-mix(in srgb, var(--text-muted) 12%, transparent);
  color: var(--text-muted);
}
.tender-body h4 {
  margin: 0 0 var(--s-2) 0;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  letter-spacing: -.005em;
}
.tender-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.4;
}
.tender-meta .agency { color: var(--text-muted); }
.tender-meta .city {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--text);
}
.tender-meta .city::before {
  content: '';
  width: 4px; height: 4px;
  background: var(--border-strong);
  border-radius: 50%;
}
@media (max-width: 600px) {
  .tender-timeline { padding-left: var(--s-6); }
  .tender-year { font-size: 1.2rem; }
  .tender-year::before { left: -28px; width: 12px; height: 12px; }
  .tender-item { grid-template-columns: 1fr; gap: var(--s-2); }
  .tender-item::before { left: -23px; }
}

/* ===== Premium CTA block =====
 * Layered build:
 *  - Optional background photo (cta-bg image, very dark, low opacity)
 *  - Solid navy base for contrast safety
 *  - Soft accent glow + subtle grid pattern overlay
 *  - Accent rule across the top + side accent stripe (a quiet visual signature)
 *  - Generous padding, clear type hierarchy, primary accent CTA + ghost CTA
 */
.cta-block {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  padding: clamp(2.5rem, 6vw, 4.5rem);
  background: linear-gradient(135deg, #0F1F36 0%, #1E3A5F 55%, #0B1828 100%);
  color: #fff;
  display: grid;
  grid-template-columns: 1.6fr auto;
  gap: var(--s-8);
  align-items: center;
  isolation: isolate;
  box-shadow: 0 30px 60px -30px rgba(11, 24, 40, .45);
}
/* Optional background photo: drop an <img class="cta-bg" src="..."> as a child for a hero-style backdrop. */
.cta-block .cta-bg {
  position: absolute; inset: 0; z-index: -3;
  width: 100%; height: 100%; object-fit: cover;
  opacity: .18;
  filter: saturate(.85) contrast(1.05);
}
/* Soft accent glow */
.cta-block::before {
  content: ''; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(circle at 88% 18%, color-mix(in srgb, var(--accent) 38%, transparent), transparent 55%),
    radial-gradient(circle at 8% 92%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%);
}

/* Top accent rule + side accent stripe */
.cta-block .cta-head {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding-left: var(--s-5);
}
.cta-block .cta-head::before {
  content: '';
  position: absolute;
  left: 0; top: .4em;
  width: 3px; height: calc(100% - .8em);
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 30%, transparent));
  border-radius: 2px;
}
.cta-block .eyebrow {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.cta-block .eyebrow::before { display: none; }
.cta-block h2 {
  color: #fff;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.15;
  margin: 0;
}
.cta-block p {
  color: rgba(255, 255, 255, .82);
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  max-width: 60ch;
}

.cta-block .actions {
  display: flex; flex-wrap: wrap; gap: var(--s-3);
  justify-self: end;
}
.cta-block .btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
  box-shadow: 0 8px 22px -8px color-mix(in srgb, var(--accent) 70%, transparent);
}
.cta-block .btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 88%, #fff);
  border-color: color-mix(in srgb, var(--accent) 88%, #fff);
  color: var(--on-accent);
}
.cta-block .btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .04);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.cta-block .btn-ghost:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, .8);
  background: rgba(255, 255, 255, .08);
}

@media (max-width: 800px) {
  .cta-block {
    grid-template-columns: 1fr;
    gap: var(--s-6);
    padding: clamp(2rem, 7vw, 3rem);
  }
  .cta-block .actions { justify-self: start; }
  .cta-block .cta-head { padding-left: var(--s-4); }
}
@media (prefers-reduced-motion: reduce) {
  .cta-block .btn-primary, .cta-block .btn-ghost { transition: none; }
}

/* Footer */
.footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding-block: var(--s-16) var(--s-8);
  color: var(--text-muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: var(--s-10);
  margin-bottom: var(--s-12);
}
@media (max-width: 800px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--s-8) var(--s-6);
  }
  /* Brand spans the whole first row: logo on top, description below. */
  .footer-brand {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-3);
  }
  .footer-brand .nav-logo { margin: 0; }
  .footer-brand p { margin: 0; max-width: none; font-size: .92rem; }
  /* Row 2: extra top breathing room so columns don't crowd the logo block. */
  .footer-grid > div:nth-child(2),
  .footer-grid > div:nth-child(3) { padding-top: var(--s-8); }
  /* Row 2 order: Hizmetler left, Hızlı Bağlantılar right. */
  .footer-grid > div:nth-child(2) { order: 2; }
  .footer-grid > div:nth-child(3) { order: 1; }
}
.footer h5 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--text);
  margin-bottom: var(--s-4);
}
.footer ul { list-style: none; padding: 0; display: grid; gap: var(--s-3); }
.footer ul a { color: var(--text-muted); }
.footer ul a:hover { color: var(--accent); }
.footer-brand img { height: 72px; width: auto; margin-bottom: var(--s-4); }
.footer-brand p { max-width: 36ch; font-size: .95rem; }
.footer-bottom {
  padding-top: var(--s-6);
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s-4);
  font-size: .85rem; color: var(--text-subtle);
}
@media (max-width: 600px) {
  .footer-bottom { justify-content: center; text-align: center; }
  .footer-bottom > * { width: 100%; }
}
.powered-by {
  color: var(--text-muted);
  font-weight: 600;
  transition: color var(--dur) var(--ease);
}
.powered-by:hover { color: var(--accent); }

/* Page hero (interior pages) */
.page-hero {
  position: relative;
  padding-block: clamp(5rem, 12vw, 9rem) clamp(3rem, 8vw, 6rem);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  isolation: isolate;
}
.page-hero .crumb {
  font-family: var(--font-display);
  font-size: .85rem;
  color: var(--text-subtle);
  letter-spacing: .12em;
  text-transform: uppercase;
  display: flex; gap: var(--s-3); align-items: center;
  margin-bottom: var(--s-4);
}
.page-hero .crumb a:hover { color: var(--accent); }
.page-hero .lead { max-width: 60ch; color: var(--text-muted); font-size: 1.15rem; margin-top: var(--s-5); }

/* Two col content */
.two-col {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--s-12);
  align-items: center;
}
.two-col.reverse > :first-child { order: 2; }
@media (max-width: 900px) {
  .two-col, .two-col.reverse > :first-child { grid-template-columns: 1fr; order: unset; }
}
.two-col .img { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border); aspect-ratio: 4/3; }
.two-col .img img { width: 100%; height: 100%; object-fit: cover; }

/* Intro section: 1:1 columns on desktop, stacked on mobile with image on top */
.intro-two-col { grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) {
  .intro-two-col { grid-template-columns: 1fr; }
  .intro-two-col > .img { order: -1; }
  /* In page-hero, keep text first then image (text→image on mobile). */
  .page-hero .intro-two-col > .img { order: 0; }
}

/* ===== Story block — split layout with animated accents ===== */
.story-block {
  position: relative;
  display: block;
  padding: clamp(2rem, 5vw, 3.5rem);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  isolation: isolate;
}

/* Top progress bar that loads in on reveal */
.story-block::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 1.1s cubic-bezier(.4, 0, .2, 1) .15s;
}
.story-block.in::before,
.reveal.in .story-block::before { transform: scaleX(1); }

/* Floating decorative blob, slowly drifting */
.story-block::after {
  content: '';
  position: absolute;
  inset: auto -160px -160px auto;
  width: 360px; height: 360px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%);
  z-index: -1;
  animation: storyDrift 14s ease-in-out infinite alternate;
}
@keyframes storyDrift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-30px, -20px) scale(1.08); }
}

.story-block__side {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  margin: 0 0 var(--s-5) 0;
  padding: 0 0 var(--s-5) 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
/* External layout: image (3:4) on the left + story-block card on the right. */
.story-wrap {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: var(--s-8);
  align-items: stretch;
}
@media (max-width: 900px) {
  .story-wrap { grid-template-columns: 1fr; gap: var(--s-6); }
}
.story-wrap__media {
  aspect-ratio: 3/4;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--bg-muted);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}
.story-wrap__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--ease);
}
.story-wrap__media:hover img { transform: scale(1.04); }
.story-block__year {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--brand);
}
.story-block__year-label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-muted);
  align-self: center;
  padding-left: var(--s-4);
  border-left: 1px solid var(--border);
  line-height: 1.3;
}
[data-theme='dark'] .story-block__year { color: var(--accent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .story-block__year { color: var(--accent); }
}
.story-block__side .story-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-display);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--text-subtle);
}
.story-block__side .story-eyebrow svg { width: 16px; height: 16px; }
.story-block__divider {
  width: 1px; height: 28px;
  background: var(--border);
  border-radius: 0;
  flex-shrink: 0;
}
@keyframes dividerSweep {
  0%   { transform: translateX(-100%); }
  60%  { transform: translateX(100%); }
  100% { transform: translateX(100%); }
}

.story-block__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.story-block__heading {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  line-height: 1.3;
  color: var(--text);
  margin: 0 0 var(--s-4) 0;
  letter-spacing: -.01em;
}
.story-block__body p {
  font-size: 1.08rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin: 0 0 var(--s-5) 0;
  max-width: 68ch;
  position: relative;
}
.story-block__body p:last-child { margin-bottom: 0; }
.story-block__body p strong { color: var(--text); font-weight: 600; }
.story-block__body p:first-child::before {
  content: '';
  position: absolute;
  left: -16px; top: .55em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 14%, transparent);
  animation: storyDot 2.4s var(--ease) infinite;
}
@keyframes storyDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(.85); opacity: .65; }
}
@media (max-width: 720px) {
  .story-block__body p:first-child::before { left: 0; top: -8px; }
  .story-block__body p:first-child { padding-top: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .story-block::before,
  .story-block::after,
  .story-block__divider::after,
  .story-block__body p:first-child::before {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}

/* Feature list */
.feature-list { display: grid; gap: var(--s-5); margin-top: var(--s-6); }
.feature-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  grid-template-rows: auto auto;
  gap: var(--s-2) var(--s-4);
  align-items: center;
}
.feature-item > div { display: contents; }
.feature-item h4 { grid-column: 2; align-self: center; margin: 0; }
.feature-item p {
  grid-column: 1 / -1;
  margin-top: var(--s-2);
  text-align: left;
}
.feature-item .icon { grid-row: 1; }
.feature-item .icon {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  border-radius: var(--r-md);
}
.feature-item .icon svg { width: 22px; height: 22px; }
.feature-item h4 { margin-bottom: var(--s-1); }
.feature-item p { color: var(--text-muted); font-size: .98rem; }

/* ===== Cert grid (sertifikalar.html) ===== */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--s-6);
}
.cert {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--s-8) var(--s-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  position: relative;
  overflow: hidden;
  transition: border-color var(--dur) var(--ease),
              transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.cert::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.cert:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.cert:hover::before { opacity: 1; }

.cert .badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-2);
  width: 100%;
  height: auto;
  margin-bottom: var(--s-4);
}
.cert .badge img {
  width: 84px;
  height: 84px;
  object-fit: contain;
  display: block;
  transition: filter var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.cert:hover .badge img { transform: scale(1.04); }
[data-theme='dark'] .cert .badge img[src*="iso.png"],
[data-theme='dark'] .cert .badge img[src*="ce.png"],
[data-theme='dark'] .cert-marquee .cert-img img[src*="iso.png"],
[data-theme='dark'] .cert-marquee .cert-img img[src*="ce.png"] {
  filter: invert(1) brightness(1.1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .cert .badge img[src*="iso.png"],
  :root:not([data-theme]) .cert .badge img[src*="ce.png"],
  :root:not([data-theme]) .cert-marquee .cert-img img[src*="iso.png"],
  :root:not([data-theme]) .cert-marquee .cert-img img[src*="ce.png"] {
    filter: invert(1) brightness(1.1);
  }
}
.cert .badge .badge-code {
  display: inline-block;
  padding: .3rem .7rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .85rem;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 8%, transparent);
  border-radius: 999px;
  letter-spacing: .04em;
  text-transform: none;
  line-height: 1.1;
  white-space: nowrap;
}
.cert .badge .badge-code[aria-hidden="true"] { visibility: hidden; }

.cert h4 {
  font-size: 1.15rem;
  margin-bottom: var(--s-2);
  letter-spacing: -.01em;
}
.cert p {
  font-size: .92rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: var(--s-4);
  max-width: none;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--s-6);
  align-items: stretch;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-map-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.contact-map-col .map {
  flex: 1;
  aspect-ratio: auto;
}
/* Unified card: map on top, address row at the bottom */
.contact-map-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: border-color var(--dur) var(--ease),
              transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
  min-height: 0;
}
.contact-map-card:hover,
.contact-map-card:focus-visible {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.contact-map-card .map {
  flex: 1;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--border);
}
.contact-map-card .map-footer {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: var(--s-4);
  align-items: center;
  padding: var(--s-5);
}
.contact-map-card .map-footer .icon {
  width: 52px; height: 52px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-muted);
  color: var(--accent);
  border-radius: var(--r-md);
  transition: background var(--dur) var(--ease);
}
.contact-map-card:hover .map-footer .icon { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.contact-map-card .map-footer .icon svg { width: 24px; height: 24px; }
.contact-map-card .map-footer h5 {
  font-family: var(--font-display);
  margin: 0 0 var(--s-1) 0;
  font-size: .95rem;
  color: var(--text);
}
.contact-map-card .map-footer span { color: var(--text-muted); font-size: .95rem; display: block; }

/* Hash-target highlight: brief accent ring fades in/out when arriving via #anchor */
@keyframes hashFlash {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent); transform: translateY(8px); opacity: .6; }
  20%  { box-shadow: 0 0 0 14px color-mix(in srgb, var(--accent) 20%, transparent); transform: translateY(0); opacity: 1; }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent); transform: translateY(0); opacity: 1; }
}
.hash-flash .contact-grid {
  animation: hashFlash 1.6s cubic-bezier(.22,.61,.36,1);
  border-radius: var(--r-lg);
}

.contact-info { display: grid; gap: var(--s-4); }
.contact-grid .row,
.contact-info .row {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: var(--s-4);
  align-items: center;
  padding: var(--s-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06),
              0 4px 12px -6px rgba(15, 23, 42, .08);
  transition: border-color var(--dur) var(--ease),
              transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              background var(--dur) var(--ease);
}
/* Dark mode: lift the cards off the body with a brighter surface + stronger shadow */
[data-theme='dark'] .contact-grid .row,
[data-theme='dark'] .contact-info .row {
  background: color-mix(in srgb, var(--surface) 88%, #fff 6%);
  border-color: color-mix(in srgb, var(--border) 60%, #fff 8%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .45),
              0 8px 22px -8px rgba(0, 0, 0, .55);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .contact-grid .row,
  :root:not([data-theme]) .contact-info .row {
    background: color-mix(in srgb, var(--surface) 88%, #fff 6%);
    border-color: color-mix(in srgb, var(--border) 60%, #fff 8%);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .45),
                0 8px 22px -8px rgba(0, 0, 0, .55);
  }
}
.contact-grid a.row:hover,
.contact-grid a.row:focus-visible,
.contact-info a.row:hover,
.contact-info a.row:focus-visible {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.contact-grid a.row:hover .icon,
.contact-info a.row:hover .icon { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.contact-grid .row .icon,
.contact-info .row .icon {
  width: 52px; height: 52px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-muted);
  color: var(--accent);
  border-radius: var(--r-md);
  transition: background var(--dur) var(--ease);
}
.contact-grid .row .icon svg,
.contact-info .row .icon svg { width: 24px; height: 24px; }
.contact-grid h5,
.contact-info h5 { font-family: var(--font-display); margin-bottom: var(--s-1); font-size: .95rem; color: var(--text); }
.contact-grid p,
.contact-info p,
.contact-grid .row > div > span,
.contact-info .row > div > span { color: var(--text-muted); font-size: .95rem; display: block; }

.form { display: grid; gap: var(--s-4); }
.form .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
@media (max-width: 600px) { .form .row-2 { grid-template-columns: 1fr; } }
.field { display: grid; gap: var(--s-2); }
.field label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: .85rem;
  letter-spacing: .04em;
  color: var(--text-muted);
}
.field input, .field textarea, .field select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: .85rem 1rem;
  min-height: 48px;
  color: var(--text);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--ring);
}
.field textarea { min-height: 140px; resize: vertical; font-family: var(--font-body); }

.map {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-muted);
}
.map iframe {
  width: 100%; height: 100%; border: 0;
  filter: grayscale(.2) contrast(1.05);
  pointer-events: none;
}
.map .map-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: pointer;
  background: transparent;
}

/* ===== Career / Positions ===== */
.pos-grid {
  display: grid;
  gap: var(--s-4);
}
.pos {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: var(--s-5);
  padding: var(--s-5) var(--s-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.pos:hover {
  border-color: var(--accent);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}
.pos .ico {
  width: 56px; height: 56px;
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  border-radius: var(--r-md);
}
.pos .ico svg { width: 28px; height: 28px; }
.pos h4 { font-size: 1.15rem; margin-bottom: var(--s-1); }
.pos .meta {
  display: flex; flex-wrap: wrap; gap: var(--s-3);
  font-family: var(--font-display);
  font-size: .85rem;
  color: var(--text-subtle);
}
.pos .meta span { display: inline-flex; align-items: center; gap: .35rem; }
.pos .meta svg { width: 14px; height: 14px; opacity: .8; }
.pos .meta .dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--border-strong);
  align-self: center;
}
.pos .apply {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: .55rem 1rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .9rem;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: var(--r-md);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.pos .apply:hover {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}
.pos .apply svg { width: 14px; height: 14px; transition: transform var(--dur) var(--ease); }
.pos .apply:hover svg { transform: translateX(3px); }

@media (max-width: 720px) {
  .pos { grid-template-columns: 48px 1fr; row-gap: var(--s-3); }
  .pos .ico { width: 48px; height: 48px; }
  .pos .apply { grid-column: 1 / -1; justify-self: end; }
  .pos:hover { transform: none; }
}

.kvkk-note {
  padding: var(--s-5) var(--s-6);
  background: var(--bg-muted);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
  font-size: .9rem;
  color: var(--text-muted);
}
.kvkk-note strong { color: var(--text); display: block; margin-bottom: .35rem; font-family: var(--font-display); }

/* ===== Cert carousel (home, marquee) ===== */
.cert-marquee {
  position: relative;
  overflow: hidden;
  padding-block: var(--s-6);
  cursor: grab;
}
.cert-marquee.is-dragging,
.cert-marquee.is-dragging .cert-item { cursor: grabbing; }
.cert-marquee .cert-item { cursor: grab; }
.cert-marquee__track {
  display: flex;
  width: max-content;
  gap: var(--s-6);
  animation: certScroll 35s linear infinite;
  will-change: transform;
  user-select: none;
  -webkit-user-select: none;
}
.cert-marquee__track img,
.cert-marquee__track a { -webkit-user-drag: none; user-drag: none; }
.cert-marquee__track .cert-item { touch-action: pan-y; }
.cert-marquee.is-dragging .cert-marquee__track { animation-play-state: paused; }
@keyframes certScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.cert-marquee a.cert-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-width: 200px;
  padding: var(--s-5) var(--s-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  color: var(--text);
  text-decoration: none;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.cert-marquee a.cert-item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}
.cert-marquee .cert-img {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-2);
}
.cert-marquee .cert-img img {
  width: 96px;
  height: 96px;
  object-fit: contain;
}
.cert-marquee .cert-img .code {
  display: inline-block;
  padding: .2rem .5rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .78rem;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 8%, transparent);
  border-radius: 999px;
  letter-spacing: .04em;
  line-height: 1.1;
  white-space: nowrap;
  text-align: center;
}
.cert-marquee .cert-img .code[aria-hidden="true"] {
  visibility: hidden;
}
.cert-marquee .cert-desc {
  font-family: var(--font-display);
  font-size: .85rem;
  color: var(--text-muted);
  text-align: center;
}

/* ===== Lightbox ===== */
.lb {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
}
[data-theme='dark'] .lb {
  background: rgba(10, 22, 38, .9);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .lb {
    background: rgba(10, 22, 38, .9);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
  }
}
.lb.is-open { display: flex; }
.lb__stage {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  touch-action: pan-y;
}
.lb__img {
  display: block;
  max-width: 100%;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--r-md);
  box-shadow: 0 24px 64px rgba(0,0,0,.5);
  opacity: 0;
  transform: scale(.98);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.lb__img.is-ready { opacity: 1; transform: scale(1); }
.lb__btn,
.lb__nav {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  /* High-contrast in both themes: dark navy disc with white icon. */
  background: rgba(15, 34, 56, .92);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .25);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
  cursor: pointer;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
  z-index: 2;
}
.lb__btn:hover,
.lb__nav:hover {
  background: var(--accent);
  border-color: rgba(255, 255, 255, .55);
}
.lb__nav svg,
.lb__btn svg { width: 22px; height: 22px; stroke-width: 2.4; }
.lb__btn {
  top: clamp(.75rem, 2vw, 1.25rem);
  width: 44px; height: 44px;
}
.lb__btn svg { width: 22px; height: 22px; }
.lb__close { right: clamp(.75rem, 2vw, 1.25rem); }
.lb__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 52px; height: 52px;
}
.lb__nav svg { width: 24px; height: 24px; }
.lb__prev { left: clamp(.5rem, 2vw, 1.5rem); }
.lb__next { right: clamp(.5rem, 2vw, 1.5rem); }
.lb__counter {
  position: absolute;
  bottom: clamp(.75rem, 2vw, 1.25rem);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: .85rem;
  letter-spacing: .14em;
  color: var(--text-muted);
  background: rgba(255,255,255,.7);
  padding: .35rem .7rem;
  border-radius: 999px;
}
[data-theme='dark'] .lb__counter {
  color: rgba(255,255,255,.75);
  background: rgba(0,0,0,.35);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .lb__counter {
    color: rgba(255,255,255,.75);
    background: rgba(0,0,0,.35);
  }
}
.lb__caption {
  position: absolute;
  left: 50%;
  bottom: clamp(3rem, 7vw, 4.5rem);
  transform: translateX(-50%);
  width: auto;
  max-width: calc(100% - 4rem);
  text-align: center;
  color: var(--text);
  background: rgba(255,255,255,.86);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: .75rem 1rem;
  font-family: var(--font-body);
  z-index: 2;
}
.lb__caption h5 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .15rem;
  color: var(--text);
}
.lb__caption span {
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 600;
}
.lb__caption:empty { display: none; }
[data-theme='dark'] .lb__caption {
  color: #fff;
  background: rgba(10, 22, 38, .7);
  border-color: rgba(255,255,255,.12);
}
[data-theme='dark'] .lb__caption h5 { color: #fff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .lb__caption {
    color: #fff;
    background: rgba(10, 22, 38, .7);
    border-color: rgba(255,255,255,.12);
  }
  :root:not([data-theme]) .lb__caption h5 { color: #fff; }
}
@media (max-width: 600px) {
  .lb__nav { width: 44px; height: 44px; }
  .lb__nav svg { width: 20px; height: 20px; }
}
.lb-clickable,
.proj-tile,
.tab-panel .img { cursor: zoom-in; }

/* ===== Page intro loader ===== */
.intro-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.5rem;
  background: var(--bg);
  transition: opacity .55s var(--ease), visibility .55s var(--ease);
}
.intro-loader.is-hiding { opacity: 0; visibility: hidden; }
.intro-loader__ring {
  position: relative;
  width: 260px;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.intro-loader__ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  overflow: visible;
}
.intro-loader__ring .arc {
  fill: none;
  stroke: var(--steel-400);
  stroke-linecap: round;
  stroke-width: 3.5;
  stroke-dasharray: 90 510;
  animation: introArc 1.2s linear infinite;
}
.intro-loader__lockup {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  opacity: 0;
  transform: scale(.94);
  animation: introLockup .7s var(--ease) forwards;
}
.intro-loader__mark { height: 88px; width: auto; }
.intro-loader__word {
  height: 32px;
  width: auto;
  opacity: 0;
  transform: translateY(4px);
  animation: introWord .7s .25s var(--ease) forwards;
}
[data-theme='dark'] .intro-loader__mark,
[data-theme='dark'] .intro-loader__word {
  filter: brightness(2.4) contrast(1.05) saturate(.55);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .intro-loader__mark,
  :root:not([data-theme]) .intro-loader__word {
    filter: brightness(2.4) contrast(1.05) saturate(.55);
  }
}
@keyframes introArc {
  0%   { stroke-dashoffset: 600; }
  100% { stroke-dashoffset: 0; }
}
@keyframes introLockup {
  to { opacity: 1; transform: scale(1); }
}
@keyframes introWord {
  to { opacity: 1; transform: translateY(0); }
}
/* While loader is up, prevent body scroll. */
html.is-loading, html.is-loading body { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .intro-loader__lockup,
  .intro-loader__word,
  .intro-loader__bar::after {
    animation-duration: .01ms !important;
  }
}

/* ===== Floating Action Buttons (Home only) ===== */
.fab-stack {
  position: fixed;
  right: clamp(1rem, 2.5vw, 1.75rem);
  bottom: clamp(1rem, 2.5vw, 1.75rem);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: .8rem;
  align-items: flex-end;
  padding-bottom: env(safe-area-inset-bottom);
}
.fab {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  isolation: isolate;
}
.fab:hover { transform: translateY(-3px) scale(1.05); color: #fff; }
.fab:active { transform: translateY(0) scale(.98); }
.fab svg { width: 30px; height: 30px; display: block; }

.fab--wa {
  background: #25D366;
  box-shadow: 0 10px 28px rgba(37, 211, 102, .45);
  animation: fabPulse 2.4s var(--ease) infinite;
}
.fab--wa:hover { box-shadow: 0 14px 36px rgba(37, 211, 102, .55); }
.fab--wa::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #25D366;
  z-index: -1;
  animation: fabRipple 2.4s var(--ease) infinite;
}

.fab--call {
  background: var(--brand);
  box-shadow: 0 10px 24px rgba(15, 34, 56, .35);
  display: none; /* mobile only */
}

@keyframes fabPulse {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-4px) scale(1.04); }
}
@keyframes fabRipple {
  0%   { transform: scale(1);   opacity: .55; }
  80%  { transform: scale(1.9); opacity: 0; }
  100% { transform: scale(1.9); opacity: 0; }
}
@keyframes fabRippleCall {
  0%   { transform: scale(1);   opacity: .45; }
  80%  { transform: scale(1.8); opacity: 0; }
  100% { transform: scale(1.8); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .fab, .fab::before { animation: none !important; }
}

@media (max-width: 760px) {
  .fab--call { display: inline-flex; }
  .fab { width: 56px; height: 56px; }
  .fab svg { width: 26px; height: 26px; }
}

/* Reveal on scroll — only hide when JS is active */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
