/* ============================================
   MacLoveKit — Colors & Type
   Source of truth: website/src/styles/tokens.css
   ============================================ */

/* ---- Font faces ---- */
@font-face {
  font-family: "Figtree";
  src: url("./fonts/Figtree-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: optional;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("./fonts/InstrumentSerif-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: optional;
}
@font-face {
  font-family: "Fixel Text";
  src: url("./fonts/FixelText-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: optional;
}
@font-face {
  font-family: "Fixel Text";
  src: url("./fonts/FixelText-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: optional;
}
@font-face {
  font-family: "Fixel Text";
  src: url("./fonts/FixelText-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: optional;
}
@font-face {
  font-family: "Fixel Display";
  src: url("./fonts/FixelDisplay-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: optional;
}

:root {
  /* ===== Typography ===== */
  --font-display: "Figtree", "Fixel Display", "Avenir Next", sans-serif;
  --font-text:    "Figtree", "Fixel Text", "Avenir Next", sans-serif;
  --font-serif:   "Instrument Serif", "Georgia", serif;

  /* Size scale — Floutwork-aligned */
  --text-hero:  64px;
  --text-h2:    40px;
  --text-h3:    28px;
  --text-h4:    20px;
  --text-body:  16px;
  --text-small: 14px;
  --text-xs:    12px;

  --leading-tight:   1.1;
  --leading-snug:    1.2;
  --leading-normal:  1.5;
  --leading-relaxed: 1.6;

  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;

  /* ===== Colors — Light (primary) ===== */
  --color-text:           #1a1a2e;
  --color-text-secondary: rgba(26, 26, 46, 0.55);
  --color-text-tertiary:  rgba(26, 26, 46, 0.35);
  --color-text-inverse:   #ffffff;

  --color-bg:        #ffffff;
  --color-bg-subtle: #f0f5fa;
  --color-bg-muted:  #e2eaf3;
  --color-bg-dark:   #1a1a2e;

  --color-border:        rgba(26, 26, 46, 0.08);
  --color-border-strong: rgba(26, 26, 46, 0.15);

  /* ===== App accents ===== */
  --color-lumaspace: #a78bfa; /* purple */
  --color-renameit:  #60a5fa; /* blue   */
  --color-smartly:   #34d399; /* green  */
  --color-app-accent: var(--color-text); /* overridden per-app page */

  /* ===== Spacing (8px grid) ===== */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;

  /* ===== Layout ===== */
  --container-max:    1200px;
  --container-wide:   1400px;
  --container-narrow: 800px;

  /* ===== Radii ===== */
  --radius-sm:     6px;
  --radius-md:    12px;
  --radius-lg:    16px;
  --radius-xl:    24px;
  --radius-2xl:   28px;  /* app cards */
  --radius-button: 40px; /* pill CTAs */
  --radius-full: 9999px;

  /* ===== Shadows — soft, never dramatic ===== */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 16px 50px rgba(0, 0, 0, 0.10);

  /* ===== Motion ===== */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast:   150ms;
  --duration-normal: 300ms;
  --duration-slow:   500ms;
  --duration-slower: 800ms;

  /* ===== Z-index ===== */
  --z-header:      100;
  --z-mobile-menu: 200;
  --z-overlay:     300;
  --z-modal:       400;

  /* ===== Semantic typography roles ===== */
  --type-hero-size: var(--text-hero);
  --type-hero-weight: var(--weight-bold);
  --type-hero-leading: var(--leading-snug);
  --type-hero-tracking: -0.03em;

  --type-h2-size: var(--text-h2);
  --type-h2-weight: var(--weight-bold);
  --type-h2-tracking: -0.02em;

  --type-h3-size: var(--text-h3);
  --type-h3-weight: var(--weight-bold);
  --type-h3-tracking: -0.02em;
}

/* ============================================
   Dark mode — light is primary, dark is polished
   Apply via [data-theme="dark"] or prefers-color-scheme.
   ============================================ */
[data-theme="dark"] {
  --color-text:           #f5f3ef;
  --color-text-secondary: rgba(245, 243, 239, 0.62);
  --color-text-tertiary:  rgba(245, 243, 239, 0.38);
  --color-text-inverse:   #1a1a2e;

  --color-bg:        #0f1020;
  --color-bg-subtle: #15172a;
  --color-bg-muted:  #1c1f36;
  --color-bg-dark:   #0a0b15;

  --color-border:        rgba(245, 243, 239, 0.08);
  --color-border-strong: rgba(245, 243, 239, 0.14);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.45);
  --shadow-xl: 0 16px 50px rgba(0, 0, 0, 0.5);
}

/* ============================================
   Semantic element styles (opinionated defaults)
   ============================================ */
.mlk-hero {
  font-family: var(--font-display);
  font-size: var(--type-hero-size);
  font-weight: var(--type-hero-weight);
  line-height: var(--type-hero-leading);
  letter-spacing: var(--type-hero-tracking);
  color: var(--color-text);
}

.mlk-h2 {
  font-family: var(--font-display);
  font-size: var(--type-h2-size);
  font-weight: var(--type-h2-weight);
  line-height: var(--leading-snug);
  letter-spacing: var(--type-h2-tracking);
  color: var(--color-text);
}

.mlk-h3 {
  font-family: var(--font-display);
  font-size: var(--type-h3-size);
  font-weight: var(--type-h3-weight);
  line-height: var(--leading-snug);
  letter-spacing: var(--type-h3-tracking);
  color: var(--color-text);
}

.mlk-h4 {
  font-family: var(--font-display);
  font-size: var(--text-h4);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
  color: var(--color-text);
}

.mlk-body {
  font-family: var(--font-text);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
}

.mlk-small {
  font-family: var(--font-text);
  font-size: var(--text-small);
  line-height: var(--leading-normal);
  color: var(--color-text-secondary);
}

.mlk-eyebrow {
  font-family: var(--font-text);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-tertiary);
}

/* Italic-serif accent — the signature move.
   Use on 1–3 words inside a sans headline for editorial lift. */
.mlk-serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.005em;
}

/* Pill CTA — Floutwork-style 40px radius */
.mlk-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-text);
  font-size: var(--text-small);
  font-weight: var(--weight-semibold);
  color: var(--color-bg);
  background-color: var(--color-text);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}
.mlk-cta:hover   { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.mlk-cta:active  { transform: translateY(0); }

code, pre, kbd, samp {
  font-family: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
  font-size: 0.92em;
}


/* Skeleton loading */
.skel{border-radius:10px;background:linear-gradient(90deg,rgba(14,14,16,0.06) 25%,rgba(14,14,16,0.1) 50%,rgba(14,14,16,0.06) 75%);background-size:200% 100%;animation:skel-shimmer 1.2s ease infinite}
.skel-line{height:14px;margin-bottom:10px}
.skel-line.w80{width:80%}.skel-line.w60{width:60%}.skel-line.w40{width:40%}.skel-line.w100{width:100%}
.skel-title{height:32px;width:70%;margin-bottom:16px}
.skel-block{height:120px;margin-bottom:16px}
.skel-card{border-radius:16px;height:72px;margin-bottom:12px}
.skel-circle{width:32px;height:32px;border-radius:50%}
@keyframes skel-shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}
