/* ================================================
   Mediakit Website — Global Styles
   Palette: dark navy bg, blue accent, white text
   ================================================ */

/* ── SELF-HOSTED FONTS ───────────────────────── */

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-v21-latin-regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-v21-latin-italic.woff2') format('woff2');
}

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

:root {
  --navy:    #1a2535;
  --navy-mid:#243044;
  --accent:  #4db8d4;
  --accent-h:#3aa0bc;
  --white:   #ffffff;
  --light:   #e8edf4;
  --muted:   #8fa3b8;
  --card-bg: rgba(255,255,255,0.05);
  --card-border: rgba(255,255,255,0.1);
  --radius:  10px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--navy);
  color: var(--white);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

/* ── NAV ─────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 2.5rem;
  background: rgba(20, 30, 48, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(77,184,212,0.15);
}

.nav-brand h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-brand p {
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--light);
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--accent); }

.btn-nav {
  padding: 0.45rem 1.1rem;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  color: var(--white) !important;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}

.btn-nav:hover {
  background: var(--accent);
  color: var(--navy) !important;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ── HERO ────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding-bottom: 8vh;
  background:
    linear-gradient(to bottom right, rgba(20,30,48,0.82), rgba(20,30,48,0.55)),
    url('../images/dunstanburgh.webp') center 35%/cover no-repeat;
}

.hero-content {
  padding: 0 3rem;
  max-width: 650px;
}

.hero-content h2 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 0.6rem;
}

.hero-divider {
  width: 60px;
  height: 3px;
  background: var(--accent);
  border: none;
  margin: 0.9rem 0 1.2rem;
}

.hero-content p {
  font-size: 1.05rem;
  color: var(--light);
  margin-bottom: 2rem;
}

.hero-ctas {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9rem;
}

.btn-primary {
  display: inline-block;
  padding: 0.7rem 1.8rem;
  background: var(--accent);
  color: var(--navy);
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  transition: background 0.2s, transform 0.15s;
}

.btn-primary:hover {
  background: var(--accent-h);
  transform: translateY(-2px);
}

.btn-outline {
  display: inline-block;
  padding: 0.65rem 1.6rem;
  border: 2px solid rgba(255,255,255,0.55);
  border-radius: var(--radius);
  color: var(--white);
  font-size: 0.9rem;
  backdrop-filter: blur(4px);
  background: rgba(255,255,255,0.07);
  transition: border-color 0.2s, background 0.2s;
}

.btn-outline:hover {
  border-color: var(--accent);
  background: rgba(77,184,212,0.12);
}

/* ── SECTIONS ────────────────────────────────── */

section { padding: 5rem 2.5rem; }

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--white);
}

.section-sub {
  color: var(--muted);
  max-width: 560px;
  font-size: 1rem;
  margin-bottom: 3rem;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

/* ── MEDITATIONS GRID ────────────────────────── */

.meditations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.meditation-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.25s, transform 0.2s;
}

.meditation-card:hover {
  border-color: rgba(77,184,212,0.4);
  transform: translateY(-3px);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.card-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(77,184,212,0.15);
  color: var(--accent);
  border-radius: 4px;
  padding: 2px 8px;
}

.card-duration {
  font-size: 0.78rem;
  color: var(--muted);
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--white);
}

.card-desc {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.2rem;
  line-height: 1.5;
}

/* ── CUSTOM AUDIO PLAYER ─────────────────────── */

.player {
  background: rgba(0,0,0,0.25);
  border-radius: 8px;
  padding: 0.9rem 1rem;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.btn-play {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: var(--navy);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.15s;
}

.btn-play:hover {
  background: var(--accent-h);
  transform: scale(1.08);
}

.btn-play svg { width: 16px; height: 16px; fill: var(--navy); }

.player-time {
  font-size: 0.75rem;
  color: var(--muted);
  min-width: 80px;
  text-align: right;
}

.progress-wrap {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  width: 0%;
  transition: width 0.1s linear;
  pointer-events: none;
}

.volume-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.vol-icon {
  color: var(--muted);
  flex-shrink: 0;
}

.vol-icon svg { width: 14px; height: 14px; fill: var(--muted); }

input[type="range"].vol-slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

input[type="range"].vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}

/* ── ABOUT / INFO STRIP ──────────────────────── */

.about-strip {
  background: var(--navy-mid);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 110px;
  grid-template-rows: auto auto;
  gap: 1rem 2rem;
  align-items: start;
}

.about-book {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.6rem;
  grid-row: 1 / 2;
  grid-column: 2 / 3;
  margin-top: 3.2rem;
}

