/* ═══════════════════════════════════════════════════════════════════════════════
   ODDAK DİJİTAL AJANS — Base Styles: Reset + Typography + Utilities
   File: /assets/css/base.css
   Authority: Sprint 4 Design System — Part 2 + Part 7 (Accessibility)
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ─── RESET ─────────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ─── HTML / BODY ───────────────────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
  font-size: 16px;
  cursor: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  height: 100%;
}

@media (pointer: coarse) {
  html { cursor: auto; }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--fb);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100%;
}

/* ─── MEDIA ─────────────────────────────────────────────────────────────────── */
img,
video,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto; /* CLS prevention — always needs explicit width/height attrs too */
}

/* ─── TYPOGRAPHY BASE ───────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--fd);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--ink);
}

p {
  font-family: var(--fb);
  color: var(--ink2);
  line-height: 1.75;
}

a {
  color: var(--r);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--dur-fast);
}

a:hover {
  color: var(--ink);
}

ul, ol {
  list-style: none;
}

button {
  font-family: var(--fb);
  cursor: none;
  border: none;
  background: none;
}

@media (pointer: coarse) {
  button { cursor: pointer; }
  a { cursor: pointer; }
}

input, textarea, select {
  font-family: var(--fb);
  font-size: 100%;
}

/* ─── FOCUS VISIBLE — Global WCAG AA compliance ─────────────────────────────── */
:focus-visible {
  outline: 3px solid var(--r);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Remove focus ring for mouse users (only show on keyboard) */
:focus:not(:focus-visible) {
  outline: none;
}

/* ─── SKIP LINK ─────────────────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--r);
  color: #fff;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--fd);
  z-index: 9999;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  transition: top 0.15s;
  white-space: nowrap;
}

.skip-link:focus {
  top: 0;
}

/* ─── CUSTOM CURSOR ─────────────────────────────────────────────────────────── */
#cur {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  mix-blend-mode: difference;
  will-change: transform;
}

#cdot {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.15s, height 0.15s;
  will-change: left, top;
}

#cring {
  position: absolute;
  width: 38px;
  height: 38px;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.25s var(--ease), height 0.25s var(--ease), opacity 0.2s;
  will-change: left, top;
}

@media (pointer: fine) {
  body:has(a:hover) #cdot,
  body:has(button:hover) #cdot {
    width: 18px;
    height: 18px;
  }

  body:has(a:hover) #cring,
  body:has(button:hover) #cring {
    width: 56px;
    height: 56px;
    opacity: 0.35;
  }
}

@media (pointer: coarse) {
  #cur { display: none; }
}

/* ─── CONTAINER ─────────────────────────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
}

/* ─── SECTION BASE ──────────────────────────────────────────────────────────── */
.section {
  padding: var(--space-24) var(--section-pad);
}

/* ─── SECTION HEADER COMPONENTS ─────────────────────────────────────────────── */

/* Eyebrow label */
.ey {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--fd);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--r);
  margin-bottom: 18px;
}

.ey::before {
  content: '◆';
  font-size: 7px;
  flex-shrink: 0;
}

/* Section heading */
.sh {
  font-family: var(--fd);
  font-size: clamp(36px, 5.5vw, 82px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.0;
  color: var(--ink);
  margin-bottom: 18px;
}

.sh--md {
  font-size: clamp(30px, 4vw, 56px);
}

.sh--sm {
  font-size: clamp(22px, 2.8vw, 34px);
}

/* Section paragraph */
.sp {
  font-size: clamp(15px, 1.5vw, 18px);
  color: var(--ink2);
  line-height: 1.8;
  max-width: 560px;
  margin-bottom: 52px;
}

/* ─── BUTTON SYSTEM ─────────────────────────────────────────────────────────── */
.bp {
  font-family: var(--fb);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform var(--dur-base) var(--spring), box-shadow var(--dur-base);
  white-space: nowrap;
  line-height: 1;
  position: relative;
}

@media (pointer: coarse) {
  .bp { cursor: pointer; }
}

.bp:hover { transform: scale(1.05); }
.bp:active { transform: scale(0.97); }

/* Red primary */
.bpr {
  background: var(--r);
  color: #fff;
}

.bpr:hover {
  box-shadow: var(--shadow-r);
  color: #fff;
}

/* Ghost / outline secondary */
.bbo {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--bdr2);
}

.bbo:hover {
  border-color: var(--r);
  color: var(--r);
}

/* Text link action */
.blnk {
  background: none;
  color: var(--ink2);
  font-size: 13.5px;
  font-weight: 500;
  padding: 6px 0;
  gap: 6px;
  transition: color var(--dur-base), gap var(--dur-base);
}

.blnk:hover {
  color: var(--ink);
  gap: 12px;
}

/* Large modifier */
.bplg {
  font-size: 15px;
  padding: 14px 34px;
}

/* ─── BADGE / PILL ──────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--fd);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid currentColor;
}

/* ─── REVEAL SYSTEM ─────────────────────────────────────────────────────────── */
.rv {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-reveal) var(--ease),
              transform var(--dur-reveal) var(--ease);
}

.rv.in {
  opacity: 1;
  transform: none;
}

.rv-l {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity var(--dur-reveal) var(--ease),
              transform var(--dur-reveal) var(--ease);
}

.rv-l.in {
  opacity: 1;
  transform: none;
}

