/* Holyprices portal. Brand colours come from the existing brand mark (indigo -> violet, amber tag). */

:root {
  --bg: #f6f7fb;
  --bg-glow: #e7e9fb;
  --surface: #ffffff;
  --border: #dfe2ee;
  --text: #171a2b;
  --muted: #565b73;
  --brand: #4f46e5;          /* white text on this is 6.3:1 */
  --brand-hover: #4338ca;
  --accent: #fbbf24;
  --accent-ink: #7a5300;
  --icon-bg: #eceafd;
  --icon-ink: #4f46e5;
  --ring: #4f46e5;
  --shadow: 0 1px 2px rgb(20 24 60 / 6%), 0 8px 24px rgb(20 24 60 / 6%);
  --shadow-lift: 0 2px 4px rgb(20 24 60 / 8%), 0 16px 36px rgb(20 24 60 / 12%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1020;
    --bg-glow: #1a1c3d;
    --surface: #171a30;
    --border: #2a2e4d;
    --text: #eceefb;
    --muted: #a3a8c6;
    --accent-ink: #fbbf24;
    --icon-bg: #24274d;
    --icon-ink: #a5b4fc;
    --ring: #a5b4fc;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%);
    --shadow-lift: 0 2px 4px rgb(0 0 0 / 40%), 0 16px 36px rgb(0 0 0 / 45%);
  }
}

:root[data-theme="dark"] {
  --bg: #0e1020;
  --bg-glow: #1a1c3d;
  --surface: #171a30;
  --border: #2a2e4d;
  --text: #eceefb;
  --muted: #a3a8c6;
  --accent-ink: #fbbf24;
  --icon-bg: #24274d;
  --icon-ink: #a5b4fc;
  --ring: #a5b4fc;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%);
  --shadow-lift: 0 2px 4px rgb(0 0 0 / 40%), 0 16px 36px rgb(0 0 0 / 45%);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  background-image: radial-gradient(60rem 28rem at 50% -8rem, var(--bg-glow), transparent 70%);
  background-repeat: no-repeat;
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  padding: 8px 14px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  z-index: 10;
}
.skip:focus { top: 12px; }

/* --- top bar --- */

.bar {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand img { border-radius: 9px; display: block; }
.brand-name { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }

.controls { display: flex; gap: 8px; }

.chip {
  appearance: none;
  min-width: 44px;
  height: 40px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}
.chip:hover { border-color: var(--brand); }
.chip svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Show the icon for the theme you would switch TO. */
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: block; }
  :root:not([data-theme="light"]) .i-moon { display: none; }
}

/* --- content --- */

main {
  flex: 1;
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 16px 48px;
}

.hero { text-align: center; padding: 40px 0 32px; }
.hero h1 {
  margin: 0 auto 12px;
  max-width: 22ch;
  font-size: clamp(1.9rem, 5vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}
.hero p { margin: 0; color: var(--muted); font-size: 1.1rem; }

.cards { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 720px) { .cards { grid-template-columns: 1fr 1fr; gap: 24px; } }

.card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--brand); }

.card-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 14px;
  background: var(--icon-bg);
  color: var(--icon-ink);
}
.card-icon.accent { background: var(--accent); color: #4a3200; }
.card-icon svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.card h2 { margin: 0 0 8px; font-size: 1.4rem; letter-spacing: -0.02em; }
.desc { margin: 0 0 16px; color: var(--muted); }

.feats { margin: 0 0 24px; padding: 0; list-style: none; display: grid; gap: 8px; }
.feats li { position: relative; padding-left: 26px; }
.feats li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.45em;
  width: 6px;
  height: 11px;
  border: solid var(--icon-ink);
  border-width: 0 2px 2px 0;
  transform: rotate(40deg);
}

.btn {
  margin-top: auto;
  align-self: flex-start;
  padding: 12px 22px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  color: #fff;
  background: var(--brand);
  border-radius: 12px;
  text-decoration: none;
  transition: background-color 0.15s;
}
.btn:hover { background: var(--brand-hover); }
.btn::after { content: "\2192"; margin-left: 10px; transition: transform 0.15s; }
.btn:hover::after { transform: translateX(3px); }

.foot { padding: 20px 16px 28px; text-align: center; color: var(--muted); font-size: 0.9rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .card:hover { transform: none; }
}
