/* Journey through the Scriptures — website. The app's "Stone and Light"
   colours (lib/core/theme/app_colors.dart) and Noto Sans, so the site and the
   app read as one. Accessible: IS 5568 / WCAG 2.0 AA (contrast, focus, sizes). */

@font-face { font-family: "Noto Sans"; src: url("../fonts/NotoSans-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Noto Sans"; src: url("../fonts/NotoSans-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Noto Sans"; src: url("../fonts/NotoSans-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --bg: #F5F0E8;        /* stone */
  --surface: #FCF8F1;
  --ink: #2D1304;
  --ink-muted: #6B5544;
  --gold: #D4900A;
  --gold-text: #8F5D03;
  --on-gold: #2A1B00;
  --border: #D9C9AC;
  --night: #2D1304;     /* the app's dark brown */
  --cream: #F5E9C9;
  --gold-bright: #F2C84B;
  --radius: 14px;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-text); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  background: var(--ink); color: var(--cream); padding: 10px 16px; border-radius: 8px;
}
.skip:focus { top: 16px; }

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

/* Header */
.site-header { background: var(--night); color: var(--cream); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--cream); text-decoration: none; font-weight: 700; }
.brand img { width: 40px; height: 40px; border-radius: 8px; }
.site-header nav a { color: var(--cream); text-decoration: none; margin-left: 18px; font-weight: 600; }
.site-header nav a:hover { color: var(--gold-bright); }
.site-header nav a.login { background: var(--gold-bright); color: var(--night); padding: 8px 16px; border-radius: 999px; }
.site-header nav a.login:hover { color: var(--night); filter: brightness(1.08); }

/* Hero */
.hero {
  position: relative; color: var(--cream); text-align: center;
  background: var(--night) url("../img/hero-jerusalem.jpg") center / cover no-repeat;
}
/* The turning photos (SK's own): ten slides, 4 s each, a 1.2 s crossfade,
   each drifting a little closer, like the app's welcome page. */
.hero { overflow: hidden; }
.hero-slides { position: absolute; inset: 0; z-index: 0; }
/* The shade above the photos, the words above the shade. */
.hero::before { z-index: 1; }
.hero .wrap { z-index: 2; }
.hero-slides img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; animation: hero-turn 40s linear infinite;
}
.hero-slides img:nth-child(1) { object-position: 27% 50%; animation-delay: 0s; }
.hero-slides img:nth-child(2) { object-position: 45% 50%; animation-delay: 4s; }
.hero-slides img:nth-child(3) { object-position: 50% 40%; animation-delay: 8s; }
.hero-slides img:nth-child(4) { object-position: 50% 50%; animation-delay: 12s; }
.hero-slides img:nth-child(5) { object-position: 50% 50%; animation-delay: 16s; }
.hero-slides img:nth-child(6) { object-position: 55% 50%; animation-delay: 20s; }
.hero-slides img:nth-child(7) { object-position: 50% 50%; animation-delay: 24s; }
.hero-slides img:nth-child(8) { object-position: 50% 50%; animation-delay: 28s; }
.hero-slides img:nth-child(9) { object-position: 60% 50%; animation-delay: 32s; }
.hero-slides img:nth-child(10) { object-position: 65% 50%; animation-delay: 36s; }
@keyframes hero-turn {
  0% { opacity: 0; transform: scale(1); }
  3% { opacity: 1; }
  10% { opacity: 1; }
  13% { opacity: 0; transform: scale(1.08); }
  100% { opacity: 0; transform: scale(1.08); }
}
/* Motion off: the first photo, still. */
@media (prefers-reduced-motion: reduce) {
  .hero-slides img { animation: none; }
  .hero-slides img:first-child { opacity: 1; }
}
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(45,19,4,.55), rgba(45,19,4,.78)); }
.hero .wrap { position: relative; padding: 72px 20px 80px; }
.hero .logo { width: 132px; height: 132px; margin: 0 auto 18px; border-radius: 24px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.15; margin: 0 0 12px; }
.hero h1 span { color: var(--gold-bright); }
.hero p { font-size: clamp(1.05rem, 2.4vw, 1.3rem); max-width: 640px; margin: 0 auto 22px; }
.badge { display: inline-block; border: 1px solid var(--gold-bright); color: var(--gold-bright); border-radius: 999px; padding: 4px 14px; font-weight: 600; font-size: .95rem; }

.button {
  display: inline-block; background: var(--gold); color: var(--on-gold); font-weight: 700;
  text-decoration: none; padding: 14px 26px; border-radius: 999px; min-height: 48px;
}
.button:hover { background: var(--gold-bright); color: var(--on-gold); }

/* Sections */
section { padding: 64px 0; }
section h2 { font-size: clamp(1.6rem, 3.5vw, 2.1rem); margin: 0 0 10px; line-height: 1.25; }
.lead { color: var(--ink-muted); max-width: 720px; margin: 0 0 32px; font-size: 1.15rem; }
.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.alt .card { background: var(--bg); }
.card h3 { margin: 0 0 8px; font-size: 1.25rem; }
.card p { margin: 0; color: var(--ink-muted); }
.card .icon { font-size: 1.6rem; margin-bottom: 8px; color: var(--gold-text); }

.photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.photos figure { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.photos img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.photos figcaption { padding: 10px 14px; color: var(--ink-muted); font-size: .95rem; }

.features { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px 28px; }
.features li { padding-left: 30px; position: relative; }
.features li::before { content: "✦"; position: absolute; left: 0; color: var(--gold-text); }

.cta { text-align: center; }
.cta p { margin: 0 auto 22px; max-width: 640px; color: var(--ink-muted); }

/* Footer */
.site-footer { background: var(--night); color: var(--cream); padding: 36px 0; font-size: .95rem; }
.site-footer a { color: var(--gold-bright); }
.site-footer .links a { margin-right: 18px; }
.site-footer p { margin: 8px 0; }

/* Legal pages */
.page { padding: 48px 0 64px; }
.page h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 0 0 6px; }
.page .meta { color: var(--ink-muted); margin: 0 0 24px; }
.page h2 { font-size: 1.3rem; margin: 32px 0 8px; }
.page p { white-space: pre-line; margin: 0 0 12px; }
.note { background: rgba(212,144,10,.12); border-radius: 10px; padding: 12px 16px; font-weight: 600; margin: 0 0 20px; }
.page .prose { max-width: 760px; }

@media (max-width: 640px) {
  .site-header nav a { margin-left: 12px; font-size: .95rem; }
  .brand span { display: none; }
  section { padding: 48px 0; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