.about-text { grid-column: 1 / 2; }

.about-text p {
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.75;
}

.about-stats {
  display: flex;
  gap: 2.5rem;
  flex-shrink: 0;
  grid-column: 1 / 2;
  grid-row: 2 / 3;
  grid-column: 1 / 2;
}

.book-cover-img {
  width: 110px;
  border-radius: 4px;
  box-shadow: 3px 6px 20px rgba(0,0,0,0.5);
  display: block;
}

.book-cover-label {
  display: none;
}

.stat { text-align: center; }

.stat-num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* ── CONTACT ─────────────────────────────────── */

.contact-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 2.5rem;
  max-width: 560px;
}

.form-group { margin-bottom: 1.1rem; }

.form-group label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  color: var(--white);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}

.form-group textarea { resize: vertical; min-height: 120px; }

/* ── FOOTER ──────────────────────────────────── */

footer {
  background: rgba(0,0,0,0.3);
  border-top: 1px solid var(--card-border);
  text-align: center;
  padding: 2rem;
  font-size: 0.82rem;
  color: var(--muted);
}

footer a { color: var(--accent); }

/* ── TWO-COLUMN HOMEPAGE GRID ────────────────── */

.meditations-grid--two {
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}

/* ── EXTRA TAG COLOURS ───────────────────────── */

.card-tag--sea {
  background: rgba(77,184,212,0.08);
  color: #7ecfe3;
}

.card-tag--theme {
  background: rgba(150,130,200,0.12);
  color: #b8a9d9;
}

/* ── FILTER TABS ─────────────────────────────── */

.filter-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.filter-btn {
  padding: 0.4rem 1rem;
  border-radius: 20px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--muted);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(77,184,212,0.1);
}

/* ── RESPONSIVE ──────────────────────────────── */

@media (max-width: 1024px) {
  .nav-links { gap: 1.2rem; }
  .btn-nav { padding: 0.4rem 0.9rem; font-size: 0.82rem; }
}

@media (max-width: 768px) {
  .nav { padding: 0.9rem 1.25rem; }

  .nav-links {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--navy);
    flex-direction: column;
    justify-content: center;
    gap: 2.5rem;
    font-size: 1.2rem;
    z-index: 999;
  }

  .nav-links.open { display: flex; }

  .nav-toggle { display: flex; z-index: 1001; }

  .hero-content { padding: 0 1.5rem; }

  .about-inner { flex-direction: column; gap: 2rem; }

  .about-stats { justify-content: center; }

  section { padding: 3.5rem 1.25rem; }
}

@media (max-width: 480px) {
  .meditations-grid { grid-template-columns: 1fr; }
  .hero-content h2 { font-size: 2rem; }
}

/* ── Poem & photo companions ── */
.poem-companion {
  margin-top: 1.5rem;
  padding: 1.5rem 1.75rem;
  border-left: 2px solid rgba(74, 154, 181, 0.35);
  max-width: 520px;
}

.poem-companion-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.85rem;
  opacity: 0.7;
}

.poem-companion-label a {
  color: var(--accent);
  text-decoration: none;
  opacity: 0.85;
}

.poem-companion-label a:hover {
  opacity: 1;
}

.poem-companion-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 1rem;
  line-height: 1.85;
  color: var(--muted);
  white-space: pre-line;
}

.poem-companion-title {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-top: 1rem;
  opacity: 0.6;
}

.photo-companion {
  margin-top: 1.5rem;
  padding: 1.5rem 1.75rem;
  border-left: 2px solid rgba(74, 154, 181, 0.35);
  max-width: 520px;
}

.photo-companion-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.85rem;
  opacity: 0.7;
}

.photo-companion-img {
  width: 100%;
  border-radius: var(--radius);
  display: block;
  opacity: 0.88;
}

/* ── Break & closing images ── */

.meditations-break-image {
  grid-column: 1 / -1;
  width: 100%;
  height: 320px;
  overflow: hidden;
  border-radius: var(--radius);
  margin: 1rem 0;
}

.meditations-break-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
  display: block;
}

.meditations-closing-image {
  grid-column: 1 / -1;
  width: 100%;
  height: 320px;
  overflow: hidden;
  border-radius: var(--radius);
  margin: 2rem 0 0;
}

.meditations-closing-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

@media (max-width: 768px) {
  .meditations-break-image { height: 200px; }
  .meditations-closing-image { height: 220px; }
}

/* ── LISTEN NOW DROPDOWN & WELCOME BACK ────────────── */

.hero-ctas {
  position: relative;
}

.listen-cta {
  position: relative;
  z-index: 10;
  overflow: visible;
  white-space: nowrap;
}

