/* ============================================================
   KUNDALINI BLESSINGS — Meditations for the Aquarian Age
   Brand foundation stylesheet
   ============================================================ */

/* Trinigan is the real licensed display font, served from /fonts/.
   Palatino is web-safe and built into all macOS/iOS/Windows machines. */
@font-face {
  font-family: 'Trinigan';
  src: url('../fonts/Trinigan.woff2') format('woff2'),
       url('../fonts/Trinigan.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand palette — Kundalini Blessings (lavender base) */
  --cream:        #dfd4e6;   /* lavender base */
  --dusty-rose:   #D5B59B;   /* dusty rose */
  --mustard:      #C29D4E;   /* mustard gold */
  --brown:        #754633;   /* rich brown */
  --coral:        #E4927A;   /* coral accent */
  --cream-deep:   #F3EED2;   /* warm cream highlight */
  --ink:          #3a2820;   /* near-black warm */
  --ink-soft:     #5a4234;   /* soft warm brown-grey */

  /* Kundalini Blessings official brand fonts.
     Trinigan is loaded above via @font-face. Palatino is web-safe. */
  --font-display: 'Trinigan', Georgia, serif;
  --font-body:    'Palatino', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;

  /* Spacing & radius */
  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --shadow-soft: 0 8px 32px rgba(117, 70, 51, 0.10);
  --shadow-card: 0 12px 40px rgba(117, 70, 51, 0.16);
  --max-w: 1200px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
a { color: var(--brown); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--coral); }

/* ---------- Base ---------- */
body {
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  background-image:
    radial-gradient(ellipse at top, rgba(117, 70, 51, 0.08), transparent 60%),
    radial-gradient(ellipse at bottom right, rgba(194, 157, 78, 0.06), transparent 60%);
  background-attachment: fixed;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--brown);
  letter-spacing: 0.02em;
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.7rem); }
h4 { font-size: 1.15rem; }

p { margin: 0 0 1em; }

.eyebrow {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mustard);
  margin-bottom: 0.75em;
}

.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2.5rem auto;
  max-width: 320px;
  color: var(--dusty-rose);
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: currentColor;
}
.divider span {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  color: var(--ink-soft);
}

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

section { padding: 80px 0; }
section.tight { padding: 48px 0; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(223, 212, 230, 0.85);
  border-bottom: 1px solid rgba(117, 70, 51, 0.1);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}
.brand-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--brown);
  letter-spacing: 0.04em;
}
.brand-mark small {
  display: block;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mustard);
  font-weight: 400;
}
.nav { display: flex; gap: 28px; align-items: center; }
.nav a {
  font-family: var(--font-body);
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.nav a.active, .nav a:hover { color: var(--brown); }
.nav-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 1rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 14px 32px;
  border-radius: 999px;
  border: 1px solid var(--brown);
  background: var(--brown);
  color: var(--cream);
  transition: all 0.25s ease;
  cursor: pointer;
}
.btn:hover { background: var(--coral); border-color: var(--coral); color: white; transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--brown); }
.btn-outline:hover { background: var(--brown); color: var(--cream); }
.btn-coral { background: var(--coral); border-color: var(--coral); color: white; }
.btn-coral:hover { background: var(--brown); border-color: var(--brown); }

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 100px 24px 80px;
  position: relative;
}
.hero h1 { max-width: 14ch; margin: 0 auto 0.5em; }
.hero .lede {
  max-width: 56ch;
  margin: 0 auto 2em;
  font-size: 1.25rem;
  color: var(--ink-soft);
}
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- Card visuals ---------- */
.oracle-card {
  position: relative;
  width: 220px;
  aspect-ratio: 5 / 8;
  border-radius: var(--radius-md);
  background: var(--cream-deep);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
}
.oracle-card .front, .oracle-card .back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
}
.oracle-card .front {
  /* Real Kundalini Blessings card back artwork */
  background-image: url('../images/card-back.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
/* Hide any leftover ornament/deck-name elements (front is now a full-bleed image) */
.oracle-card .front .ornament,
.oracle-card .front .ornament-glyph,
.oracle-card .front .deck-name { display: none; }

.oracle-card .back {
  transform: rotateY(180deg);
  background: var(--cream);
  padding: 14px;
}
.oracle-card.flipped { transform: rotateY(180deg); }

/* Drawn card image fills the back */
.oracle-card .back img.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin: 0;
}
/* Hide the auto-generated name/number labels — the card art has them baked in */
.oracle-card .back h4,
.oracle-card .back .card-num { display: none; }

/* ---------- Reading layout ---------- */
.spread {
  display: flex;
  gap: 28px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 40px 0;
}
.spread-position {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.spread-position .position-label {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.95rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mustard);
}

.tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 24px 0 40px;
  border-bottom: 1px solid rgba(117, 70, 51, 0.15);
  padding-bottom: 16px;
}
.tab {
  font-family: var(--font-body);
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 22px;
  border-radius: 999px;
  color: var(--ink-soft);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}
