/* ============================================================
   Meykt — Shared styles
   Mobile-first. Notion-inspired warm canvas + Meykt violet.
   ============================================================ */

:root {
  /* Brand */
  --primary: hsl(246 69% 47%);
  --primary-hover: hsl(246 69% 41%);
  --primary-soft: hsl(246 69% 96%);
  --primary-tint: hsl(246 69% 47% / 0.08);

  /* Surface / type */
  --bg: #FAF9F7;
  --bg-tint-1: #F3EFE9;      /* sand */
  --bg-tint-2: #EFEAFB;      /* lavender */
  --bg-tint-3: #E9F1EC;      /* sage */
  --bg-tint-4: #FBEEE3;      /* peach */
  --surface: #FFFFFF;
  --border: #E8E5DF;
  --border-strong: #D6D2CB;
  --fg: #15141A;
  --fg-muted: #6A6760;
  --fg-soft: #8C8A82;

  /* Type */
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-serif: "Instrument Serif", ui-serif, Georgia, serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Radii / shadow */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-2xl: 32px;

  --shadow-sm: 0 1px 2px rgba(20, 18, 30, 0.04), 0 1px 1px rgba(20, 18, 30, 0.03);
  --shadow-md: 0 8px 24px -8px rgba(20, 18, 30, 0.10), 0 2px 4px rgba(20, 18, 30, 0.04);
  --shadow-lg: 0 24px 60px -20px rgba(20, 18, 30, 0.18), 0 6px 16px -8px rgba(20, 18, 30, 0.08);

  /* Layout */
  --container: 1200px;
  --container-narrow: 880px;
}

* { box-sizing: border-box; }
*::selection { background: var(--primary); color: white; }

html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11";
  background: var(--bg);
  color: var(--fg);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}
.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 720px) {
  .container, .container-narrow { padding: 0 32px; }
}

/* ---------- Type ---------- */
h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg);
  text-wrap: balance;
}
h1 { font-size: clamp(36px, 6vw, 64px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 600; }
h2 { font-size: clamp(28px, 4vw, 44px); line-height: 1.1; letter-spacing: -0.03em; }
h3 { font-size: clamp(20px, 2.2vw, 24px); line-height: 1.25; }
h4 { font-size: 17px; line-height: 1.3; }
p { margin: 0; text-wrap: pretty; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  letter-spacing: 0.02em;
  text-transform: none;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary);
}

.serif-accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.text-muted { color: var(--fg-muted); }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--fg-muted); line-height: 1.5; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  border: 1px solid transparent;
  background: transparent;
  color: var(--fg);
  transition: all 0.18s ease;
  white-space: nowrap;
  min-height: 44px;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--fg);
  color: var(--bg);
}
.btn-primary:hover { background: #2A2733; }

.btn-violet {
  background: var(--primary);
  color: white;
}
.btn-violet:hover { background: var(--primary-hover); }

.btn-ghost {
  background: transparent;
  color: var(--fg);
}
.btn-ghost:hover { background: rgba(20, 18, 30, 0.04); }

.btn-outline {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--fg);
}
.btn-outline:hover { border-color: var(--fg); background: var(--surface); }

