/* ============================================
   DERMNEX Brand Website — Global Styles
   Palette: Ivory + Coffee + Gold
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Nunito+Sans:ital,opsz,wght@0,6..12,300;0,6..12,400;0,6..12,500;0,6..12,600;0,6..12,700;1,6..12,400&display=swap');

:root {
  --ivory: #FAF7F2;
  --ivory-dark: #F0EBE3;
  --cream: #F5F0E8;
  --coffee-light: #A08060;
  --coffee: #6B4C3B;
  --coffee-dark: #3E2723;
  --gold: #C5A04E;
  --gold-light: #D4B96A;
  --gold-muted: #B8943F;
  --text-primary: #3E2723;
  --text-secondary: #6B4C3B;
  --text-muted: #8D7B6E;
  --white: #FFFFFF;
  --border: rgba(107,76,59,0.12);
  --shadow-sm: 0 1px 3px rgba(62,39,35,0.06);
  --shadow-md: 0 4px 16px rgba(62,39,35,0.08);
  --shadow-lg: 0 8px 32px rgba(62,39,35,0.1);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Nunito Sans', 'Segoe UI', sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
  --header-height: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--ivory);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--coffee); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--gold); }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ---------- TYPOGRAPHY ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.25; color: var(--coffee-dark); }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.6rem); }
p { margin-bottom: 1rem; }

/* ---------- HEADER ---------- */
.site-header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  background: rgba(250,247,242,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
  transition: var(--transition);
}
.header-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.logo {
  font-family: var(--font-display); font-size: 1.6rem; font-weight: 700;
  color: var(--coffee-dark); letter-spacing: 0.5px;
  display: flex; align-items: center; gap: 8px;
}
.logo span { color: var(--gold); }

.nav-links { display: flex; gap: 28px; list-style: none; align-items: center; }
.nav-links a {
  font-size: 0.88rem; font-weight: 500; color: var(--text-secondary);
  letter-spacing: 0.3px; text-transform: uppercase; position: relative;
  padding: 4px 0;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px;
  background: var(--gold); transition: var(--transition);
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a:hover { color: var(--coffee-dark); }

/* Mobile menu */
.menu-toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 32px; height: 32px; position: relative;
  flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.menu-toggle span {
  display: block; width: 24px; height: 2px; background: var(--coffee-dark);
  transition: var(--transition);
}
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  .nav-links {
    position: fixed; top: var(--header-height); left: 0; right: 0;
    background: var(--ivory); flex-direction: column; padding: 32px 24px;
    gap: 20px; transform: translateY(-110%); transition: var(--transition);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }
  .nav-links.open { transform: translateY(0); }
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 0.92rem; font-weight: 600;
  letter-spacing: 0.4px; cursor: pointer; border: none;
  transition: var(--transition); text-transform: uppercase;
}
.btn-primary {
  background: var(--coffee); color: var(--white);
}
.btn-primary:hover { background: var(--coffee-dark); color: var(--white); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline {
  background: transparent; color: var(--coffee); border: 2px solid var(--coffee);
}
.btn-outline:hover { background: var(--coffee); color: var(--white); }
.btn-gold {
  background: var(--gold); color: var(--white);
}
.btn-gold:hover { background: var(--gold-muted); color: var(--white); transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* ---------- SECTIONS ---------- */
.section { padding: 80px 0; }
.section-alt { background: var(--cream); }
.section-dark { background: var(--coffee-dark); color: var(--ivory); }
.section-dark h2, .section-dark h3 { color: var(--ivory); }
.section-dark p { color: rgba(250,247,242,0.85); }

.section-header { text-align: center; margin-bottom: 56px; }
.section-header h2 { margin-bottom: 16px; }
.section-header p { color: var(--text-muted); max-width: 600px; margin: 0 auto; font-size: 1.05rem; }
.section-divider {
  width: 48px; height: 3px; background: var(--gold); margin: 16px auto 0; border-radius: 2px;
}

/* ---------- CARDS ---------- */
.card {
  background: var(--white); border-radius: var(--radius-md);
  padding: 32px; border: 1px solid var(--border);
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* ---------- HERO ---------- */
.hero {
  padding-top: calc(var(--header-height) + 60px);
  padding-bottom: 80px;
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--ivory) 0%, var(--cream) 50%, var(--ivory-dark) 100%);
}
.hero::before {
  content: ''; position: absolute; top: -50%; right: -20%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(197,160,78,0.08) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center;
}
.hero-text h1 { margin-bottom: 20px; }
.hero-text h1 em { font-style: italic; color: var(--gold); }
.hero-text p { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 32px; max-width: 480px; }
.hero-image { position: relative; }
.hero-image img {
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  max-height: 480px; object-fit: contain; width: 100%;
  background: var(--white); padding: 24px;
}
.hero-image::after {
  content: ''; position: absolute; top: 16px; left: 16px; right: -16px; bottom: -16px;
  border: 2px solid var(--gold); border-radius: var(--radius-lg); z-index: -1; opacity: 0.3;
}

@media (max-width: 768px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero-text p { margin: 0 auto 32px; }
  .hero-image { order: -1; max-width: 320px; margin: 0 auto; }
}

/* ---------- GRID LAYOUTS ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 992px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---------- ICON ---------- */
.icon-circle {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px; flex-shrink: 0;
}
.icon-circle svg { width: 24px; height: 24px; stroke: var(--white); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- GALLERY ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.gallery-grid img {
  width: 100%; height: 220px; object-fit: cover;
  border-radius: var(--radius-md); border: 1px solid var(--border);
  transition: var(--transition);
}
.gallery-grid img:hover { transform: scale(1.03); box-shadow: var(--shadow-md); }

/* ---------- FORM ---------- */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; margin-bottom: 6px; font-size: 0.88rem;
  font-weight: 600; color: var(--text-secondary);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 0.95rem;
  background: var(--white); color: var(--text-primary);
  transition: var(--transition);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(197,160,78,0.15);
}
.form-group textarea { resize: vertical; min-height: 120px; }

.form-disclaimer {
  font-size: 0.8rem; color: var(--text-muted); margin-top: 16px;
  padding: 12px 16px; background: var(--cream); border-radius: var(--radius-sm);
  border-left: 3px solid var(--gold);
  line-height: 1.6;
}

/* ---------- FAQ ---------- */
.faq-item {
  background: var(--white); border-radius: var(--radius-md);
  border: 1px solid var(--border); margin-bottom: 12px;
  overflow: hidden;
}
.faq-question {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; cursor: pointer; font-weight: 600;
  font-size: 1rem; color: var(--coffee-dark); background: none; border: none;
  width: 100%; text-align: left; font-family: var(--font-body);
  transition: var(--transition);
}
.faq-question:hover { background: var(--cream); }
.faq-question .arrow {
  width: 20px; height: 20px; transition: var(--transition); flex-shrink: 0; margin-left: 12px;
}
.faq-item.open .faq-question .arrow { transform: rotate(180deg); }
.faq-answer {
  max-height: 0; overflow: hidden; transition: max-height 0.4s ease;
}
.faq-answer-inner {
  padding: 0 24px 20px; color: var(--text-secondary); line-height: 1.8;
}

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--coffee-dark); color: rgba(250,247,242,0.7);
  padding: 64px 0 0;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
  padding-bottom: 48px; border-bottom: 1px solid rgba(250,247,242,0.1);
}
.footer-brand .logo { color: var(--ivory); margin-bottom: 16px; font-size: 1.4rem; }
.footer-brand p { font-size: 0.9rem; line-height: 1.7; max-width: 300px; }
.footer-col h4 {
  font-family: var(--font-body); font-size: 0.82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px; color: var(--gold-light);
  margin-bottom: 20px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: rgba(250,247,242,0.7); font-size: 0.9rem; }
