/**
 * Mahajan Gift Center — shared styles for the site pages
 * (categories.html, about.html, contact.html).
 * Mobile-first: the base rules target phones, wider screens are layered on top.
 */

:root{
  --bg: #3B1220;
  --bg-deep: #23070E;
  --panel: #451627;
  --ivory: #F3EBDD;
  --ivory-dim: #D8C9B6;
  --gold: #C79A46;
  --gold-soft: #E7CE93;
  --emerald-soft: #3C6D5B;
  --error: #E08A7D;
}

*{ box-sizing: border-box; margin: 0; padding: 0; }
html{ scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body{
  background: var(--bg);
  background-image: radial-gradient(ellipse 100% 40% at 50% 0%, #55192B 0%, var(--bg) 55%);
  color: var(--ivory);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before{
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.045;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

a{ color: inherit; text-decoration: none; }
button{ font: inherit; }
img{ max-width: 100%; }

.shell{
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.15rem;
  position: relative;
  z-index: 1;
}

/* ---------- Header ---------- */
header{
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(35, 7, 14, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(231,206,147,0.15);
}

.nav-inner{
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.75rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand{ display: flex; align-items: center; gap: 0.6rem; }
.logo-mark{ width: 36px; height: 36px; flex-shrink: 0; }

.logo-text{
  display: none; /* phones show the MGC mark alone; the name returns on wider screens */
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  color: var(--gold-soft);
  line-height: 1.1;
}
.logo-text small{
  display: block;
  font-family: 'Space Mono', monospace;
  font-weight: 400;
  font-size: 0.56rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ivory-dim);
  margin-top: 0.15rem;
}

nav.links{ display: none; }

.menu-toggle{
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(231,206,147,0.35);
  border-radius: 6px;
  width: 42px;
  height: 38px;
  padding: 0; /* a page's own button rules must not squeeze the icon */
  color: var(--gold-soft);
  cursor: pointer;
  flex-shrink: 0;
}
.menu-toggle svg{ width: 20px; height: 20px; }

.mobile-panel{
  display: none;
  flex-direction: column;
  background: var(--bg-deep);
  border-bottom: 1px solid rgba(231,206,147,0.15);
  padding: 0.4rem 1.15rem 1.1rem;
}
.mobile-panel a{
  padding: 0.85rem 0;
  font-size: 0.95rem;
  color: var(--ivory-dim);
  border-bottom: 1px solid rgba(231,206,147,0.1);
}
.mobile-panel a:last-child{ border-bottom: none; }
.mobile-panel a.active{ color: var(--gold-soft); }
.mobile-panel.open{ display: flex; }

/* ---------- Page hero ---------- */
.page-hero{ padding-top: 2.2rem; padding-bottom: 1.2rem; }

.eyebrow{
  font-family: 'Space Mono', monospace;
  font-size: 0.64rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-soft);
  opacity: 0.9;
  margin-bottom: 0.8rem;
}

.page-hero h1{
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: clamp(1.85rem, 8vw, 3rem);
  line-height: 1.1;
  max-width: 20ch;
}

.page-hero p{
  margin-top: 0.9rem;
  color: var(--ivory-dim);
  max-width: 52ch;
  font-size: 0.98rem;
  line-height: 1.65;
}

section{ position: relative; z-index: 1; }

/* ---------- Buttons ---------- */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.8rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(231,206,147,0.35);
  color: var(--ivory-dim);
  background: transparent;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
  min-height: 44px;
}
.btn:hover{ border-color: var(--gold-soft); color: var(--gold-soft); }
.btn svg{ width: 15px; height: 15px; }

.btn-primary{
  background: var(--gold-soft);
  border-color: var(--gold-soft);
  color: var(--bg-deep);
  font-weight: 700;
}
.btn-primary:hover{ background: #f0dcaa; color: var(--bg-deep); }

/* ---------- Forms ---------- */
.field{ margin-bottom: 1rem; }
.field label{
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ivory-dim);
  margin-bottom: 0.4rem;
}
.field input,
.field textarea{
  width: 100%;
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(231,206,147,0.3);
  border-radius: 6px;
  padding: 0.8rem 0.85rem;
  color: var(--ivory);
  font-size: 1rem; /* 16px keeps iOS from zooming on focus */
  font-family: 'Inter', sans-serif;
}
.field textarea{ min-height: 120px; resize: vertical; }
.field input:focus,
.field textarea:focus{ outline: 2px solid var(--gold-soft); border-color: var(--gold-soft); }
.field input::placeholder,
.field textarea::placeholder{ color: rgba(243,235,221,0.35); }
.field-hint{
  margin-top: 0.35rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  color: var(--ivory-dim);
  opacity: 0.75;
}

.form-msg{
  margin-top: 0.9rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--gold-soft);
  min-height: 1.1em;
}
.form-msg.error{ color: var(--error); }

/* ---------- Panels ---------- */
.panel{
  background: var(--panel);
  border: 1px solid rgba(231,206,147,0.15);
  border-radius: 12px;
  padding: 1.25rem;
}

/* ---------- Footer ---------- */
.site-footer{
  margin-top: 3.5rem;
  border-top: 1px solid rgba(231,206,147,0.15);
  padding: 2rem 0 2.4rem;
  position: relative;
  z-index: 1;
}

.footer-grid{
  display: grid;
  gap: 1.6rem;
}

.footer-col h3{
  font-family: 'Space Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 0.75rem;
}

.footer-col a,
.footer-col p{
  display: block;
  color: var(--ivory-dim);
  font-size: 0.9rem;
  line-height: 1.7;
}
.footer-col a:hover{ color: var(--gold-soft); }

.socials{
  display: flex;
  gap: 0.6rem;
  margin-top: 0.2rem;
}
.socials a{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(231,206,147,0.3);
  border-radius: 50%;
  color: var(--gold-soft);
}
.socials a:hover{ border-color: var(--gold-soft); background: rgba(231,206,147,0.1); }
.socials svg{ width: 19px; height: 19px; }

.footer-note{
  margin-top: 1.8rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(231,206,147,0.1);
  font-family: 'Space Mono', monospace;
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  color: rgba(216,201,182,0.55);
  text-align: center;
}

@media (prefers-reduced-motion: reduce){
  *{ transition: none !important; scroll-behavior: auto !important; }
}

@media (min-width: 721px){
  .shell, .nav-inner{ padding-left: 1.5rem; padding-right: 1.5rem; }
  nav.links{
    display: flex;
    gap: 2rem;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
  }
  nav.links a{
    color: var(--ivory-dim);
    padding: 0.3rem 0;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease;
  }
  nav.links a:hover, nav.links a.active{
    color: var(--gold-soft);
    border-color: var(--gold-soft);
  }
  .logo-mark { width: 60px !important;height: 60px !important;}
  .logo-text{ display: none; }
  .menu-toggle{ display: none; }
  .mobile-panel{ display: none !important; }
  .page-hero{ padding-top: 3rem; padding-bottom: 1.6rem; }
  .panel{ padding: 1.8rem; }
  .footer-grid{ grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 2rem; }
  .footer-note{ text-align: left; }
}