/* Stagger delays — applied inline as style="transition-delay: Xms" */

/* ─── REDUCED MOTION ────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .rv,
  .rv-l {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ─── UTILITIES ─────────────────────────────────────────────────────────────── */

/* Screen reader only */
.u-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.u-hidden {
  display: none !important;
}

/* Prevent text selection on decorative/interactive elements */
.u-noselect {
  user-select: none;
  -webkit-user-select: none;
}

/* Truncate with ellipsis */
.u-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Two-line clamp */
.u-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Three-line clamp */
.u-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─── MARQUEE ───────────────────────────────────────────────────────────────── */
.mqw {
  overflow: hidden;
  white-space: nowrap;
  user-select: none;
}

.mqi {
  display: inline-flex;
  animation: mq 24s linear infinite;
  will-change: transform;
}

.mqi.rev {
  animation-direction: reverse;
  animation-duration: 30s;
}

.mqi:hover {
  animation-play-state: paused;
}

@keyframes mq {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.mi {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  font-family: var(--fd);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ms {
  font-size: 16px;
  opacity: 0.4;
}

/* Marquee band variants */
.mqband {
  background: var(--r);
  padding: 14px 0;
}

.mqband .mi {
  color: #fff;
}

.mqband2 {
  background: var(--y);
  padding: 15px 0;
}

.mqband2 .mi {
  color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  .mqi { animation: none; }
}

/* ─── BREADCRUMB ────────────────────────────────────────────────────────────── */
.breadcrumb {
  padding: 12px 0 8px;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 4px;
}

.breadcrumb li {
  display: flex;
  align-items: center;
}

.breadcrumb a {
  font-family: var(--fd);
  font-size: 12px;
  color: var(--ink3);
  text-decoration: none;
  transition: color var(--dur-fast);
}

.breadcrumb a:hover {
  color: var(--ink);
}

.breadcrumb [aria-current="page"] {
  font-family: var(--fd);
  font-size: 12px;
  color: var(--ink2);
}

.breadcrumb-sep {
  color: var(--ink4);
  font-size: 12px;
  padding: 0 2px;
  user-select: none;
}

/* ─── TOAST ─────────────────────────────────────────────────────────────────── */
.tst {
  position: fixed;
  bottom: 80px;
  right: 22px;
  z-index: 900;
  background: var(--ink-fixed);
  color: #fff;
  padding: 13px 18px;
  border-radius: var(--radius-md);
  font-family: var(--fb);
  font-size: 13px;
  font-weight: 500;
  transform: translateY(14px);
  opacity: 0;
  transition: transform 0.3s var(--spring), opacity 0.3s;
  pointer-events: none;
  max-width: 270px;
  border-left: 3px solid var(--r);
  line-height: 1.5;
}

.tst.on {
  transform: none;
  opacity: 1;
}

/* ─── COOKIE BANNER ─────────────────────────────────────────────────────────── */
.ckb {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink-fixed);
  border-radius: var(--radius-xl);
  padding: 14px 18px;
  z-index: 800;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  box-shadow: 0 10px 44px rgba(0, 0, 0, 0.28);
  width: calc(100% - 32px);
  max-width: 580px;
  transition: transform 0.4s var(--ease), opacity 0.4s;
}

.ckb.hid {
  transform: translateX(-50%) translateY(110px);
  opacity: 0;
  pointer-events: none;
}

.ckt {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.55);
  flex: 1;
  line-height: 1.6;
  min-width: 200px;
}

.ckt a {
  color: var(--y);
  text-decoration: none;
}

.ckt a:hover {
  text-decoration: underline;
}

.ckbt {
  display: flex;
  gap: 7px;
  flex-shrink: 0;
}

.cka2 {
  background: var(--r);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 8px 18px;
  font-size: 12px;
  font-weight: 700;
  cursor: none;
  font-family: var(--fd);
  transition: transform var(--dur-base) var(--spring);
}

.cka2:hover { transform: scale(1.04); }

.ckr2 {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.45);
  border: none;
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  font-size: 12px;
  cursor: none;
  font-family: var(--fb);
  transition: background var(--dur-base);
}

.ckr2:hover {
  background: rgba(255, 255, 255, 0.12);
}

@media (pointer: coarse) {
  .cka2 { cursor: pointer; }
  .ckr2 { cursor: pointer; }
}

/* ─── DARK MODE COMPONENT OVERRIDES ─────────────────────────────────────────── */
[data-theme="dark"] .proc { background: var(--w); }
[data-theme="dark"] .refs { background: var(--bg); }
[data-theme="dark"] .faq  { background: var(--w); }
[data-theme="dark"] .brand-logo { background: var(--w); }
[data-theme="dark"] .brand-logo:hover { background: var(--bg); }
[data-theme="dark"] .ps:hover { background: var(--bg); }
[data-theme="dark"] .fi { background: var(--bg); border-color: var(--bdr2); color: var(--ink); }
[data-theme="dark"] .fbox { background: var(--w); }
[data-theme="dark"] .cert { background: var(--bg); border-color: var(--bdr); }
[data-theme="dark"] .cert-nm { color: var(--ink); }
[data-theme="dark"] .sc:hover { box-shadow: 0 22px 56px rgba(0, 0, 0, 0.40); }
[data-theme="dark"] footer { background: #080706; }