/* =========================================================
   MAGNUM CATERING — Accessibility & UX Hardening
   Audit fixes: contrast, focus, semantic, mobile menu
   ========================================================= */

/* ---------- 1. Contrast: ink-muted darker (4.51 -> 5.8 :1) ---------- */
:root {
  --ink-muted: #5A4D3D;
}

/* ---------- 2. Footer heading restored visually but semantic h3 ---------- */
.footer-col .footer-h {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-gold);
  margin-bottom: 14px;
  /* override default h3 sizing from styles.css */
  line-height: 1.2;
}

/* ---------- 3. Form (dark CTA card) — visible focus ring ---------- */
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--brand-gold);
  outline-offset: 2px;
  border-color: var(--brand-gold);
}

/* contact form (light surface) */
.contact-form-card input:focus-visible,
.contact-form-card select:focus-visible,
.contact-form-card textarea:focus-visible {
  outline: 2px solid var(--brand-gold);
  outline-offset: 2px;
}

/* ---------- 4. Required indicator: gold * before screen readers see ' *' in label ---------- */
.contact-form-card label,
.field label {
  display: block;
}

/* ---------- 5. Small text minimum size (was 12.5px -> 13.5px) ---------- */
.form-foot,
.contact-info-row small,
.footer-bottom {
  font-size: 13.5px !important;
  line-height: 1.55;
}

