/* ============================================================
   Celestial Ceremonies — styles.css
   Palette: midnight navy, ivory cream, liturgical gold
   ============================================================ */

:root {
  --ink:          #1a2540;       /* primary navy ink */
  --ink-soft:     #3a4663;       /* secondary text */
  --ink-muted:    #6b7591;       /* tertiary text */
  --bg:           #faf6ee;       /* ivory page background */
  --surface:      #ffffff;       /* card surface */
  --surface-alt:  #f3ecdc;       /* alternate band */
  --line:         #e6dec9;       /* dividers */
  --gold:         #b8924c;       /* liturgical gold */
  --gold-soft:    #d9b977;
  --burgundy:     #7a2e2e;
  --shadow-sm:    0 1px 2px rgba(26, 37, 64, 0.04);
  --shadow-md:    0 8px 30px rgba(26, 37, 64, 0.08);
  --radius:       4px;
  --radius-lg:    8px;

  --serif:        'Cormorant Garamond', 'Garamond', 'Times New Roman', serif;
  --sans:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  --container:    1180px;
  --container-narrow: 760px;
}

/* ----- reset ----- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--ink); text-decoration: none; transition: color 160ms ease; }
a:hover { color: var(--gold); }
em { font-style: italic; color: var(--ink); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ----- layout ----- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.container.narrow {
  max-width: var(--container-narrow);
}
.centered { text-align: center; }
.centered-block { text-align: center; }

/* ----- typography ----- */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.6em;
  letter-spacing: 0.01em;
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 500; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.45rem; }
p  { margin: 0 0 1em; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
}
.lede {
  font-size: 1.18rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 38ch;
}
.section-title {
  position: relative;
}
.section-title.centered::after {
  content: '';
  display: block;
  width: 48px;
  height: 1px;
  background: var(--gold);
  margin: 0.8rem auto 0;
  opacity: 0.7;
}
.section-sub {
  color: var(--ink-muted);
  max-width: 56ch;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 3rem;
}

/* ----- header (Byzantine red) ----- */
:root {
  --header-bg-top:    #2a090f;   /* deep wine-blood, near-black */
  --header-bg-bot:    #7a1424;   /* rich Byzantine / imperial red */
  --header-text:      #f7efd9;   /* warm cream */
  --header-text-soft: #e3cfb4;   /* dim gold-cream */
  --header-gold:      #f3d98c;   /* highlight gold */
  --header-rule:      rgba(184, 146, 76, 0.4);
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, var(--header-bg-top) 0%, var(--header-bg-bot) 100%);
  border-bottom: 1px solid var(--header-rule);
  box-shadow: 0 1px 0 rgba(243, 217, 140, 0.08) inset;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--header-text);
  flex: 0 0 auto;
}
.brand-mark {
  width: 56px;
  height: 56px;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-name {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--header-text);
}
.brand-sub {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--header-gold);
  opacity: 0.85;
}
.primary-nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
}
.primary-nav a {
  font-size: 0.92rem;
  color: var(--header-text-soft);
  font-weight: 500;
}
.primary-nav a:hover { color: var(--header-gold); }

.lang-switcher select {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(217, 185, 119, 0.35);
  border-radius: var(--radius);
  padding: 8px 32px 8px 12px;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--header-text);
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%23f7efd9' stroke-width='1.4' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.lang-switcher select:hover {
  border-color: var(--header-gold);
}
.lang-switcher select:focus {
  outline: 2px solid var(--header-gold);
  outline-offset: 2px;
}
.lang-switcher select option {
  /* dropdown options render in OS-native style; force readable colours */
  background: var(--header-bg-bot);
  color: var(--header-text);
}

/* ----- hero ----- */
.hero {
  padding: 80px 0 60px;
  background:
    radial-gradient(circle at 80% 20%, rgba(184, 146, 76, 0.08), transparent 50%),
    radial-gradient(circle at 10% 80%, rgba(26, 37, 64, 0.04), transparent 50%);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
}
.hero-art {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-art img {
  width: 100%;
  max-width: 380px;
  color: var(--ink);
  opacity: 0.92;
  filter: drop-shadow(0 8px 30px rgba(26, 37, 64, 0.12));
}
.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* ----- buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 180ms ease;
  text-align: center;
}
.btn-primary {
  background: var(--header-bg-bot);   /* Byzantine red */
  color: #faf6ee;
  border-color: var(--header-bg-bot);
}
.btn-primary:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--header-bg-top);        /* deep wine — sits on gold beautifully */
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: rgba(26, 37, 64, 0.03);
}