.btn-lg { padding: 14px 22px; font-size: 16px; min-height: 48px; }
.btn-arrow svg { transition: transform 0.18s ease; }
.btn-arrow:hover svg { transform: translateX(2px); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 249, 247, 0.78);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header.scrolled { border-bottom-color: var(--border); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}
@media (min-width: 720px) {
  .nav { height: 72px; }
}
.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.nav-logo .brand-img {
  height: 28px;
  width: auto;
  max-width: 168px;
  display: block;
}
@media (min-width: 720px) {
  .nav-logo .brand-img {
    height: 32px;
    max-width: 220px;
  }
}
.nav-logo .logo-mark {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--fg);
  color: var(--bg);
  display: grid; place-items: center;
  font-weight: 700; font-size: 15px;
  letter-spacing: -0.04em;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 4px;
}
@media (min-width: 900px) {
  .nav-links { display: flex; }
}
.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14.5px;
  color: var(--fg);
  transition: background 0.15s ease;
}
.nav-links a:hover { background: rgba(20, 18, 30, 0.05); }
.nav-links a.active { color: var(--primary); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.site-header .nav-actions .btn {
  min-height: 36px;
  padding-block: 7px;
}
@media (max-width: 720px) {
  .site-header .container {
    padding-inline: 12px;
  }
  .nav {
    height: 58px;
    gap: 8px;
    flex-wrap: nowrap;
  }
  .nav-actions {
    flex: 0 0 auto;
    gap: 5px;
  }
  .nav-logo {
    min-width: 0;
    flex: 1 1 auto;
  }
  .nav-logo .brand-img {
    height: 24px;
    max-width: 112px;
  }
  .site-header .nav-actions .btn {
    min-height: 34px;
    padding-block: 6px;
    padding-inline: 10px;
    font-size: 13px;
  }
  .locale-switch {
    font-size: 12px;
  }
  .locale-switch button {
    min-width: 27px;
    padding: 4px 7px;
  }
  .btn-login {
    width: 34px;
    padding-inline: 0;
  }
  .btn-login span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}
@media (max-width: 390px) {
  .nav-logo .brand-img {
    max-width: 96px;
  }
  .site-header .nav-actions .btn {
    padding-inline: 8px;
  }
  .btn-login {
    width: 34px;
    padding-inline: 0;
  }
}

/* Locale switch */
.locale-switch {
  display: inline-flex;
  background: rgba(20, 18, 30, 0.05);
  border-radius: 999px;
  padding: 3px;
  font-size: 13px;
  font-weight: 500;
}
.locale-switch button {
  border: none;
  background: transparent;
  color: var(--fg-muted);
  padding: 5px 10px;
  border-radius: 999px;
  transition: all 0.15s ease;
  cursor: pointer;
  min-width: 32px;
}
.locale-switch button.active {
  background: var(--surface);
  color: var(--fg);
  box-shadow: var(--shadow-sm);
}

/* Mobile menu */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--fg);
}
@media (min-width: 900px) { .nav-toggle { display: none; } }

.mobile-menu {
  position: fixed;
  inset: 64px 0 0 0;
  background: var(--bg);
  z-index: 40;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
  overflow-y: auto;
  padding: 24px 20px 48px;
  border-top: 1px solid var(--border);
}
.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu a {
  display: block;
  padding: 14px 0;
  font-size: 18px;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.mobile-menu .mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}
.mobile-menu .mobile-actions .btn { width: 100%; }

/* ---------- Section ---------- */
.section {
  padding: 64px 0;
}
@media (min-width: 720px) { .section { padding: 96px 0; } }
@media (min-width: 1080px) { .section { padding: 120px 0; } }

.section-header {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
}
.section-header.left { text-align: left; margin-left: 0; }
.section-header .eyebrow { margin-bottom: 16px; }
.section-header h2 { margin-bottom: 16px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 28px;
}
.card-soft {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 28px;
  box-shadow: var(--shadow-md);
}

/* ---------- Badge / chip ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--primary-tint);
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 500;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--fg);
  color: rgba(255, 255, 255, 0.8);
  padding: 64px 0 32px;
  margin-top: 0;
}
.site-footer h4 {
  color: white;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 16px;
  opacity: 0.7;
}
.site-footer a {
  display: block;
  padding: 6px 0;
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.15s ease;
}
.site-footer a:hover { color: white; }

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 1.5fr repeat(3, 1fr); gap: 48px; }
}
.footer-brand { max-width: 340px; }
.footer-brand .nav-logo { color: white; }
.footer-brand .nav-logo .logo-mark { background: white; color: var(--fg); }
.footer-brand .nav-logo .brand-img { height: 42px; }
.footer-brand p { margin-top: 16px; font-size: 14.5px; color: rgba(255, 255, 255, 0.6); line-height: 1.5; }

/* Disabled / placeholder footer link — visually similar but non-clickable */
.site-footer .footer-link-disabled {
  display: block;
  padding: 6px 0;
  color: rgba(255, 255, 255, 0.3);
  font-size: 14px;
  cursor: not-allowed;
  user-select: none;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  padding-top: 24px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.5);
}
.footer-bottom-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-bottom-links a { color: rgba(255, 255, 255, 0.5); padding: 0; }
.footer-bottom-links a:hover { color: white; }
@media (min-width: 720px) {
  .footer-bottom { flex-direction: row; align-items: center; }
}

/* ---------- Utility ---------- */
.grid { display: grid; }
.flex { display: flex; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.gap-6 { gap: 24px; } .gap-8 { gap: 32px; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; } .mt-12 { margin-top: 48px; }
.mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; }
.center { text-align: center; }
.hidden { display: none !important; }

/* Subtle fade-in on scroll */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Prevent layout shift on locale change */
[data-i18n] { transition: opacity 0.15s ease; }