/* ---------- 6. Skip link — improve visibility on focus ---------- */
.skip-link:focus {
  background: var(--brand-gold);
  color: var(--ink);
  padding: 12px 18px;
  font-weight: 700;
  z-index: 9999;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

/* ---------- 7. Mobile menu drawer (hamburger -> overlay) ---------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--ink);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-20px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}
.mobile-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.mobile-menu a {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--surface-warm);
  letter-spacing: -0.01em;
  padding: 10px 16px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.mobile-menu a:hover,
.mobile-menu a:focus-visible {
  color: var(--brand-gold);
  background: rgba(170,146,100,0.08);
  outline: none;
}
.mobile-menu a.active {
  color: var(--brand-gold);
}
.mobile-menu .mm-cta {
  margin-top: 12px;
  background: var(--cta-red);
  color: #fff !important;
  padding: 14px 28px;
  font-size: 1rem;
  font-family: var(--font-sans);
  font-weight: 600;
  border-radius: 6px;
}
.mobile-menu-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(251,247,239,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--surface-warm);
  font-size: 28px;
  cursor: pointer;
  transition: background 0.2s;
}
.mobile-menu-close:hover,
.mobile-menu-close:focus-visible {
  background: var(--brand-gold);
  color: var(--ink);
  outline: none;
}

body.menu-open { overflow: hidden; }

/* ---------- 8. Hamburger animated state ---------- */
.nav-burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
.nav-burger span { transition: transform 0.25s, opacity 0.2s; }

/* ---------- 9. Focus ring on FAB widgets ---------- */
.fab-btn:focus-visible {
  outline: 3px solid var(--brand-gold);
  outline-offset: 3px;
}

/* ---------- 10. Hero scroll indicator: hide for keyboard users (decorative) ---------- */
.hero-scroll {
  pointer-events: none;
}

/* ---------- 11. Logo bar duplicate items aria-hidden marker ---------- */

/* ---------- 12. Reduced motion: stop marquee + hero video poster ---------- */
@media (prefers-reduced-motion: reduce) {
  .logo-marquee,
  .marquee-track,
  [class*="marquee"] {
    animation: none !important;
  }
}

/* ---------- 13. Form invalid state ---------- */
.contact-form-card input:invalid:not(:placeholder-shown),
.contact-form-card select:invalid:not([value=""]):required,
.contact-form-card textarea:invalid:not(:placeholder-shown) {
  border-color: var(--cta-red);
}

/* ---------- 14. Required asterisk visible (already in label text) ---------- */
.contact-form-card label::after,
.field label::after { content: ''; }

/* ---------- 15. Touch target: nav burger 44x44 minimum ---------- */
.nav-burger {
  min-width: 44px;
  min-height: 44px;
}

/* =========================================================
   NAV — Solid on initial load, blur only on scroll
   (override styles.css default blur-on-load)
   ========================================================= */
body.subpage .nav,
body.home .nav {
  background: var(--surface-warm);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid rgba(170, 146, 100, 0.12);
  box-shadow: none;
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease, padding 0.3s ease;
}
/* Home page hero is dark video — keep nav transparent over it but solid backing */
body.home .nav {
  background: transparent;
  border-bottom-color: transparent;
}
body.home .nav.scrolled {
  background: rgba(251, 247, 239, 0.96);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom-color: rgba(170, 146, 100, 0.12);
  box-shadow: var(--shadow-nav);
}
/* Subpages — solid cream when at top, blur on scroll */
body.subpage .nav.scrolled {
  background: rgba(251, 247, 239, 0.85);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow: var(--shadow-nav);
  border-bottom-color: rgba(170, 146, 100, 0.18);
}

/* =========================================================
   HERO VIDEO CAROUSEL — async crossfade
   ========================================================= */
.hero-video-stack {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero-video-stack .hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: block; /* override .portrait { display: none } */
  will-change: opacity;
}
.hero-video-stack .hero-video.active {
  opacity: 1;
}

/* Reduced motion: keep first video visible, no transitions */
@media (prefers-reduced-motion: reduce) {
  .hero-video-stack .hero-video {
    transition: none !important;
  }
  .hero-video-stack .hero-video[data-slot="0"] {
    opacity: 1 !important;
  }
  .hero-video-stack .hero-video[data-slot="1"] {
    display: none;
  }
}

/* =========================================================
   PAGE HERO — cover photo refinement (a11y override)
   Daha belirgin görsel + alt-gradient ile metin okunabilirliği
   ========================================================= */
.page-hero::before {
  opacity: 0.55 !important;
  background-size: cover !important;
  background-position: center center !important;
  filter: saturate(1.05) contrast(1.02);
}
.page-hero::after {
  background: linear-gradient(
    180deg,
    rgba(26, 22, 18, 0.65) 0%,
    rgba(26, 22, 18, 0.55) 35%,
    rgba(26, 22, 18, 0.7) 65%,
    rgba(26, 22, 18, 0.92) 100%
  ) !important;
}
/* Reduced motion: no zoom */
@media (prefers-reduced-motion: reduce) {
  .page-hero::before { animation: none !important; }
}

/* =========================================================
   TIMELINE — yıl + nokta + kart başlığı baseline align
   Üçünün de aynı dikey eksende okunması için
   ========================================================= */
.tl-year {
  /* year line-height'ı kart h4 ile aynı tipografik baseline'a çekiyoruz */
  line-height: 1 !important;
  padding-top: 19px !important;
}
.tl-year::after {
  /* dot center fixed to vertical line center (line at left:90 + 1 = 91) */
  right: -9px !important;
  top: 27px !important;
  width: 14px !important;
  height: 14px !important;
  background: var(--surface-warm) !important;
  border: 2px solid var(--brand-gold) !important;
  box-shadow: 0 0 0 4px var(--surface-warm), 0 2px 8px rgba(170,146,100,0.25) !important;
  z-index: 2;
}
.tl-year.tl-now::after {
  right: -10px !important;
  top: 26px !important;
  width: 16px !important;
  height: 16px !important;
  background: var(--brand-gold) !important;
  border-color: var(--ink) !important;
  box-shadow: 0 0 0 4px var(--surface-warm), 0 0 0 6px var(--brand-gold), 0 4px 12px rgba(170,146,100,0.4) !important;
  animation: tlPulse 2.4s ease-in-out infinite;
}
@keyframes tlPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
@media (max-width: 720px) {
  .tl-year::after { right: -26px !important; }
  .tl-year.tl-now::after { right: -27px !important; }
}

/* =========================================================
   SECTOR NAV — services.html sektör çıpa çubuğu
   Koyu zemin üzerinde altın hover anchor pill'leri
   ========================================================= */
.sector-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 920px;
  margin: 0 auto;
}
.sector-anchor {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--surface-warm);
  border: 1.5px solid rgba(170, 146, 100, 0.35);
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.01em;
  transition: all 0.22s ease;
  white-space: nowrap;
  line-height: 1;
}
.sector-anchor .num {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--brand-gold);
  letter-spacing: 0;
}
.sector-anchor .lbl {
  position: relative;
  top: 0;
}
.sector-anchor:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--surface-warm);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -8px rgba(26, 22, 18, 0.35);
}
.sector-anchor:hover .num {
  color: var(--brand-gold-light);
}
.sector-anchor:focus-visible {
  outline: 3px solid var(--brand-gold);
  outline-offset: 3px;
}
.sector-anchor:active {
  transform: translateY(0);
}
@media (max-width: 640px) {
  .sector-nav { gap: 6px; }
  .sector-anchor { padding: 10px 14px; font-size: 0.82rem; }
}

