/* =========================================================
   TrinkCeb — site design system
   Shared by every page in /pages. The demo panel (/panel)
   keeps its own stylesheet but uses the same brand tokens.
   ========================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  /* Brand (from the existing project Tailwind config) */
  --brand: #0B61FF;
  --brand-600: #0950D9;
  --brand-50: #EEF4FF;
  --brand-100: #DCE8FF;
  --brand-200: #B9D0FF;
  --dark: #111827;
  --darker: #161B28;

  /* Neutrals (Tailwind gray scale used across the project) */
  --text: #1F2937;
  --muted: #4B5563;
  --subtle: #6B7280;
  --faint: #9CA3AF;
  --line: #E5E7EB;
  --line-soft: #F3F4F6;
  --bg: #FFFFFF;
  --bg-soft: #F9FAFB;

  /* Status (shared with the panel) */
  --green: #16A34A;
  --green-bg: #E9F9EE;
  --orange: #D97706;
  --orange-bg: #FEF3E2;
  --red: #DC2626;
  --red-bg: #FDEAEA;
  --purple: #7C3AED;
  --purple-bg: #F1EAFE;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.05);
  --shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 8px 24px rgba(17, 24, 39, 0.06);
  --shadow-lg: 0 2px 6px rgba(17, 24, 39, 0.04), 0 24px 64px rgba(17, 24, 39, 0.10);
  --shadow-brand: 0 10px 30px rgba(11, 97, 255, 0.28);

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --nav-h: 72px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Prevents a flash of Turkish text while the stored English preference is applied. */
html.i18n-pending body { visibility: hidden; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

.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;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--dark); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
  font-weight: 600; transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.icon { width: 1.15em; height: 1.15em; flex-shrink: 0; stroke-width: 2; }

/* ---------- 3. Typography ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--brand-100);
  color: var(--brand);
  font-size: 13px; font-weight: 600; letter-spacing: 0.01em;
  box-shadow: var(--shadow-sm);
}
.eyebrow__dot {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px; border-radius: 999px;
  background: var(--brand-50);
}
.eyebrow__dot .icon { width: 13px; height: 13px; }

.kicker {
  display: inline-block;
  font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 16px;
}

.display {
  font-size: clamp(2.6rem, 7.2vw, 6.1rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 800;
  color: var(--dark);
}

.h2 {
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 800;
  color: var(--dark);
}

.h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--dark);
}

.lead {
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  line-height: 1.6;
  color: var(--muted);
}

.muted { color: var(--muted); }
.text-brand { color: var(--brand); }

/* ---------- 4. Buttons ---------- */
.btn {
  --btn-bg: var(--brand);
  --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600; font-size: 15.5px; line-height: 1;
  cursor: pointer;
  transition: background .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
  white-space: nowrap;
}
.btn .icon { transition: transform .3s var(--ease); }
.btn:hover .icon--arrow { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }

.btn--primary { box-shadow: var(--shadow-brand); }
.btn--primary:hover { --btn-bg: var(--brand-600); }

.btn--ghost {
  --btn-bg: var(--bg);
  --btn-fg: var(--dark);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.btn--ghost:hover { border-color: #D1D5DB; --btn-bg: var(--bg-soft); }

.btn--white { --btn-bg: #fff; --btn-fg: var(--brand); box-shadow: 0 12px 30px rgba(9, 20, 60, 0.25); }
.btn--white:hover { --btn-bg: var(--brand-50); }

.btn--outline-light {
  --btn-bg: rgba(255, 255, 255, 0.08);
  --btn-fg: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}
.btn--outline-light:hover { --btn-bg: rgba(255, 255, 255, 0.16); }

.btn--sm { min-height: 40px; padding: 9px 16px; font-size: 14.5px; border-radius: 10px; }
.btn--block { width: 100%; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--brand); font-weight: 600;
}
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- 5. Header / navigation ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0;
  z-index: 60;
  height: var(--nav-h);
  transition: background .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-solid,
body:not(.page-home) .site-header {
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom-color: rgba(229, 231, 235, 0.8);
}

.site-header__inner {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}

.brand-link { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand-link img { height: 24px; width: auto; }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 15px; font-weight: 500;
  transition: color .2s, background .2s;
}
.site-nav a:hover { color: var(--dark); background: rgba(17, 24, 39, 0.04); }
.site-nav a[aria-current="page"] { color: var(--dark); }

.site-header__actions { display: flex; align-items: center; gap: 10px; }
.site-header__login {
  padding: 8px 12px; border-radius: 8px;
  color: var(--muted); font-size: 15px; font-weight: 500;
}
.site-header__login:hover { color: var(--dark); }

/* Language switch */
.lang-switch {
  display: inline-flex; align-items: center;
  padding: 3px;
  border-radius: 10px;
  background: rgba(17, 24, 39, 0.05);
  border: 1px solid rgba(17, 24, 39, 0.06);
}
.lang-switch button {
  border: 0; background: transparent; cursor: pointer;
  padding: 5px 9px; border-radius: 7px;
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--subtle);
  transition: background .2s, color .2s, box-shadow .2s;
}
.lang-switch button[aria-pressed="true"] { background: #fff; color: var(--dark); box-shadow: var(--shadow-sm); }

.menu-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  align-items: center; justify-content: center;
  cursor: pointer;
}
.menu-toggle .icon { width: 22px; height: 22px; }
.menu-toggle .icon-close { display: none; }
.menu-open .menu-toggle .icon-open { display: none; }
.menu-open .menu-toggle .icon-close { display: block; }

.mobile-menu {
  position: fixed; inset: var(--nav-h) 0 auto 0;
  z-index: 59;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  padding: 12px var(--gutter) 24px;
  display: none;
  max-height: calc(100svh - var(--nav-h));
  overflow-y: auto;
}
.menu-open .mobile-menu { display: block; }
.mobile-menu a:not(.btn) {
  display: block;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line-soft);
  font-weight: 600; font-size: 17px; color: var(--dark);
}
.mobile-menu__actions { display: grid; gap: 10px; margin-top: 18px; }
.mobile-menu__lang { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; color: var(--subtle); font-size: 14px; font-weight: 600; }

