/* ═══════════════════════════════════════════
   FitMatch AI — Shared Design System
   All pages import this file for consistent styling
═══════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,500;0,9..144,700;1,9..144,400&family=Outfit:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400&display=swap');

:root {
  --cream: #FAF7F2;
  --cream-dark: #F0EBE3;
  --white: #FFFFFF;
  --ink: #1E1B18;
  --ink-soft: #3D3833;
  --ink-muted: #7A7470;
  --ink-faint: #B5AFA8;
  --ink-ghost: #D8D3CC;
  --terra: #C75D3A;
  --terra-light: #E8764F;
  --terra-soft: rgba(199,93,58,0.08);
  --terra-glow: rgba(199,93,58,0.15);
  --sage: #6B8F71;
  --sage-soft: rgba(107,143,113,0.1);
  --lavender: #8A7FB8;
  --lav-soft: rgba(138,127,184,0.08);
  --sand: #C9B99A;
  --sand-soft: rgba(201,185,154,0.15);
  --red: #D64545;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Outfit', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --r-sm: 10px; --r-md: 16px; --r-lg: 24px; --r-full: 100px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 1px 3px rgba(30,27,24,0.04);
  --shadow-md: 0 4px 16px rgba(30,27,24,0.06);
  --shadow-lg: 0 12px 40px rgba(30,27,24,0.08);
  --shadow-glow: 0 8px 30px rgba(199,93,58,0.18);
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-body); background: var(--cream); color: var(--ink); line-height: 1.65; overflow-x: hidden; }

/* ═══ NAVIGATION (shared across all pages) ═══ */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 20px 0; transition: all 0.4s var(--ease); }
.nav.scrolled { padding: 12px 0; background: rgba(250,247,242,0.92); backdrop-filter: blur(20px); border-bottom: 1px solid var(--ink-ghost); }
.nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { display: inline-flex; align-items: center; text-decoration: none; line-height: 0; }
.nav-logo img { display: block; height: 42px; width: auto; }
.nav-logo:hover img { opacity: 0.92; }
.nav-center { display: flex; gap: 32px; align-items: center; }
.nav-center a { color: var(--ink-muted); text-decoration: none; font-size: 0.88rem; font-weight: 500; transition: color 0.25s var(--ease); position: relative; }
.nav-center a::after { content: ''; position: absolute; bottom: -3px; left: 0; width: 0; height: 2px; border-radius: 2px; background: var(--terra); transition: width 0.3s var(--ease); }
.nav-center a:hover, .nav-center a.active { color: var(--ink); }
.nav-center a:hover::after, .nav-center a.active::after { width: 100%; }
.nav-right { display: flex; gap: 12px; align-items: center; }
.btn-text { background: none; border: none; color: var(--ink-muted); font-family: var(--font-body); font-size: 0.88rem; font-weight: 500; cursor: pointer; padding: 10px 16px; transition: color 0.25s; }
.btn-text:hover { color: var(--ink); }
.btn-fill { background: var(--ink); color: var(--cream); border: none; padding: 11px 28px; border-radius: var(--r-full); font-family: var(--font-body); font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all 0.3s var(--ease); }
.btn-fill:hover { background: var(--ink-soft); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.account-menu { position: relative; }
.account-trigger { display: inline-flex; align-items: center; gap: 10px; }
.account-caret { font-size: 0.72rem; opacity: 0.82; transition: transform 0.2s var(--ease); }
.account-menu.open .account-caret { transform: rotate(180deg); }
.account-dropdown { position: absolute; top: calc(100% + 10px); right: 0; min-width: 220px; background: var(--white); border: 1px solid rgba(30,27,24,0.08); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 10px; display: none; }
.account-menu.open .account-dropdown { display: block; animation: fadeUp 0.22s var(--ease); }
.account-menu-header { padding: 10px 12px 8px; border-bottom: 1px solid rgba(30,27,24,0.06); margin-bottom: 6px; }
.account-menu-title { font-size: 0.85rem; font-weight: 600; color: var(--ink); }
.account-menu-subtitle { font-size: 0.78rem; color: var(--ink-muted); margin-top: 2px; }
.account-dropdown button { width: 100%; border: none; background: transparent; color: var(--ink); text-align: left; padding: 12px; border-radius: 12px; font-family: var(--font-body); font-size: 0.88rem; font-weight: 500; cursor: pointer; transition: background 0.2s var(--ease), color 0.2s var(--ease); }
.account-dropdown button:hover { background: var(--terra-soft); color: var(--terra); }
.account-dropdown button.danger:hover { background: rgba(214,69,69,0.08); color: var(--red); }
.account-divider { height: 1px; background: rgba(30,27,24,0.06); margin: 6px 0; }
.hamburger { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: all 0.3s; }

/* ═══ SHARED BUTTONS ═══ */
.btn-primary { background: var(--terra); color: #fff; border: none; padding: 14px 32px; border-radius: var(--r-full); font-family: var(--font-body); font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.3s var(--ease); }
.btn-primary:hover { background: var(--terra-light); transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-outline { background: transparent; color: var(--ink-soft); border: 1.5px solid var(--ink-ghost); padding: 13px 28px; border-radius: var(--r-full); font-family: var(--font-body); font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: all 0.3s var(--ease); }
.btn-outline:hover { border-color: var(--ink-muted); color: var(--ink); }
.btn-sm { padding: 8px 20px; font-size: 0.8rem; }
.btn-icon { background: none; border: 1px solid var(--ink-ghost); width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.25s; font-size: 1rem; color: var(--ink-muted); }
.btn-icon:hover { border-color: var(--terra); color: var(--terra); background: var(--terra-soft); }
.btn-icon.active { border-color: var(--terra); color: #fff; background: var(--terra); }

/* ═══ SHARED LAYOUT ═══ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.page-wrapper { padding: 120px 0 80px; min-height: 100vh; }
.page-header { margin-bottom: 40px; }
.page-header h1 { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; line-height: 1.15; letter-spacing: -1px; }
.page-header h1 em { color: var(--terra); font-style: italic; font-weight: 500; }
.page-header p { color: var(--ink-muted); font-size: 1rem; margin-top: 8px; }
.section-eyebrow { font-family: var(--font-mono); font-size: 0.72rem; color: var(--terra); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 12px; }

/* ═══ CHIPS / TAGS ═══ */
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 10px 20px; border-radius: var(--r-full); border: 1px solid var(--ink-ghost); background: transparent; color: var(--ink-muted); font-size: 0.82rem; font-weight: 500; cursor: pointer; transition: all 0.25s var(--ease); font-family: var(--font-body); }
.chip:hover { border-color: var(--terra); color: var(--ink); }
.chip.selected { background: var(--terra); color: #fff; border-color: var(--terra); font-weight: 600; }
.tag { font-size: 0.68rem; font-weight: 600; padding: 4px 12px; border-radius: var(--r-full); background: var(--terra-soft); color: var(--terra); }

/* ═══ CARDS ═══ */
.card { background: var(--white); border-radius: var(--r-lg); border: 1px solid rgba(30,27,24,0.05); transition: all 0.3s var(--ease); }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-img { width: 100%; background: linear-gradient(135deg, var(--cream-dark), var(--ink-ghost)); display: flex; align-items: center; justify-content: center; font-size: 2.5rem; position: relative; border-radius: var(--r-lg) var(--r-lg) 0 0; overflow: hidden; }

/* ═══ FORM ELEMENTS ═══ */
.form-group { margin-bottom: 24px; }
.form-label { display: block; font-size: 0.75rem; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 10px; }
.form-input { width: 100%; padding: 13px 16px; background: var(--white); border: 1px solid var(--ink-ghost); border-radius: var(--r-sm); color: var(--ink); font-size: 0.9rem; font-family: var(--font-body); transition: border-color 0.25s; }
.form-input:focus { outline: none; border-color: var(--terra); }
.form-input::placeholder { color: var(--ink-faint); }
select.form-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237A7470' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }

/* ═══ MODAL ═══ */
.modal-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(30,27,24,0.35); backdrop-filter: blur(8px); display: none; align-items: center; justify-content: center; padding: 24px; }
.modal-overlay.open { display: flex; }
.modal { background: var(--white); border-radius: var(--r-lg); width: 100%; max-width: 500px; max-height: 85vh; overflow-y: auto; padding: 40px; animation: modalIn 0.3s var(--ease); }
.modal h2 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; margin-bottom: 24px; }
.modal-actions { display: flex; gap: 12px; margin-top: 28px; }
.modal-close { background: none; border: 1px solid var(--ink-ghost); color: var(--ink-muted); padding: 12px 24px; border-radius: var(--r-full); cursor: pointer; font-family: var(--font-body); font-size: 0.85rem; transition: all 0.25s; }
.modal-close:hover { border-color: var(--ink-faint); color: var(--ink); }

/* ═══ SKELETON LOADING ═══ */
.skeleton-line { height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--cream-dark) 25%, var(--ink-ghost) 50%, var(--cream-dark) 75%); background-size: 200% 100%; animation: shimmer 1.8s infinite; margin-bottom: 10px; }
.skeleton-line.short { width: 60%; }
.skeleton-block { border-radius: var(--r-md); background: linear-gradient(90deg, var(--cream-dark) 25%, var(--ink-ghost) 50%, var(--cream-dark) 75%); background-size: 200% 100%; animation: shimmer 1.8s infinite; }

/* ═══ TOAST NOTIFICATION ═══ */
.toast { position: fixed; bottom: 24px; right: 24px; z-index: 300; background: var(--ink); color: var(--cream); padding: 14px 24px; border-radius: var(--r-md); font-size: 0.88rem; font-weight: 500; box-shadow: var(--shadow-lg); transform: translateY(100px); opacity: 0; transition: all 0.4s var(--ease); }
.toast.show { transform: translateY(0); opacity: 1; }

/* ═══ ANIMATIONS ═══ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
  .nav-center { display: none; }
  .account-dropdown { right: 0; min-width: 200px; }
  .hamburger { display: flex; }
  .container { padding: 0 20px; }
  .page-wrapper { padding: 100px 0 60px; }
}
