/* ═════════════════════════════════════════════════════════════════════════
   Karsu Website Design System — applied to existing project
   Contains design tokens, typography, utility classes and animations
   extracted from the handoff. Works alongside Tailwind CDN.
   ═════════════════════════════════════════════════════════════════════════ */

* { box-sizing: border-box; -webkit-font-smoothing: antialiased; }

.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

.label {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 10px;
}

.secnum {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

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

/* ── Layout containers ─────────────────────────────────────────────── */
.karsu-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 56px);
}
.karsu-wide { max-width: 1680px; }

/* ── Buttons ───────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: var(--ink);
  color: #fff;
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 0;
  transition: background .25s ease, transform .25s ease;
  cursor: pointer;
}
.btn:hover { background: var(--brand); transform: translateY(-1px); }
.btn .arr { transition: transform .3s; }
.btn:hover .arr { transform: translateX(5px); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: transparent;
  color: var(--ink);
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1.5px solid var(--ink);
  transition: all .25s;
  cursor: pointer;
}
.btn-ghost:hover { background: var(--ink); color: #fff; }

.btn-brand { background: var(--brand); }
.btn-brand:hover { background: var(--brand-deep); }

.btn-on-dark { background: #fff; color: #0a0a0a; }
.btn-on-dark:hover { background: var(--brand); color: #fff; }

/* ── Reveal animations ─────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s cubic-bezier(.2,.8,.2,1), transform .9s cubic-bezier(.2,.8,.2,1);
}
.reveal.in { opacity: 1; transform: translateY(0); }
.rd-1 { transition-delay: .08s; }
.rd-2 { transition-delay: .16s; }
.rd-3 { transition-delay: .24s; }
.rd-4 { transition-delay: .32s; }

/* ── Marquee ───────────────────────────────────────────────────────── */
@keyframes karsuMarquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee-track {
  animation: karsuMarquee var(--marquee-speed, 48s) linear infinite;
  will-change: transform;
}

.tnum { font-variant-numeric: tabular-nums; }

/* ── Photo frames ──────────────────────────────────────────────────── */
.photo-frame { position: relative; overflow: hidden; background: var(--bg-3); }
.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.4s cubic-bezier(.2,.8,.2,1);
}
.photo-frame:hover img { transform: scale(1.04); }

/* ── Chips ─────────────────────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line-2);
  background: #fff;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  color: var(--ink-2);
}
.chip .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--brand); }

/* ── Service cards ─────────────────────────────────────────────────── */
.service-card {
  position: relative;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--line);
  transition: border-color .3s, transform .4s;
}
.service-card:hover { border-color: var(--ink); }
.service-card .card-img { aspect-ratio: 16/10; overflow: hidden; position: relative; }
.service-card .card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.4s cubic-bezier(.2,.8,.2,1);
}
.service-card:hover .card-img img { transform: scale(1.05); }
.service-card .card-body { padding: clamp(18px, 2vw, 28px); }

/* ── Application rows ──────────────────────────────────────────────── */
.app-row {
  display: grid;
  grid-template-columns: 48px 1.2fr 1fr 120px 120px 32px;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  transition: background .3s;
  position: relative;
}
.app-row:hover { background: var(--bg-2); }
.app-row:hover .app-arr { transform: translateX(6px); color: var(--brand); }
.app-arr { transition: transform .3s, color .3s; color: var(--muted); justify-self: end; }
@media (max-width: 860px) {
  .app-row { grid-template-columns: 44px 1fr 32px; }
  .app-row .app-meta, .app-row .app-img { display: none; }
}