.tab:hover { color: var(--brown); }
.tab.active {
  background: var(--brown);
  color: var(--cream);
  border-color: var(--brown);
}

.reading-output {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(117, 70, 51, 0.12);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-top: 32px;
  box-shadow: var(--shadow-soft);
}
.reading-output h3 { color: var(--brown); }
.reading-output .position-block {
  padding: 16px 0;
  border-bottom: 1px dashed rgba(117, 70, 51, 0.2);
}
.reading-output .position-block:last-child { border-bottom: none; }

.affirmation {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-style: normal;
  color: var(--brown);
  text-align: center;
  padding: 24px;
  background: linear-gradient(135deg, rgba(117, 70, 51, 0.15), rgba(194, 157, 78, 0.1));
  border-radius: var(--radius-md);
  border-left: 3px solid var(--coral);
  border-right: 3px solid var(--coral);
  margin: 24px 0;
}

/* ---------- Library grid ---------- */
.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 28px;
  margin-top: 32px;
}
.library-card {
  text-align: center;
  cursor: pointer;
  transition: transform 0.25s ease;
}
.library-card:hover { transform: translateY(-4px); }
.library-card .oracle-card { width: 100%; }
.library-card h4 {
  margin-top: 12px;
  font-size: 1rem;
}
.library-card .num {
  display: block;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--mustard);
}

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(58, 40, 32, 0.55);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--cream);
  border-radius: var(--radius-lg);
  max-width: 720px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  position: relative;
}
.modal .close {
  position: absolute;
  top: 16px; right: 20px;
  font-size: 1.6rem;
  color: var(--brown);
  cursor: pointer;
  background: none; border: none;
}

/* ---------- Cards / Tiles ---------- */
.tile {
  background: rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid rgba(117, 70, 51, 0.1);
  box-shadow: var(--shadow-soft);
}
.tile-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: 40px;
}

/* ---------- Forms ---------- */
input, textarea, select {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 16px;
  border: 1px solid rgba(117, 70, 51, 0.25);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
  width: 100%;
}
input:focus, textarea:focus { outline: 2px solid var(--coral); }
label {
  display: block;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.newsletter {
  display: flex;
  gap: 8px;
  max-width: 480px;
  margin: 24px auto 0;
}
.newsletter input { flex: 1; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--brown);
  color: var(--cream);
  padding: 60px 0 30px;
  margin-top: 80px;
}
.site-footer a { color: var(--cream); opacity: 0.85; }
.site-footer a:hover { color: var(--coral); opacity: 1; }
.footer-grid {
  display: grid;
  gap: 40px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 40px;
}
.footer-grid h4 {
  color: var(--cream);
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { padding: 4px 0; font-size: 0.95rem; }
.footer-bottom {
  border-top: 1px solid rgba(223, 212, 230, 0.2);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.7;
}

/* ---------- Decorative ---------- */
.lotus {
  display: block;
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  color: var(--coral);
  opacity: 0.85;
}

.center { text-align: center; }
.muted { color: var(--ink-soft); }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  body { font-size: 17px; }
  section { padding: 56px 0; }
  .hero { padding: 60px 24px 50px; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--cream);
    border-bottom: 1px solid rgba(117, 70, 51, 0.15);
    box-shadow: var(--shadow-soft);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 24px; border-bottom: 1px solid rgba(117, 70, 51, 0.08); }
  .nav-toggle {
    display: block;
    font-size: 1.6rem;
    color: var(--brown);
  }
  .oracle-card { width: 160px; }
  .modal { padding: 28px 22px; }
}