/* ----- sections ----- */
.section {
  padding: 90px 0;
}
.section-alt {
  background: var(--surface-alt);
}

/* ----- product cards ----- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 1rem;
}
.product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px 32px 36px;
  text-align: center;
  transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold-soft);
}
.product-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.4rem;
  color: var(--gold);
}
.product-card h3 {
  margin-bottom: 0.6rem;
}
.product-card p {
  color: var(--ink-soft);
  margin-bottom: 1.6rem;
}
.card-link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
  border-bottom: 1px solid var(--gold);
  padding-bottom: 2px;
}
.card-link:hover {
  color: var(--gold);
}

/* ----- gallery ----- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 1rem;
}
.gallery-item {
  margin: 0;
}
.gallery-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 240ms ease, box-shadow 240ms ease;
}
.gallery-frame:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.gallery-frame > svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Photo layer sits above the SVG fallback. Hidden until it actually loads, so missing files reveal the SVG instead of a broken-image icon. */
.gallery-frame > .gallery-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 280ms ease;
  pointer-events: none;
}
.gallery-frame > .gallery-photo.loaded {
  opacity: 1;
  pointer-events: auto;
}
.gallery-item figcaption {
  margin-top: 0.9rem;
  font-size: 0.92rem;
  color: var(--ink-muted);
  text-align: center;
  font-style: italic;
}
.gallery-note {
  text-align: center;
  margin-top: 2.4rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
  letter-spacing: 0.05em;
  opacity: 0.75;
}

/* ----- order steps ----- */
.steps {
  list-style: none;
  padding: 0;
  margin: 3rem 0 2.5rem;
  display: grid;
  gap: 28px;
}
.steps li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 22px;
  align-items: flex-start;
}
.step-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--gold);
  font-weight: 500;
  margin-top: 2px;
}
.steps h3 {
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}
.steps p { margin: 0; color: var(--ink-soft); }

.order-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1rem;
}

/* ----- contact ----- */
.contact-email {
  margin: 1.8rem 0 0.4rem;
  font-family: var(--serif);
  font-size: 1.6rem;
}
.contact-email a {
  color: var(--ink);
  border-bottom: 1px solid var(--gold);
  padding-bottom: 3px;
}
.contact-email a:hover { color: var(--gold); }
.contact-meta {
  color: var(--ink-muted);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

/* ----- footer (matches header blue) ----- */
.site-footer {
  background: linear-gradient(180deg, var(--header-bg-bot) 0%, var(--header-bg-top) 100%);
  color: #d9d4c4;
  padding: 40px 0;
  margin-top: 0;
  border-top: 1px solid var(--header-rule);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--header-text);
}
.footer-mark {
  width: 40px;
  height: 40px;
}
.footer-tag {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: #8d8978;
}

/* ============================================================
   RTL support (Arabic)
   ============================================================ */
html[dir="rtl"] .primary-nav { margin-right: auto; margin-left: 0; }
html[dir="rtl"] .lede { margin-left: auto; margin-right: 0; }
html[dir="rtl"] .hero-inner { grid-template-columns: 0.8fr 1.2fr; }
html[dir="rtl"] .steps li { grid-template-columns: 1fr 56px; direction: rtl; }
html[dir="rtl"] .card-link::after { content: ''; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 880px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 14px;
  }
  .primary-nav {
    order: 3;
    margin: 0;
    width: 100%;
    justify-content: center;
    gap: 18px;
    padding-top: 6px;
    border-top: 1px solid var(--header-rule);
  }
  .lang-switcher { margin-left: auto; }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }
  .hero-text .lede { margin-left: auto; margin-right: auto; }
  .hero-art img { max-width: 240px; }
  .hero-cta { justify-content: center; }
  .section { padding: 64px 0; }
  .hero { padding: 50px 0 30px; }
}

@media (max-width: 480px) {
  .brand-sub { display: none; }
  .primary-nav a { font-size: 0.85rem; }
  body { font-size: 16px; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