/* =========================================================
   FINAL CTA — Premium dark band
   ========================================================= */
.final-cta {
  position: relative;
  padding: clamp(80px, 10vw, 140px) 0;
  background: var(--ink);
  overflow: hidden;
  isolation: isolate;
}

/* Atmospheric gradient + grain */
.final-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 500px at 80% 0%, rgba(170,146,100,0.18), transparent 65%),
    radial-gradient(700px 400px at 10% 100%, rgba(170,146,100,0.12), transparent 65%);
  z-index: -1;
  pointer-events: none;
}
.final-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.6 0 0 0 0 0.55 0 0 0 0 0.4 0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.5;
  mix-blend-mode: overlay;
  z-index: -1;
  pointer-events: none;
}

.final-cta-card {
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  padding: 0 16px;
}

/* gold rule above eyebrow */
.final-cta-card::before {
  content: "";
  display: block;
  width: 64px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand-gold) 50%, transparent);
  margin: 0 auto 28px;
}

.final-cta-card .eyebrow {
  color: var(--brand-gold);
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  margin-bottom: 18px;
  display: block;
}

.final-cta-card h2 {
  color: var(--surface-warm);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  line-height: 1.08;
  font-weight: 400;
  letter-spacing: -0.015em;
  margin: 0 auto 22px;
  max-width: 18ch;
  text-wrap: balance;
}
.final-cta-card h2 .gold-italic {
  color: var(--brand-gold);
  font-style: italic;
  font-weight: 400;
}

.final-cta-card > p {
  color: rgba(251, 247, 239, 0.78);
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  line-height: 1.7;
  max-width: 56ch;
  margin: 0 auto 40px;
  text-wrap: pretty;
}

.final-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  align-items: center;
  margin-bottom: 36px;
}

/* Make primary button pop on dark */
.final-cta .btn-primary {
  padding: 16px 30px;
  font-size: 1rem;
  box-shadow: 0 12px 32px -8px rgba(200, 65, 42, 0.55), 0 0 0 1px rgba(255,255,255,0.05) inset;
}
.final-cta .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -8px rgba(200, 65, 42, 0.65), 0 0 0 1px rgba(255,255,255,0.05) inset;
}

/* Phone button — subtle, monospace-feel */
.final-cta .btn-secondary-dark[href^="tel:"] {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* Secondary outline buttons on dark CTA — ensure visible regardless of pages.css load */
.final-cta .btn-secondary-dark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--r-btn);
  background: transparent;
  color: var(--surface-warm) !important;
  border: 1.5px solid rgba(251, 247, 239, 0.45);
  font-weight: 600;
  font-size: 0.94rem;
  letter-spacing: 0.01em;
  transition: all 0.25s ease;
  text-decoration: none;
}
.final-cta .btn-secondary-dark:hover {
  background: var(--brand-gold);
  border-color: var(--brand-gold);
  color: var(--ink) !important;
  transform: translateY(-1px);
}
.final-cta .btn-secondary-dark:focus-visible {
  outline: 3px solid var(--brand-gold);
  outline-offset: 3px;
}