@media (max-width: 960px) {
  .site-nav, .site-header__login, .site-header__actions .btn, .site-header__actions .lang-switch { display: none; }
  .menu-toggle { display: inline-flex; }
}

/* ---------- 6. Footer ---------- */
.site-footer {
  background: var(--darker);
  color: #C9CED8;
  padding: 80px 0 36px;
  position: relative;
  z-index: 2;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 48px;
}
.site-footer__brand img { height: 26px; width: auto; margin-bottom: 18px; }
.site-footer__brand p { color: #9AA3B2; max-width: 300px; line-height: 1.7; font-size: 15px; }
.site-footer h3 {
  color: #fff; font-size: 14px; font-weight: 700; letter-spacing: 0.02em;
  margin-bottom: 18px;
}
.site-footer ul { list-style: none; display: grid; gap: 12px; }
.site-footer a { color: #9AA3B2; font-size: 15px; transition: color .2s; }
.site-footer a:hover { color: #fff; }
.site-footer__bottom {
  margin-top: 64px; padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  font-size: 14px; color: #7C8597;
}
.site-footer__legal { display: flex; flex-wrap: wrap; gap: 22px; }
.site-footer__legal a { font-size: 14px; }

@media (max-width: 900px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .site-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .site-footer { padding-top: 56px; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
}

/* ---------- 7. Inner pages ---------- */
.page-hero {
  position: relative;
  padding: calc(var(--nav-h) + 72px) 0 56px;
  background:
    radial-gradient(700px 320px at 12% 0%, rgba(11, 97, 255, 0.10), transparent 70%),
    radial-gradient(600px 300px at 95% 20%, rgba(11, 97, 255, 0.06), transparent 70%),
    linear-gradient(180deg, var(--brand-50) 0%, #fff 85%);
  overflow: hidden;
}
.page-hero__inner { max-width: 820px; }
.page-hero h1 {
  font-size: clamp(2.3rem, 5.4vw, 4rem);
  line-height: 1.04; letter-spacing: -0.04em; font-weight: 800; color: var(--dark);
  margin: 22px 0 18px;
}
.page-hero p { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); line-height: 1.65; max-width: 720px; }
.page-hero__meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.meta-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.85); border: 1px solid var(--line);
  font-size: 14px; color: var(--muted);
}
.meta-pill strong { color: var(--dark); font-weight: 700; }

.page-body { padding: 24px 0 112px; }
.page-body--tight { padding-top: 8px; }

.stack { display: grid; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 860px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.card--lg { padding: clamp(24px, 4vw, 40px); }
.card--soft { background: var(--bg-soft); }
.card--dark { background: var(--darker); border-color: var(--darker); color: #C9CED8; }
.card--dark h2, .card--dark h3 { color: #fff; }

.card__icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--brand-50); color: var(--brand);
  margin-bottom: 18px;
}
.card__icon .icon { width: 22px; height: 22px; }
.card h2, .card h3 { color: var(--dark); font-weight: 700; letter-spacing: -0.02em; }
.card > h2 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); margin-bottom: 14px; }
.card > h3 { font-size: 1.2rem; margin-bottom: 10px; }
.card p { color: var(--muted); line-height: 1.75; }
.card p + p { margin-top: 12px; }

.prose { color: var(--muted); line-height: 1.8; }
.prose p + p, .prose p + ul, .prose ul + p { margin-top: 14px; }
.list {
  list-style: none; display: grid; gap: 12px; margin-top: 14px;
}
.list li {
  position: relative; padding-left: 30px; color: var(--muted); line-height: 1.7;
}
.list li::before {
  content: ""; position: absolute; left: 4px; top: 0.62em;
  width: 8px; height: 8px; border-radius: 3px; background: var(--brand);
  transform: rotate(45deg);
}
.list--numbered { counter-reset: n; }
.list--numbered li { counter-increment: n; padding-left: 40px; }
.list--numbered li::before {
  content: counter(n); transform: none;
  width: 26px; height: 26px; border-radius: 8px; top: 0.1em; left: 0;
  background: var(--brand-50); color: var(--brand);
  font-size: 13px; font-weight: 700; display: grid; place-items: center;
}

.status {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 14.5px;
}
.status::before { content: ""; width: 9px; height: 9px; border-radius: 99px; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 18%, transparent); }
.status--ok { color: var(--green); }
.status--warn { color: var(--orange); }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; line-height: 1.4;
}
.badge--brand { background: var(--brand-50); color: var(--brand); }
.badge--green { background: var(--green-bg); color: var(--green); }
.badge--orange { background: var(--orange-bg); color: var(--orange); }
.badge--red { background: var(--red-bg); color: var(--red); }
.badge--gray { background: var(--line-soft); color: var(--subtle); }

