/* ============================================================
   Moda Meds Rx — Static Site Stylesheet
   Navy + Gold luxury apothecary aesthetic
   ============================================================ */

:root {
  --navy: #05162A;
  --navy-2: #0a2140;
  --navy-3: #112A46;
  --gold: #C8A97E;
  --gold-light: #d9bc8f;
  --gold-deep: #a8875c;
  --cream: #F5F3E9;
  --bone: #EDE8D9;
  --ink: #1a1a1a;
  --muted: #7a7468;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Work Sans', system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.font-serif { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 500; letter-spacing: -0.01em; }
.font-mono-label { font-family: 'IBM Plex Mono', monospace; text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.72rem; }

::selection { background: var(--gold); color: var(--navy); }

/* ===== Layout helpers ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 6rem 0; }
.text-center { text-align: center; }

/* ===== Header ===== */
.header { position: sticky; top: 0; z-index: 50; background: rgba(5,22,42,0.95); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(200,169,126,0.2); }
.topbar { display: none; justify-content: space-between; padding: 0.5rem 1.5rem; color: rgba(245,243,233,0.7); font-family: 'IBM Plex Mono', monospace; text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.65rem; border-bottom: 1px solid rgba(255,255,255,0.05); }
.topbar a { color: inherit; }
.topbar a:hover { color: var(--gold); }
.header-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand img { width: 70px; height: 70px; object-fit: contain; border-radius: 0; flex-shrink: 0; }
.brand .name { font-family: 'Cormorant Garamond', serif; color: var(--gold); font-size: 1.5rem; line-height: 1; letter-spacing: 0.02em; }
.brand .tag { font-family: 'IBM Plex Mono', monospace; color: rgba(245,243,233,0.6); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.18em; margin-top: 4px; }
.nav { display: none; gap: 1.75rem; align-items: center; }
.nav a { color: rgba(245,243,233,0.85); font-size: 0.9rem; transition: color 0.2s; }
.nav a:hover, .nav a.active { color: var(--gold); }
.header-cta { display: flex; align-items: center; gap: 0.75rem; }
.menu-toggle { display: inline-flex; background: transparent; border: 0; color: var(--cream); padding: 8px; cursor: pointer; }
.mobile-nav { display: none; flex-direction: column; gap: 1rem; padding: 1.5rem; background: var(--navy-2); border-top: 1px solid rgba(200,169,126,0.2); }
.mobile-nav a { color: var(--cream); font-size: 1rem; }
.mobile-nav.open { display: flex; }

@media (min-width: 768px) { .topbar { display: flex; } }
@media (min-width: 1024px) { .nav { display: flex; } .menu-toggle { display: none; } .mobile-nav.open { display: none; } }

/* ===== Buttons ===== */
.btn-gold, .btn-outline-gold, .btn-outline-navy {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 500; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.08em;
  border: 1px solid var(--gold);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-light); border-color: var(--gold-light); transform: translateY(-1px); box-shadow: 0 10px 30px -12px rgba(200,169,126,0.5); }
