/* ============================================================
   SHARED STYLES — CrystalFlow Miami
   Extracted from inline <style> blocks across all pages.
   ============================================================ */

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Satoshi', 'Helvetica Neue', sans-serif;

  /* Brand Colors — WCAG 2.1 AA accessible */
  --blue: #0066CC;
  --teal: #00A5A8;
  --cyan: #00C9DB;
  --cyan-accessible: #007883; /* WCAG AA safe on light bgs (5:1+) */
  --pink: #D01A7C;
  --pink-vivid: #E8439A; /* original vivid — decorative use only (borders, shadows, gradients) */
  --pink-hover: #B01668;
  --orange: #FF6B35;
  --navy: #0A1628;
  --navy-light: #0F1F3A;

  /* Light Mode */
  --bg: #FAFBFC;
  --bg-warm: #F5F3F0;
  --bg-cool: #EFF4F9;
  --surface: #FFFFFF;
  --surface-2: #F4F5F8;
  --surface-offset: #ECEEF3;
  --divider: #DDE1E8;
  --border: #CDD3DE;
  --text: #0A1628;
  --text-muted: #5A6580;
  --text-faint: #5D6C90; /* WCAG AA safe on ALL light bgs (4.7:1+) */
  --text-faint-on-dark: #A0AAC0; /* for dark backgrounds only */
  --text-inverse: #FAFBFC;
  --primary: #D01A7C;
  --primary-hover: #B01668;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(10, 22, 40, 0.06);
  --shadow-md: 0 4px 20px rgba(10, 22, 40, 0.08);
  --shadow-lg: 0 12px 48px rgba(10, 22, 40, 0.1);
  --shadow-xl: 0 24px 64px rgba(10, 22, 40, 0.14);

  /* Type Scale */
  --text-xs:   clamp(0.7rem,  0.65rem + 0.25vw, 0.8rem);
  --text-sm:   clamp(0.85rem, 0.8rem  + 0.25vw, 0.95rem);
  --text-base: clamp(1rem,    0.95rem + 0.25vw, 1.1rem);
  --text-lg:   clamp(1.15rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,  1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,    1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,  1rem    + 4vw,    5rem);

  /* Spacing */
  --s1: 0.25rem; --s2: 0.5rem; --s3: 0.75rem; --s4: 1rem;
  --s5: 1.25rem; --s6: 1.5rem; --s8: 2rem; --s10: 2.5rem;
  --s12: 3rem; --s16: 4rem; --s20: 5rem; --s24: 6rem; --s32: 8rem;

  /* Radius */
  --radius-sm: 0.375rem; --radius-md: 0.5rem; --radius-lg: 0.75rem;
  --radius-xl: 1rem; --radius-2xl: 1.5rem; --radius-full: 9999px;

  /* Animations */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 180ms var(--ease);
  --transition-smooth: 400ms var(--ease);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-max: 1400px;
}

/* ============================================================
   BASE RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text);
  background-color: var(--bg);
}

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, h6 { text-wrap: balance; line-height: 1.1; }
p, li, figcaption { text-wrap: pretty; max-width: 72ch; }
button { cursor: pointer; background: none; border: none; }

a, button, [role="button"], input, textarea, select {
  transition: color var(--transition-fast), background var(--transition-fast),
    border-color var(--transition-fast), box-shadow var(--transition-fast);
}

:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: var(--radius-sm); }
::selection { background: rgba(232, 67, 154, 0.15); color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container { width: 100%; max-width: var(--content-wide); margin-inline: auto; padding-inline: var(--s6); }
.container--narrow { max-width: var(--content-default); }

/* ============================================================
   SECTION PADDING
   ============================================================ */