/* Timeline (updates page) */
.timeline { position: relative; display: grid; gap: 20px; }
.timeline__date {
  font-size: 13px; font-weight: 700; color: var(--brand);
  letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 10px;
}

/* Two-column legal layout */
.legal-layout {
  display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start;
}
.legal-toc { position: sticky; top: calc(var(--nav-h) + 24px); display: grid; gap: 16px; }
.legal-toc nav { display: grid; gap: 2px; }
.legal-toc nav a {
  padding: 8px 12px; border-radius: 8px; font-size: 14.5px; color: var(--muted);
}
.legal-toc nav a:hover { background: var(--brand-50); color: var(--brand); }
.legal-toc__title { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--subtle); margin: 0 12px 10px; }
.legal-section { scroll-margin-top: calc(var(--nav-h) + 24px); }
@media (max-width: 960px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-toc { position: static; }
}

/* Forms */
.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 8px; }
.field label { font-size: 14px; font-weight: 600; color: var(--text); }
.field input, .field textarea, .field select {
  width: 100%;
  font: inherit; font-size: 15px; color: var(--dark);
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #D1D5DB;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(11, 97, 255, 0.14);
}
.field textarea { resize: vertical; min-height: 110px; }

.segmented {
  display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px;
  border-radius: 12px; background: var(--line-soft); border: 1px solid var(--line);
}
.segmented button {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; background: transparent; cursor: pointer;
  padding: 9px 14px; border-radius: 9px;
  font-size: 14px; font-weight: 600; color: var(--muted);
  transition: background .2s, color .2s, box-shadow .2s;
}
.segmented button[aria-pressed="true"] { background: var(--brand); color: #fff; box-shadow: var(--shadow-brand); }

.notice {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: 12px; font-size: 14px; font-weight: 500;
}
.notice[hidden] { display: none; }
.notice--error { background: var(--red-bg); color: var(--red); }
.notice--warn { background: var(--orange-bg); color: #92400E; }

/* Redirect pages */
.redirect-page { min-height: 100svh; display: grid; place-items: center; padding: 24px; text-align: center; }
.redirect-page p { color: var(--muted); }
.redirect-page a { color: var(--brand); font-weight: 600; }

/* FAQ / disclosure (shared by home + help center) */
.faq { display: grid; gap: 12px; }
.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .25s, box-shadow .25s;
}
.faq details[open] { border-color: var(--brand-200); box-shadow: var(--shadow); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 22px;
  font-weight: 600; font-size: 16.5px; color: var(--dark);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { color: var(--subtle); transition: transform .3s var(--ease); }
.faq details[open] summary .icon { transform: rotate(45deg); color: var(--brand); }
.faq details > div { padding: 0 22px 22px; color: var(--muted); line-height: 1.75; }

/* ---------- 8. 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;
  }
}

/* Beta application page */
.beta-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.beta-success { margin-top: 20px; }
.beta-success:focus { outline: none; }
.field-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 10px; }
@media (max-width: 900px) { .beta-layout { grid-template-columns: 1fr; } }

/* Footer store link (shared on every page) */
.footer-store {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 22px;
  padding: 8px 16px 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff !important;
}
.footer-store:hover { background: rgba(255, 255, 255, 0.06); }
.footer-store[hidden] { display: none; }
.footer-store svg { width: 22px; height: 22px; }
.footer-store span { font-size: 15px; font-weight: 600; line-height: 1.15; }
.footer-store small { display: block; font-size: 10.5px; font-weight: 500; opacity: 0.7; }