.btn-outline-gold { background: transparent; color: var(--gold); }
.btn-outline-gold:hover { background: var(--gold); color: var(--navy); }
.btn-outline-navy { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline-navy:hover { background: var(--navy); color: var(--cream); }

/* ===== Hero ===== */
.hero { position: relative; background: var(--navy); color: var(--cream); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; opacity: 0.18; background-size: cover; background-position: center; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(120deg, rgba(5,22,42,0.97) 0%, rgba(5,22,42,0.85) 60%, rgba(17,42,70,0.7) 100%); }
.hero-inner { position: relative; max-width: 1200px; margin: 0 auto; padding: 4rem 1.5rem 4.5rem; display: grid; gap: 3rem; align-items: center; }
.hero-overline { color: var(--gold); margin-bottom: 1.5rem; }
.hero h1 { font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: clamp(2.5rem, 6vw, 5rem); line-height: 1.05; letter-spacing: -0.01em; margin: 0; color: var(--cream); }
.hero h1 em { font-style: italic; color: var(--gold); }
.hero p { color: rgba(245,243,233,0.75); margin-top: 1.5rem; font-size: 1.1rem; max-width: 520px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.5rem; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 2rem; margin-top: 3rem; color: rgba(245,243,233,0.5); font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.18em; }
.hero-logo-wrap { position: relative; justify-self: center; }
.hero-logo-wrap::before { content: ''; position: absolute; inset: -1.5rem; border: 1px solid rgba(200,169,126,0.3); border-radius: 2px; }
.hero-logo-wrap img { width: 280px; height: 280px; object-fit: cover; box-shadow: 0 25px 60px -20px rgba(0,0,0,0.6); border-radius: 2px; position: relative; }

@media (min-width: 768px) { .hero-inner { grid-template-columns: 1fr auto; padding: 5rem 1.5rem 5.5rem; } .hero-logo-wrap img { width: 320px; height: 320px; } }

.page-hero { background: var(--navy); color: var(--cream); padding: 5rem 1.5rem; text-align: center; position: relative; overflow: hidden; }
.page-hero h1 { font-family: 'Cormorant Garamond', serif; font-size: clamp(2.5rem, 5vw, 4rem); margin: 1rem 0 0; color: var(--cream); }
.page-hero p { color: rgba(245,243,233,0.75); margin: 1rem auto 0; max-width: 600px; }

/* ===== Trust bar ===== */
.trustbar { background: var(--bone); border-bottom: 1px solid rgba(5,22,42,0.1); }
.trustbar-inner { max-width: 1200px; margin: 0 auto; padding: 1.5rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; font-family: 'IBM Plex Mono', monospace; color: rgba(5,22,42,0.6); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.18em; }
@media (min-width: 768px) { .trustbar-inner { justify-content: space-between; } }

/* ===== Section heading ===== */
.section-head { margin-bottom: 3.5rem; }
.section-head .overline { color: var(--gold-deep); margin-bottom: 1rem; }
.section-head h2 { font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: clamp(2rem, 4vw, 3rem); color: var(--navy); margin: 0; line-height: 1.1; }
.section-head p { color: rgba(5,22,42,0.6); max-width: 480px; margin: 1.5rem 0 0; }
.section-head.center { text-align: center; }
.section-head.center p { margin-left: auto; margin-right: auto; }

/* ===== Cards / Grids ===== */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.card { background: #fff; border: 1px solid rgba(5,22,42,0.08); padding: 2rem; transition: all 0.3s ease; border-radius: 2px; }
.card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -20px rgba(5,22,42,0.2); border-color: rgba(200,169,126,0.5); }
.card .icon { color: var(--gold-deep); margin-bottom: 1.5rem; }
.card h3 { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; color: var(--navy); margin: 0 0 0.75rem; font-weight: 500; }
.card p { color: rgba(5,22,42,0.65); font-size: 0.95rem; margin: 0; }

.product-card { background: #fff; border: 1px solid rgba(5,22,42,0.08); padding: 1rem; transition: all 0.3s ease; display: block; border-radius: 2px; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -20px rgba(5,22,42,0.2); border-color: rgba(200,169,126,0.5); }
.product-card .img { aspect-ratio: 1; overflow: hidden; background: #fff; margin-bottom: 1rem; }
.product-card .img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.product-card:hover .img img { transform: scale(1.05); }
.product-card .cat { font-family: 'IBM Plex Mono', monospace; font-size: 0.65rem; color: rgba(5,22,42,0.5); text-transform: uppercase; letter-spacing: 0.18em; }
.product-card h3 { font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; color: var(--navy); margin: 0.25rem 0 0; line-height: 1.3; font-weight: 500; }
.product-card .price { color: var(--gold-deep); font-weight: 500; margin-top: 0.5rem; font-size: 0.95rem; }

/* ===== Story split ===== */
.story { background: var(--navy); color: var(--cream); }
.story-inner { max-width: 1200px; margin: 0 auto; padding: 6rem 1.5rem; display: grid; gap: 3rem; align-items: center; }
@media (min-width: 768px) { .story-inner { grid-template-columns: 1fr 1fr; } }
.story img { aspect-ratio: 4/5; object-fit: cover; }
.story h2 { font-family: 'Cormorant Garamond', serif; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; color: var(--cream); margin: 1rem 0; }
.story p { color: rgba(245,243,233,0.7); margin: 1.5rem 0; }

/* ===== Forms ===== */
.form-card { background: #fff; border: 1px solid rgba(5,22,42,0.1); padding: 2.5rem; border-radius: 2px; }
.field { margin-bottom: 1.25rem; }
.field label { display: block; font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--navy); margin-bottom: 0.5rem; font-weight: 500; }
.field input, .field textarea, .field select {
  width: 100%; background: #fff;
  border: 1px solid rgba(5,22,42,0.15);
  padding: 0.85rem 1rem; font-size: 0.95rem; color: var(--navy);
  border-radius: 2px; font-family: 'Work Sans', sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200,169,126,0.2); }
.field-row { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .field-row { grid-template-columns: 1fr 1fr; } }
.form-foot { font-family: 'IBM Plex Mono', monospace; font-size: 0.65rem; color: rgba(5,22,42,0.4); text-align: center; text-transform: uppercase; letter-spacing: 0.18em; margin-top: 1rem; }

/* ===== Footer ===== */
.footer { background: var(--navy); color: rgba(245,243,233,0.8); position: relative; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 4rem 1.5rem; display: grid; gap: 2.5rem; }
@media (min-width: 768px) { .footer-inner { grid-template-columns: repeat(4, 1fr); } }
.footer .brand .name { font-size: 1.5rem; }
.footer h4 { font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--gold); margin: 0 0 1.25rem; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { margin-bottom: 0.75rem; font-size: 0.9rem; }
.footer ul li a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(245,243,233,0.1); }
.footer-bottom-inner { max-width: 1200px; margin: 0 auto; padding: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; justify-content: space-between; color: rgba(245,243,233,0.5); font-size: 0.75rem; }
@media (min-width: 768px) { .footer-bottom-inner { flex-direction: row; } }
.footer-icon { color: var(--gold); margin-right: 0.5rem; }

/* ===== Phone-CTA chat replacement (replaces AI chatbot) ===== */
.float-call { position: fixed; bottom: 24px; right: 24px; z-index: 40; background: var(--navy); color: var(--gold); border: 1px solid rgba(200,169,126,0.4); width: 60px; height: 60px; border-radius: 2px; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 12px 30px -8px rgba(0,0,0,0.4); transition: background 0.2s; }
.float-call:hover { background: var(--navy-2); }

/* ===== Article ===== */
.article { max-width: 720px; margin: 0 auto; padding: 5rem 1.5rem; }
.article .meta { font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--gold-deep); }
.article h1 { font-family: 'Cormorant Garamond', serif; font-size: clamp(2rem, 5vw, 3.5rem); color: var(--navy); margin: 0.5rem 0 2rem; line-height: 1.1; font-weight: 500; }
.article .lead { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 1.3rem; color: rgba(5,22,42,0.8); border-left: 2px solid var(--gold); padding-left: 1.5rem; margin: 2rem 0; }
.article .body { color: rgba(5,22,42,0.75); font-size: 1.1rem; line-height: 1.8; white-space: pre-line; }
.article .hero-img { aspect-ratio: 16/9; overflow: hidden; margin-bottom: 1rem; }
.article .hero-img img { width: 100%; height: 100%; object-fit: cover; }

.back-link { display: inline-flex; align-items: center; gap: 0.5rem; color: rgba(5,22,42,0.6); font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.18em; margin-bottom: 2rem; }
.back-link:hover { color: var(--navy); }

/* ===== Misc ===== */
.bg-cream { background: var(--cream); }
.bg-bone { background: var(--bone); }
.bg-navy { background: var(--navy); color: var(--cream); }
.text-navy { color: var(--navy); }
.text-gold { color: var(--gold); }
.hairline { height: 1px; background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold) 70%, transparent); opacity: 0.6; margin: 2rem 0; }
