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

:root {
  --gold-start: #e4ac22;
  --gold-end: #f7c327;
  --purple: #7049ba;
  --pink: #e95095;
  --bg: #f7f5f8;
  --surface: #ffffff;
  --text: #222222;
  --text-muted: #666666;
  --border: #e8e4ef;
  --radius: 0.75rem;
  --radius-lg: 1.25rem;
  --shadow: 0 4px 24px rgba(112, 73, 186, 0.10);
  --shadow-card: 0 2px 12px rgba(112, 73, 186, 0.08);
  --gold-gradient: linear-gradient(135deg, var(--gold-start), var(--gold-end));
  --hero-gradient: linear-gradient(160deg, #5A76B0 0%, #9DABD2 100%);
}

body {
  font-family: 'Poppins', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ─── Header ─────────────────────────────────── */

header {
  background: #ffffff;/*var(--hero-gradient);*/
  padding: 0.15rem 0.5rem;
  text-align: center;
}

.header-inner {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 100px;
  width: auto;
}

.tagline {
  font-size: 0.85rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.02em;
  max-width: 380px;
  text-align: center;
  font-style: italic;
}

/* ─── Tab Nav ─────────────────────────────────── */

.tab-nav {
  display: flex;
  background: var(--surface);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.tab-btn {
  flex: 1;
  padding: 0.9rem 0.5rem;
  background: none;
  border: none;
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.tab-btn .tab-icon {
  font-size: 0.45rem;
  opacity: 0;
  transition: opacity 0.2s;
}

.tab-btn:hover {
  color: var(--purple);
}

.tab-btn.active {
  color: var(--purple);
  border-bottom-color: var(--gold-start);
}

.tab-btn.active .tab-icon {
  opacity: 1;
  color: var(--gold-start);
}

/* ─── Main / Screens ──────────────────────────── */

main {
  flex: 1;
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.screen {
  display: none;
  animation: fadeIn 0.3s ease;
}

.screen.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Hero Banner (per screen) ───────────────── */

.screen-hero {
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  margin-bottom: 1.75rem;
  position: relative;
  overflow: hidden;
  color: #fff;
}

.screen-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: inherit;
  z-index: 0;
}

.screen-hero-content {
  position: relative;
  z-index: 1;
}

.screen-hero .eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 0.5rem;
}

.screen-hero h2 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.screen-hero p {
  font-size: 0.95rem;
  font-weight: 300;
  opacity: 0.9;
  max-width: 480px;
  line-height: 1.7;
}

.hero-mission  { background: var(--hero-gradient); }
.hero-vision   { background: linear-gradient(135deg, #72C053 0%, #BCDDA4 100%); }
.hero-values   { background: linear-gradient(135deg, #E4AD22 0%, #F0D18C 100%); }

#screen-mission .pull-quote { display: none; }
#screen-mission .card-grid { display: none; }
#screen-vision .card-grid { display: none; }

/* ─── Cards ───────────────────────────────────── */

.card-grid {
  display: grid;
  gap: 1rem;
}

.card-grid.cols-2 {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
}

.card-accent {
  width: 3rem;
  height: 4px;
  border-radius: 2px;
  background: var(--gold-gradient);
  margin-bottom: 1rem;
}

.card-accent.purple { background: linear-gradient(90deg, var(--purple), #a07de0); }
.card-accent.pink   { background: linear-gradient(90deg, var(--pink), #f07ec0); }
.card-accent.teal   { background: linear-gradient(90deg, #1a8a9a, #2abccc); }

.card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.card p {
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ─── Shuffle button ──────────────────────────── */

.shuffle-bar {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.shuffle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  color: var(--purple);
  border: 2px solid var(--purple);
  border-radius: var(--radius);
  padding: 0.55rem 1.25rem;
  font-family: 'Poppins', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.shuffle-btn:hover {
  background: var(--purple);
  color: #fff;
}

.shuffle-btn svg {
  transition: transform 0.32s ease;
  flex-shrink: 0;
}

.shuffle-btn.spinning svg {
  transform: rotate(180deg);
}

/* ─── Value Cards (image + bullets) ──────────── */

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

.value-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.value-card-img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  display: block;
}

.value-card-body {
  padding: 1.25rem 1.5rem 1.5rem;
  flex: 1;
}

.value-card-body h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--gold-start);
  display: inline-block;
}

.value-card-subtitle {
  font-size: 0.8rem;
  font-weight: 400;
  font-style: italic;
  color: var(--purple);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.value-card-body ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.value-card-body ul li {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--text-muted);
  padding-left: 1rem;
  position: relative;
  line-height: 1.5;
}

.value-card-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold-start);
}

/* ─── Value Items ─────────────────────────────── */

.value-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
}

.value-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.value-icon.gold   { background: linear-gradient(135deg, #fff5d6, #ffe9a0); }
.value-icon.purple { background: linear-gradient(135deg, #ede8f8, #d8ccf0); }
.value-icon.pink   { background: linear-gradient(135deg, #fde8f2, #f9c8e2); }
.value-icon.teal   { background: linear-gradient(135deg, #d6f5f8, #a8eaf0); }
.value-icon.green  { background: linear-gradient(135deg, #d6f5e0, #a8e8ba); }
.value-icon.blue   { background: linear-gradient(135deg, #d6e8f8, #a8ccf0); }

.value-body h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.value-body p {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ─── Pull Quote ──────────────────────────────── */

.pull-quote {
  border-left: 4px solid var(--gold-start);
  padding: 1rem 1.5rem;
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow-card);
  margin: 0.25rem 0;
}

.pull-quote p {
  font-size: 1rem;
  font-weight: 600;
  font-style: italic;
  color: var(--purple);
  line-height: 1.6;
}

/* ─── Install Banner ─────────────────────────── */

.install-banner {
  background: var(--surface);
  border-bottom: 2px solid var(--border);
  padding: 0.75rem 1.25rem;
  box-shadow: 0 2px 12px rgba(112, 73, 186, 0.10);
}

.install-banner[hidden] { display: none; }

.install-banner-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.install-banner-logo {
  height: 36px;
  width: auto;
  flex-shrink: 0;
}

.install-banner-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.install-banner-text strong {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.install-banner-text span {
  font-size: 0.775rem;
  font-weight: 300;
  color: var(--text-muted);
}

.install-btn {
  flex-shrink: 0;
  background: var(--gold-gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 0.5rem 1.1rem;
  font-family: 'Poppins', sans-serif;
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.install-btn:hover { opacity: 0.88; }

.install-dismiss {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  transition: color 0.2s;
}

.install-dismiss:hover { color: var(--text); }

@media (max-width: 480px) {
  .install-banner-logo { display: none; }
}

/* ─── Footer ──────────────────────────────────── */

footer {
  text-align: center;
  padding: 1.25rem 1rem;
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: var(--surface);
}

/* ─── Playing Card Modal ─────────────────────── */

.value-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.value-modal[hidden] { display: none; }

.value-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 8, 35, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* The card itself */
.playing-card {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 16px;
  border: 1.5px solid #ddd;
  box-shadow:
    0 2px 0 1px #e8e8e8,
    0 8px 32px rgba(0,0,0,0.28),
    0 2px 8px rgba(0,0,0,0.18);
  width: 100%;
  max-width: 300px;
  overflow: hidden;
  animation: card-deal 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
  transform-origin: center top;
}

@keyframes card-deal {
  0%   { opacity: 0; transform: translateY(-60px) rotate(-12deg) scale(0.85); }
  100% { opacity: 1; transform: translateY(0)     rotate(0deg)   scale(1); }
}

.playing-card.card-exit {
  animation: card-exit 0.22s ease-in forwards;
}

@keyframes card-exit {
  0%   { opacity: 1; transform: translateY(0) rotate(0deg) scale(1); }
  100% { opacity: 0; transform: translateY(40px) rotate(6deg) scale(0.9); }
}

/* Corner pips */
.pip {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
  pointer-events: none;
}

.pip-tl { top: 10px; left: 13px; }
.pip-br { bottom: 10px; right: 13px; rotate: x 180deg; }

.pip-letter {
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold-start);
}

.pip-suit {
  font-size: 0.7rem;
  color: var(--gold-start);
}

/* Close button */
.card-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  font-size: 0.9rem;
  color: #aaa;
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
  z-index: 2;
  transition: color 0.15s;
}

.card-close:hover { color: var(--text); }

/* Card image */
.card-img {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: contain;
}

/* Card text body */
.card-body {
  padding: 1rem 1.25rem 2rem;
  text-align: center;
}

.card-body h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--purple);
  margin-bottom: 0.6rem;
  letter-spacing: 0.01em;
}

.card-subtitle {
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  line-height: 1.4;
}

.card-rule {
  border: none;
  border-top: 1.5px solid var(--border);
  margin: 0 auto 0.75rem;
  width: 40%;
}

.card-body p {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.6;
  font-style: normal;
}

/* ─── Responsive ──────────────────────────────── */

@media (max-width: 480px) {
  .screen-hero h2 { font-size: 1.6rem; }
  .tab-btn { font-size: 0.75rem; padding: 0.8rem 0.25rem; }
}