/* ── Typography atoms ──────────────────────────────────────────────── */
.giga {
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  font-size: clamp(44px, 5.5vw, 88px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  overflow-wrap: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}
@media (max-width: 640px) {
  .giga { font-size: clamp(34px, 9vw, 44px); }
}

.hero-headline {
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  font-size: clamp(16px, 2.2vw, 31px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0,0,0,0.35);
}
.hero-headline .hl-blue { color: #78b4e8; }

.page-title {
  font-family: 'Archivo', sans-serif;
  font-size: clamp(32px, 5vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  font-weight: 800;
  overflow-wrap: break-word;
}

.page-hero {
  padding: 120px 0 60px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
@media (max-width: 640px) {
  .page-hero { padding: 88px 0 40px; }
}

/* ── Stat cells ────────────────────────────────────────────────────── */
.stat-cell {
  padding: clamp(20px, 2.2vw, 32px);
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.stat-cell:last-child { border-right: 0; }
@media (max-width: 820px) { .stat-cell { border-right: 0; } }

/* ── Nav link atom ─────────────────────────────────────────────────── */
.nav-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  transition: color .2s;
  padding: 8px 0;
  border-bottom: 1.5px solid transparent;
}
.nav-link:hover { color: var(--brand); }
.nav-link.active { border-bottom-color: var(--brand); color: var(--brand); }

.logo-img {
  height: 42px;
  width: auto;
  display: block;
  object-fit: contain;
  object-position: left center;
}

/* ── Güntner tabs ──────────────────────────────────────────────────── */
.guntner-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1.5px solid var(--line-2);
  background: #fff;
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  transition: all .25s;
  cursor: pointer;
}
.guntner-tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.guntner-tab:hover:not(.active) { border-color: var(--ink); }

/* ── Update cards ──────────────────────────────────────────────────── */
.update-card {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  transition: transform .4s, border-color .3s;
  cursor: pointer;
}
.update-card:hover { transform: translateY(-4px); border-color: var(--ink); }
.update-card .img-wrap { aspect-ratio: 4/3; overflow: hidden; }
.update-card .img-wrap img { transition: transform 1.4s cubic-bezier(.2,.8,.2,1); }
.update-card:hover .img-wrap img { transform: scale(1.05); }

/* ── Dark-theme fallbacks (keep legibility with toggle) ────────────── */
.dark .chip,
.dark .guntner-tab,
.dark .update-card { background: var(--bg-2); color: var(--ink); }
.dark .service-card { background: var(--bg-2); }
.dark .btn { background: #fff; color: #0a0a0a; }
.dark .btn:hover { background: var(--brand); color: #fff; }
.dark .btn-ghost { color: #fff; border-color: #fff; }
.dark .btn-ghost:hover { background: #fff; color: #0a0a0a; }

/* ── Design & Build redesign helpers ───────────────────────────────── */
.tab-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 24px;
  font-family: 'Archivo', sans-serif;
  font-weight: 800; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.14em;
  border: 0; border-bottom: 2px solid transparent;
  background: none; cursor: pointer;
  color: var(--muted-2);
  transition: color .2s, border-color .2s;
}
.tab-btn:not(.active):hover { color: var(--ink); }
.tab-btn.active { border-bottom-color: var(--brand); color: var(--ink); }

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.ph {
  background-image: repeating-linear-gradient(135deg, #dcd8d2 0 12px, #e8e5df 12px 24px);
}
.dark .ph {
  background-image: repeating-linear-gradient(135deg, #1f2a36 0 12px, #2a3744 12px 24px);
}

.seg-card {
  display: flex; flex-direction: column;
  background: var(--bg-2, #fff);
  border: 1px solid var(--line);
  transition: border-color .3s ease;
}
.seg-card:hover { border-color: rgba(39, 100, 163, 0.6); }

/* ── Article body (News Writer HTML) ──────────────────────────────── */
/* Dashboard-authored HTML: guard against wide tables, long URLs and
   fixed-width images blowing past the mobile viewport. */
.prose-karsu {
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-3);
}
.prose-karsu img,
.prose-karsu video,
.prose-karsu iframe { max-width: 100%; height: auto; }
.prose-karsu pre { max-width: 100%; overflow-x: auto; }
.prose-karsu table { display: block; max-width: 100%; overflow-x: auto; }
.prose-karsu h1, .prose-karsu h2, .prose-karsu h3 { color: var(--ink); margin: 1.4em 0 0.5em; }
.prose-karsu p { margin: 0 0 1em; }

/* ── Responsive bandaids ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .karsu-grid-1fr { grid-template-columns: 1fr !important; }
}
