/* thebrigidhearth.com — shared stylesheet */

@font-face {
  font-family: 'Cinzel';
  font-weight: 400;
  font-style: normal;
  src: url('/assets/fonts/cinzel-regular.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Cinzel';
  font-weight: 700;
  font-style: normal;
  src: url('/assets/fonts/cinzel-bold.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Crimson Text';
  font-weight: 400;
  font-style: normal;
  src: url('/assets/fonts/crimson-regular.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Crimson Text';
  font-weight: 400;
  font-style: italic;
  src: url('/assets/fonts/crimson-italic.woff2') format('woff2');
  font-display: swap;
}

:root {
  --green: #1C3A2A;
  --green-deep: #0d1c14;
  --cream: #F7F4EE;
  --gold: #D4B86A;
  --gold-soft: #E5CD92;
  --faint: rgba(247, 244, 238, 0.66);
  --max-width: 1100px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
section[id], article[id] { scroll-margin-top: 80px; }
body {
  background: var(--green);
  color: var(--cream);
  font-family: 'Crimson Text', Georgia, serif;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Cinzel', Georgia, serif;
  color: var(--gold);
  letter-spacing: 0.04em;
  line-height: 1.2;
}
h1 { font-size: clamp(2.5rem, 6vw, 4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }

p { margin-bottom: 1rem; }
a { color: var(--gold); text-decoration: none; border-bottom: 1px dotted var(--gold); }
a:hover { color: var(--cream); }

button {
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}
button:hover { background: var(--gold); color: var(--green); }
button:focus-visible { outline: 2px solid var(--cream); outline-offset: 2px; }

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

/* Sections */
section { padding: clamp(48px, 8vw, 96px) 0; }

/* Hero */
.hero {
  min-height: 45vh;
  padding: clamp(48px, 6vw, 80px) 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(212,184,106,0.18) 0%, transparent 55%),
    linear-gradient(180deg, var(--green) 0%, var(--green-deep) 100%);
  position: relative;
  overflow: hidden;
}
.hero-flame {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  width: clamp(280px, 50vw, 520px);
  height: clamp(280px, 50vw, 520px);
  fill: var(--gold);
  opacity: 0.12;
  filter: blur(2px) drop-shadow(0 0 60px rgba(212, 184, 106, 0.35));
  pointer-events: none;
  z-index: 1;
  animation: hero-flame-flicker 6s ease-in-out infinite;
}
.hero .container { position: relative; z-index: 2; }
@keyframes hero-flame-flicker {
  0%, 100% { opacity: 0.12; transform: translate(-50%, -55%) scale(1); }
  50% { opacity: 0.16; transform: translate(-50%, -55%) scale(1.03); }
}

.hero h1 { margin-bottom: 1rem; }
.hero .tagline {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-style: italic;
  color: var(--faint);
  margin-bottom: 2.5rem;
}
.hero .cta-row { display: flex; flex-direction: column; gap: 1rem; align-items: center; }
@media (min-width: 768px) {
  .hero .cta-row { flex-direction: row; justify-content: center; }
}

/* App Store badge */
.app-store-badge {
  display: inline-block;
  height: 56px;
  border: none;
}

.btn-primary {
  display: inline-block;
  background: var(--gold);
  color: var(--green);
  padding: 0.8rem 1.8rem;
  border-radius: 4px;
  font-weight: 700;
  border: none;
}
.btn-primary:hover { background: var(--gold-soft); color: var(--green); }

/* Pillars — compact text-led layout with theme icon */
.pillar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  max-width: 720px;
  margin: 0 auto;
}
.pillar-icon {
  width: 36px;
  height: 36px;
  fill: var(--gold);
  opacity: 0.9;
}

/* FAQ */
details {
  border-bottom: 1px solid rgba(247,244,238,0.1);
  padding: 1.25rem 0;
}
details summary {
  cursor: pointer;
  font-family: 'Cinzel', Georgia, serif;
  color: var(--gold);
  font-size: 1.1rem;
  list-style: none;
}
details summary::-webkit-details-marker { display: none; }
details[open] summary { margin-bottom: 0.75rem; }
details p { color: var(--cream); }

/* Footer */
footer {
  border-top: 1px solid rgba(247,244,238,0.1);
  padding: 2rem 0;
  text-align: center;
  color: var(--faint);
  font-size: 0.85rem;
}
footer .links { display: flex; gap: 32px; justify-content: center; margin-bottom: 1rem; flex-wrap: wrap; }

/* Top sticky nav */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 28, 20, 0.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(212, 184, 106, 0.12);
}
.top-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 24px;
}
.top-nav .wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Cinzel', Georgia, serif;
  color: var(--gold);
  letter-spacing: 0.18em;
  font-size: 0.85rem;
  text-transform: uppercase;
  border: none;
  white-space: nowrap;
}
.top-nav .wordmark svg { width: 22px; height: 22px; fill: currentColor; flex-shrink: 0; }
.top-nav .wordmark:hover { color: var(--cream); }

.top-nav .icons {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}
.top-nav .icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: none;
  color: var(--gold);
  transition: background 0.15s ease, color 0.15s ease;
}
.top-nav .icon-link:hover {
  background: rgba(212, 184, 106, 0.12);
  color: var(--cream);
}
.top-nav .icon-link[aria-current="page"] {
  background: rgba(212, 184, 106, 0.18);
  color: var(--cream);
}
.top-nav .icon-link svg { width: 22px; height: 22px; fill: currentColor; }
.top-nav .icon-link .icon-label { display: none; }