.section-pad { padding: var(--s16) 0; }
.section-pad-lg { padding: var(--s24) 0; }
@media (max-width: 767px) {
  .section-pad { padding: var(--s10) 0; }
  .section-pad-lg { padding: var(--s16) 0; }
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background: var(--navy);
  padding: var(--s5) 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: relative;
  z-index: 1000;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.header-logo { display: flex; align-items: center; gap: var(--s3); text-decoration: none; color: #fff; }
.header-logo-mark { width: 36px; height: 36px; flex-shrink: 0; }
.header-logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.header-logo-name { font-family: var(--font-body); font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em; }
.header-logo-sub { font-family: var(--font-body); font-weight: 400; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cyan); }

/* Footer logo must use readable colors on light bg */
.site-footer .header-logo-name { color: var(--text); }
.site-footer .header-logo-sub { color: var(--cyan-accessible); }

.header-nav { display: flex; align-items: center; gap: var(--s8); }
.header-nav-list { display: flex; gap: var(--s8); list-style: none; margin: 0; padding: 0; }
.header-nav-list a { font-size: var(--text-sm); font-weight: 500; color: rgba(255,255,255,0.7); text-decoration: none; transition: color var(--transition-fast); }
.header-nav-list a:hover { color: #fff; }
.header-nav a { font-size: var(--text-sm); font-weight: 500; color: rgba(255,255,255,0.7); text-decoration: none; transition: color var(--transition-fast); }
.header-nav a:hover { color: #fff; }
.header-nav a.active { color: #fff; }
.site-header.scrolled .header-nav-list a { color: var(--text-muted); }
.site-header.scrolled .header-nav-list a:hover { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: var(--s4); }

/* Language toggle */
.lang-toggle { display: flex; align-items: center; gap: var(--s1); }
.lang-toggle button {
  font-size: var(--text-xs); font-weight: 600; color: rgba(255,255,255,0.5);
  padding: var(--s1) var(--s2); border-radius: var(--radius-sm); background: none; border: none; cursor: pointer;
  transition: color var(--transition-fast);
}
.lang-toggle button:hover { color: rgba(255,255,255,0.85); }
.lang-toggle button.active { color: #fff; background: rgba(255,255,255,0.12); }
.site-header.scrolled .lang-toggle button { color: var(--text-faint); }
.site-header.scrolled .lang-toggle button:hover { color: var(--text-muted); }
.site-header.scrolled .lang-toggle button.active { color: var(--text); background: var(--surface-2); }

/* Mobile hamburger toggle */
.mobile-toggle { display: none; flex-direction: column; gap: 5px; width: 24px; padding: 0; cursor: pointer; background: none; border: none; }
.mobile-toggle span { display: block; height: 2px; background: #fff; border-radius: 2px; transition: all 0.3s; }

/* Mobile nav drawer */
.mobile-nav {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 999;
  background: var(--bg); padding: calc(80px + var(--s8)) var(--s6) var(--s8);
  flex-direction: column; gap: var(--s6); overflow-y: auto;
}
.mobile-nav.open { display: flex; }
.mobile-nav a { font-size: var(--text-xl); font-family: var(--font-display); color: var(--text); text-decoration: none; padding: var(--s3) 0; border-bottom: 1px solid var(--divider); }
.mobile-nav .btn { margin-top: var(--s4); text-align: center; justify-content: center; }

@media (max-width: 900px) {
  .header-nav { display: none; }
  .mobile-toggle { display: flex; }
  .header-actions .btn { display: none; }
  .header-actions .theme-toggle { display: none; }
  .header-actions { gap: var(--s3); }
  .lang-toggle button { padding: 2px 6px; font-size: 0.65rem; }
  .lang-toggle { gap: 2px; }
}

/* Scroll state (pages opt-in via position: sticky on .site-header) */
.site-header.scrolled {
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  border-bottom-color: var(--divider);
}
.site-header.scrolled .header-logo { color: var(--text); }
.site-header.scrolled .header-logo-sub { color: var(--teal); }
.site-header.scrolled .header-nav a { color: var(--text-muted); }
.site-header.scrolled .header-nav a:hover,
.site-header.scrolled .header-nav a.active { color: var(--text); }
.site-header.scrolled .mobile-toggle span { background: var(--text); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: var(--s2);
  padding: var(--s4) var(--s8); font-family: var(--font-body);
  font-size: var(--text-sm); font-weight: 600; border-radius: var(--radius-full);
  text-decoration: none; cursor: pointer; border: none; white-space: nowrap;
  transition: all var(--transition-fast);
}
.btn-lg { padding: var(--s5) var(--s10); font-size: var(--text-base); }
.btn-primary { background: var(--pink); color: #fff; }
.btn-primary:hover { background: var(--pink-hover); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(208, 26, 124, 0.35); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.btn-ghost:hover { border-color: var(--text); transform: translateY(-2px); }
.btn-outline-pink { background: transparent; color: var(--pink); border: 1.5px solid var(--pink); }
.btn-outline-pink:hover { background: var(--pink); color: #fff; transform: translateY(-2px); }

/* ============================================================
   PRODUCTS / PACKAGES GRID
   ============================================================ */
.products-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s8); margin-top: var(--s16);
}
@media (max-width: 900px) {
  .products-grid { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
}
.product-card {
  position: relative; background: var(--bg); border: 1px solid var(--divider);
  border-radius: var(--radius-2xl); padding: var(--s8); display: flex;
  flex-direction: column; transition: all var(--transition-fast);
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.product-card.featured { border-color: var(--pink); box-shadow: 0 0 0 1px var(--pink), var(--shadow-md); }
.product-badge {
  position: absolute; top: calc(-1 * var(--s3)); left: 50%; transform: translateX(-50%);
  background: var(--pink); color: #fff; font-size: var(--text-xs); font-weight: 700;
  padding: var(--s1) var(--s5); border-radius: var(--radius-full); white-space: nowrap;
}
.product-image {
  width: 100%; aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--s6); background: var(--surface-2); border-radius: var(--radius-xl);
  overflow: hidden; padding: var(--s6);
}
.product-image img { max-height: 200px; width: auto; object-fit: contain; }
.product-name { font-family: var(--font-display); font-size: var(--text-xl); margin-bottom: var(--s2); }
.product-price { font-family: var(--font-body); font-size: var(--text-lg); font-weight: 700; color: var(--pink); margin-bottom: var(--s4); }
.product-price span { font-size: var(--text-sm); font-weight: 400; color: var(--text-muted); }
.product-features { list-style: none; display: flex; flex-direction: column; gap: var(--s3); margin-bottom: var(--s8); flex-grow: 1; padding: 0; }
.product-features li {
  display: flex; align-items: flex-start; gap: var(--s2);
  font-size: var(--text-sm); color: var(--text-muted); line-height: 1.4;
}
.product-features li::before {
  content: ''; width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px;
  background: var(--cyan); border-radius: var(--radius-full);
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center/14px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center/14px no-repeat;
}
.product-card .btn { width: 100%; justify-content: center; }
.btn-white { background: #fff; color: var(--navy); }
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(255,255,255,0.2); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--divider);
  padding: var(--s16) 0 var(--s8);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--s8);
  margin-bottom: var(--s10);
}
.footer-brand-col p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--s4);
  max-width: 32ch;
}
.footer-col h4 {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--s4);
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.footer-col ul li {
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.footer-col ul li a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.footer-col ul li a:hover {
  color: var(--text);
}
.footer-bottom {
  border-top: 1px solid var(--divider);
  padding-top: var(--s6);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s6);
  flex-wrap: wrap;
}
.footer-bottom p {
  font-size: var(--text-xs);
  color: var(--text-faint);
  max-width: none;
}
.footer-bottom a {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-decoration: none;
}
.footer-bottom a:hover {
  color: var(--primary);
}
@media (max-width: 767px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--s8) var(--s6);
  }
  .footer-brand-col {
    grid-column: 1 / -1;
  }
  .footer-brand-col p {
    max-width: none;
  }
}
@media (max-width: 420px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
.footer-text { font-size: var(--text-xs); color: var(--text-faint); max-width: none; }
.footer-text a { color: var(--pink); text-decoration: none; }
.footer-text a:hover { text-decoration: underline; }
.footer-links { display: flex; justify-content: center; gap: var(--s6); margin-top: var(--s3); flex-wrap: wrap; }
.footer-links a { font-size: var(--text-xs); color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--primary); }