/* Foot — trust capsule row */
.final-cta-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  padding-top: 28px;
  border-top: 1px solid rgba(170, 146, 100, 0.18);
  max-width: 720px;
  margin: 0 auto;
}
.final-cta-foot span {
  font-size: 0.82rem;
  color: rgba(251, 247, 239, 0.6);
  letter-spacing: 0.02em;
  white-space: nowrap;
  font-weight: 500;
}

/* Mobile tightening */
@media (max-width: 640px) {
  .final-cta { padding: 64px 0 72px; }
  .final-cta-card h2 { max-width: 100%; }
  .final-cta-actions { flex-direction: column; align-items: stretch; }
  .final-cta-actions .btn { justify-content: center; width: 100%; }
  .final-cta-foot { gap: 6px 16px; padding-top: 22px; }
  .final-cta-foot span { font-size: 0.78rem; }
}

/* =========================================================
   LANGUAGE SWITCHER — TR/EN/DE dropdown (header)
   ========================================================= */
.lang-switch {
  position: relative;
  margin-left: 8px;
  font-family: var(--font-sans);
}
.lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(170, 146, 100, 0.08);
  border: 1.5px solid rgba(170, 146, 100, 0.25);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}
.lang-trigger:hover {
  background: rgba(170, 146, 100, 0.16);
  border-color: var(--brand-gold);
}
.lang-trigger:focus-visible {
  outline: 3px solid var(--brand-gold);
  outline-offset: 2px;
}
.lang-trigger .flag {
  width: 20px; height: 14px;
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
  display: inline-block;
}
.lang-trigger .flag svg { width: 100%; height: 100%; display: block; }
.lang-trigger .code { letter-spacing: 0.06em; }
.lang-trigger .chev {
  width: 10px; height: 10px;
  transition: transform 0.2s ease;
  opacity: 0.7;
}
.lang-switch[data-open="true"] .chev { transform: rotate(180deg); opacity: 1; }

/* Home (transparent nav) trigger styling */
body.home .nav:not(.scrolled) .lang-trigger {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}
body.home .nav:not(.scrolled) .lang-trigger:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.5);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 168px;
  padding: 6px;
  background: var(--surface-warm);
  border: 1px solid rgba(170, 146, 100, 0.2);
  border-radius: 14px;
  box-shadow: 0 16px 40px -12px rgba(26, 22, 18, 0.25), 0 4px 12px -4px rgba(26, 22, 18, 0.1);
  list-style: none;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
  z-index: 100;
}
.lang-switch[data-open="true"] .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0s;
}
.lang-menu li { margin: 0; }
.lang-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: transparent;
  border: none;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.lang-option:hover,
.lang-option:focus-visible {
  background: rgba(170, 146, 100, 0.12);
  outline: none;
}
.lang-option:focus-visible {
  box-shadow: inset 0 0 0 2px var(--brand-gold);
}
.lang-option .flag {
  width: 22px; height: 16px;
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
  display: inline-block;
}
.lang-option .flag svg { width: 100%; height: 100%; display: block; }
.lang-option .name { flex: 1; }
.lang-option .check {
  width: 14px; height: 14px;
  color: var(--brand-gold);
  opacity: 0;
}
.lang-option[aria-current="true"] {
  background: rgba(170, 146, 100, 0.08);
  font-weight: 600;
}
.lang-option[aria-current="true"] .check { opacity: 1; }

/* Mobile: order in nav row, full-width drawer style */
@media (max-width: 880px) {
  .lang-switch { order: 2; margin-left: auto; margin-right: 8px; }
  .lang-trigger { padding: 8px 10px; font-size: 0.78rem; }
  .lang-trigger .code { display: none; }
  .lang-menu {
    right: -8px;
    min-width: 180px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .lang-menu, .chev { transition: none !important; }
}