.top-nav .nav-cta {
  font-size: 0.8rem;
  padding: 0.4rem 0.95rem;
  background: var(--gold);
  color: var(--green);
  border-radius: 999px;
  border: none;
  font-weight: 700;
  white-space: nowrap;
}
.top-nav .nav-cta:hover { background: var(--gold-soft); color: var(--green); }

@media (max-width: 600px) {
  .top-nav .nav-cta { display: none; }
  .top-nav .wordmark { font-size: 0.75rem; letter-spacing: 0.14em; }
  .top-nav .container { padding: 0.6rem 16px; gap: 0.5rem; }
}
@media (max-width: 380px) {
  .top-nav .wordmark span { display: none; }
}

/* Daily card section */
.daily-card-section { text-align: center; }
.daily-card-section .label {
  font-family: 'Cinzel', Georgia, serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.85rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.daily-card-section h2 {
  color: var(--cream);
  font-size: 1.2rem;
  font-weight: normal;
  letter-spacing: normal;
  margin-bottom: 2rem;
}

.card-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}
.card-display picture, .card-display picture img {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
  border-radius: 8px;
}
.card-display picture { box-shadow: 0 12px 40px rgba(0,0,0,0.4); }
.card-display .name-irish {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.6rem;
  color: var(--gold);
}
.card-display .name-classic { color: var(--faint); font-size: 0.95rem; }
.card-display .meaning { max-width: 480px; font-style: italic; color: var(--cream); }

.pull-button { margin: 1rem auto 0; display: inline-block; }

/* Card flip — used by pull-your-own */
.card-flip {
  perspective: 1200px;
  width: 220px;
  height: 340px;
  margin: 0 auto 1.5rem;
}
.card-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 600ms cubic-bezier(0.4, 0.2, 0.2, 1);
}
.card-flip.flipped .card-flip-inner { transform: rotateY(180deg); }
.card-flip-front, .card-flip-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card-flip-front {
  background: linear-gradient(145deg, var(--green) 0%, var(--green-deep) 100%);
  border: 2px solid var(--gold);
  color: var(--gold);
  font-family: 'Cinzel', Georgia, serif;
  font-size: 2.6rem;
}
.card-flip-back {
  transform: rotateY(180deg);
  background: var(--green);
}
.card-flip-back picture, .card-flip-back picture img {
  width: 100%;
  height: 100%;
  display: block;
}
.card-flip-back picture img { object-fit: cover; }
.card-meaning-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* Pillars spacing */
#pillars .pillar { margin-bottom: clamp(48px, 8vw, 96px); }
#pillars .pillar:last-child { margin-bottom: 0; }
.pillar-badge {
  display: inline-block;
  font-family: 'Cinzel', Georgia, serif;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.7rem;
  color: var(--gold);
  border: 1px solid rgba(212, 184, 106, 0.4);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  margin-bottom: 0.85rem;
}

/* Founder */
.founder-row { display: grid; gap: 2rem; align-items: center; }
.founder-photo {
  width: 240px;
  height: 240px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--gold);
  justify-self: center;
}
@media (min-width: 768px) {
  .founder-row { grid-template-columns: 240px 1fr; gap: 3rem; }
}

/* Deck index + card detail page header */
.page-header { padding: 64px 0 32px; text-align: center; }
.back-home { font-size: 0.9rem; color: var(--faint); border: none; }
.subtitle { color: var(--faint); margin: 0.5rem 0 2rem; }

.deck-controls {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: center;
  margin-bottom: 1rem;
}
.toggle, .filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.toggle button, .filters button {
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
  border-radius: 999px;
}
.toggle button[aria-pressed="true"], .filters button[aria-pressed="true"] {
  background: var(--gold);
  color: var(--green);
}

.deck-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  padding: 32px 0 96px;
}
@media (min-width: 768px) {
  .deck-grid { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
}
@media (min-width: 1024px) {
  .deck-grid { grid-template-columns: repeat(6, 1fr); }
}
.deck-grid a {
  border: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: center;
}
.deck-grid img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  transition: transform 0.2s ease;
}
.deck-grid a:hover img { transform: translateY(-4px); }
.deck-grid .name {
  font-family: 'Cinzel', Georgia, serif;
  color: var(--gold);
  font-size: 0.95rem;
}

/* Card detail layout */
.card-detail-container { max-width: 720px; }
.card-detail-container picture img {
  width: 100%;
  max-width: 480px;
  display: block;
  margin: 0 auto 2rem;
  border-radius: 12px;
  box-shadow: 0 16px 60px rgba(0,0,0,0.5);
}
.card-detail-container .keywords {
  text-align: center;
  font-style: italic;
  color: var(--gold);
  margin-bottom: 2rem;
  letter-spacing: 0.04em;
}
.card-meaning { margin-bottom: 2rem; }
.card-meaning h2 { font-size: 1.2rem; margin-bottom: 0.5rem; }

/* Final CTA strip */
#final-cta {
  background: var(--green-deep);
  text-align: center;
  border-top: 1px solid rgba(212,184,106,0.18);
}
#final-cta h2 { margin-bottom: 1.5rem; }

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