.choose-different {
  display: inline-block;
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: underline;
  margin-top: 0.5rem;
  transition: color 0.2s;
}

.choose-different:hover {
  color: var(--accent);
}

.listen-dropdown {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 0.5rem;
  background: rgba(26, 37, 53, 0.98);
  border: 1px solid rgba(77, 184, 212, 0.3);
  border-radius: var(--radius);
  min-width: 280px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  z-index: 20;
  backdrop-filter: blur(10px);
}

.listen-dropdown.hidden {
  display: none;
}

.dropdown-item {
  display: block;
  padding: 0.95rem 1.2rem;
  color: var(--light);
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s, color 0.2s;
}

.dropdown-item:last-child {
  border-bottom: none;
}

/* ── SHARE BUTTONS ────────────────────────────────── */

.share-container {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.share-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  border: none;
  background: rgba(77, 184, 212, 0.15);
  color: var(--accent);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.share-toggle:hover {
  background: rgba(77, 184, 212, 0.25);
}

.share-toggle svg {
  width: 1.1rem;
  height: 1.1rem;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.share-menu {
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: 0.5rem;
  background: rgba(26, 37, 53, 0.98);
  border: 1px solid rgba(77, 184, 212, 0.3);
  border-radius: var(--radius);
  padding: 0.5rem;
  display: flex;
  gap: 0.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  z-index: 30;
}

@media (max-width: 600px) {
  .share-menu {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    top: auto;
    right: auto;
    margin: 0;
  }
}

.share-menu.hidden {
  display: none;
}

.share-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 4px;
  color: var(--accent);
  background: rgba(77, 184, 212, 0.1);
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}

.share-item:hover {
  background: rgba(77, 184, 212, 0.25);
  color: var(--accent-h);
}

.share-item svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.share-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(26, 37, 53, 0.98);
  border: 1px solid rgba(77, 184, 212, 0.4);
  color: var(--accent);
  padding: 0.5rem 1.2rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.share-toast.visible {
  opacity: 1;
}

/* ── TRANSCRIPTS ─────────────────────────────── */

.transcript-panel {
  margin-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 1rem;
}

.transcript-toggle {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  list-style: none;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
  user-select: none;
}

.transcript-toggle::-webkit-details-marker { display: none; }

.transcript-toggle:hover { color: var(--accent); }

.transcript-toggle svg {
  width: 0.95rem;
  height: 0.95rem;
  stroke: currentColor;
  fill: none;
  flex-shrink: 0;
  transition: transform 0.25s;
}

details[open] .transcript-toggle { color: var(--accent); }
details[open] .transcript-toggle .transcript-chevron { transform: rotate(180deg); }

.transcript-body {
  margin-top: 1rem;
  padding: 1.2rem 1.4rem;
  background: rgba(0, 0, 0, 0.18);
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.transcript-body p {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1rem;
  line-height: 1.85;
  color: rgba(232, 228, 217, 0.7);
  margin: 0 0 0.9rem;
}

.transcript-body p:last-child { margin-bottom: 0; }

.dropdown-item:hover {
  background: rgba(77, 184, 212, 0.15);
  color: var(--accent);
}

.dropdown-item:active {
  background: rgba(77, 184, 212, 0.25);
}

#listen-btn-text {
  white-space: nowrap;
  overflow: visible;
}

@media (min-width: 640px) {
  .welcome-back-buttons {
    flex-direction: row;
    gap: 1rem;
    align-items: center;
  }

  .welcome-back-buttons button {
    flex: 1;
  }
}

.hidden {
  display: none !important;
}

/* ── DOWNLOAD CARD ────────────────────────────────── */

.download-card-section {
  padding: 4rem 0;
  background: linear-gradient(180deg, transparent 0%, rgba(42, 54, 70, 0.3) 100%);
}

.download-card {
  max-width: 540px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  border: 1px solid rgba(77, 184, 212, 0.2);
  border-radius: var(--radius);
  background: rgba(26, 37, 53, 0.4);
  text-align: center;
}

.download-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--light);
  margin-bottom: 1.2rem;
  letter-spacing: 0.01em;
}

.download-card p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 0.9rem;
}

.download-card p:last-of-type {
  margin-bottom: 1.6rem;
}

.download-btn {
  display: inline-block;
}

@media (max-width: 768px) {
  .about-inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  .about-book {
    grid-row: 2 / 3;
    grid-column: 1 / 2;
    margin-top: 0.5rem;
  }
  .about-stats {
    grid-column: 1 / 2;
    grid-row: 3 / 4;
    margin-top: 1rem;
  }
}