/* ============================================================
   PHOTO-DRIVEN COMPONENTS (rebecca-campbell-style)
   ============================================================ */

/* Photo hero — image on one side, text on the other.
   Image is contained (not cropped) but capped to a sensible size. */
.photo-hero {
  position: relative;
  background: var(--cream);
  padding: 40px 0;
  overflow: hidden;
}
.photo-hero .hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  gap: 48px;
  padding: 0 32px;
}
.photo-hero .hero-photo {
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-hero .hero-photo img {
  width: 100%;
  max-width: 520px;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}
.photo-hero .hero-inner {
  max-width: 520px;
  text-align: left;
}
.photo-hero .hero-inner h1 {
  color: var(--brown);
  margin-bottom: 0.4em;
}
.photo-hero .hero-inner .lede {
  color: var(--ink-soft);
  font-size: 1.2rem;
}
.photo-hero .hero-inner .eyebrow {
  color: var(--mustard);
}
.photo-hero .hero-inner .hero-cta {
  justify-content: flex-start;
}

/* Reverse — image on the right */
.photo-hero.reverse .hero-photo { order: 2; }
.photo-hero.reverse .hero-inner { order: 1; }

/* Placeholder visual for photos that haven't been uploaded yet */
.photo-placeholder {
  background: repeating-linear-gradient(
    45deg,
    rgba(117, 70, 51, 0.08),
    rgba(117, 70, 51, 0.08) 16px,
    rgba(223, 212, 230, 0.5) 16px,
    rgba(223, 212, 230, 0.5) 32px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-style: italic;
  color: var(--brown);
  border: 2px dashed rgba(117, 70, 51, 0.3);
  text-align: center;
  padding: 20px;
}

/* Alternating image+text "split" sections */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 60px;
  align-items: center;
  margin: 40px auto;
  max-width: var(--max-w);
  padding: 0 24px;
}
.split.reverse { direction: rtl; }
.split.reverse > * { direction: ltr; }
.split .split-image {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}
.split .split-image img {
  width: 100%;
  height: auto;
  display: block;
}
.split .split-text { padding: 20px 0; }
.split .split-text h2 { margin-top: 0; }

/* Editorial photo grid (community / lifestyle) */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 16px;
  margin: 40px 0;
}
.photo-grid .grid-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-soft);
}
.photo-grid .grid-item.tall { grid-row: span 2; }
.photo-grid .grid-item.wide { grid-column: span 2; }

/* Quote strip — soft cream panel, no background image bleeding into layout */
.quote-strip {
  background: linear-gradient(135deg, rgba(235,223,195,0.6), rgba(240,241,240,0.4));
  padding: 80px 24px;
  text-align: center;
  position: relative;
  border-top: 1px solid rgba(117, 70, 51, 0.08);
  border-bottom: 1px solid rgba(117, 70, 51, 0.08);
}
.quote-strip blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  color: var(--brown);
  max-width: 720px;
  margin: 0 auto;
  font-style: italic;
  line-height: 1.4;
}
.quote-strip cite {
  display: block;
  margin-top: 24px;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mustard);
}

/* Tablet & mobile */
@media (max-width: 900px) {
  .photo-hero { padding: 24px 0; }
  .photo-hero .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 0 24px;
  }
  .photo-hero .hero-photo img { max-width: 380px; }
  .photo-hero .hero-inner { max-width: 600px; margin: 0 auto; text-align: center; }
  .photo-hero .hero-inner .hero-cta { justify-content: center; }
  .photo-hero.reverse .hero-photo { order: 1; }
  .photo-hero.reverse .hero-inner { order: 2; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split.reverse { direction: ltr; }
  .split .split-image { max-width: 380px; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .photo-grid .grid-item.wide { grid-column: span 2; }
  .photo-grid .grid-item.tall { grid-row: auto; }
  .quote-strip { padding: 60px 24px; }
}