.footer-col a:hover { color: var(--gold-light); }
.footer-contact-item { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; font-size: 0.9rem; }
.footer-contact-item svg { width: 16px; height: 16px; stroke: var(--gold-light); flex-shrink: 0; margin-top: 4px; fill: none; stroke-width: 2; }
.footer-bottom {
  padding: 24px 0; text-align: center; font-size: 0.82rem;
  color: rgba(250,247,242,0.45);
}
.footer-bottom a { color: rgba(250,247,242,0.6); }
.footer-bottom a:hover { color: var(--gold-light); }

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- PAGE HERO (inner pages) ---------- */
.page-hero {
  padding: calc(var(--header-height) + 48px) 0 48px;
  background: linear-gradient(135deg, var(--cream) 0%, var(--ivory-dark) 100%);
  text-align: center;
}
.page-hero h1 { margin-bottom: 12px; }
.page-hero p { color: var(--text-muted); font-size: 1.05rem; }
.breadcrumb { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--gold-muted); }

/* ---------- COOKIE MODAL ---------- */
.cookie-modal {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
  background: var(--white); border-top: 1px solid var(--border);
  box-shadow: 0 -4px 24px rgba(62,39,35,0.1);
  padding: 20px 24px;
  display: none;
  animation: slideUp 0.4s ease;
}
.cookie-modal.show { display: block; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.cookie-inner {
  max-width: var(--max-width); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.cookie-inner p { font-size: 0.88rem; color: var(--text-secondary); flex: 1; min-width: 280px; margin: 0; }
.cookie-inner a { color: var(--gold); text-decoration: underline; }
.cookie-buttons { display: flex; gap: 12px; }
.cookie-buttons .btn { padding: 10px 24px; font-size: 0.82rem; }

/* ---------- PRODUCT DISCLAIMER BAR ---------- */
.disclaimer-bar {
  background: var(--cream); padding: 10px 24px; text-align: center;
  font-size: 0.78rem; color: var(--text-muted); border-top: 1px solid var(--border);
}

/* ---------- ANIMATIONS ---------- */
.fade-in {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ---------- UTILITIES ---------- */
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.mb-0 { margin-bottom: 0; }
.mt-40 { margin-top: 40px; }
.mt-24 { margin-top: 24px; }
.max-w-700 { max-width: 700px; margin-left: auto; margin-right: auto; }
