/* ==========================================================
   Fyvie Parish Church Lottery - styles.css
   Sections: variables, reset, base, layout, header, footer,
   components, forms, pages, print
   ========================================================== */

:root {
  --blue-dark: #0b4ea2;
  --blue: #0a6ebd;
  --cyan: #12b5de;
  --cyan-dark: #0997c0;
  --yellow: #ffcc00;
  --yellow-dark: #e6b800;
  --orange: #f59a1b;
  --red: #c8102e;
  --white: #ffffff;
  --ink: #0d2a4d;
  --grey-100: #f3f6fa;
  --grey-300: #d5dde8;
  --grey-600: #56677d;
  --radius: 24px;
  --space-1: .5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --font: ui-rounded, "Nunito", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--white);
  line-height: 1.6; font-size: 1.0625rem;
}
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 var(--space-2); font-weight: 800; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); color: var(--blue-dark); }
h3 { font-size: 1.25rem; color: var(--blue-dark); }
p, ul, ol, dl, table, details { margin: 0 0 var(--space-2); }
a { color: var(--blue-dark); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--blue); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }
svg.icon { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; flex: none; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--yellow); color: var(--ink); padding: .75rem 1rem; z-index: 200; font-weight: 800; }
.skip-link:focus { left: 0; }
.container { width: min(1180px, 100% - 2rem); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--white); box-shadow: 0 2px 6px rgba(13,42,77,.12); }
.site-header__inner { display: flex; align-items: stretch; min-height: 72px; }
.brand { display: flex; align-items: center; gap: .6rem; padding: 0 1.25rem; text-decoration: none; color: var(--blue-dark); border-right: 1px solid var(--grey-300); }
.brand__mark { width: 40px; height: 40px; border-radius: 50%; background: var(--blue-dark); color: var(--yellow); display: grid; place-items: center; }
.brand__mark svg { width: 24px; height: 24px; fill: var(--yellow); stroke: none; }
.brand__text { font-weight: 900; line-height: 1.05; font-size: 1.05rem; }
.brand__text small { display: block; font-size: .8rem; color: var(--cyan-dark); letter-spacing: .04em; text-transform: uppercase; }
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-burger { display: none; margin-left: auto; align-items: center; padding: 0 1.25rem; cursor: pointer; color: var(--blue-dark); }
.nav-burger svg { width: 30px; height: 30px; }
.nav { display: flex; flex: 1; }
.nav ul { display: flex; list-style: none; margin: 0; padding: 0; flex: 1; }
.nav li { display: flex; }
.nav a { display: flex; align-items: center; padding: 0 1.1rem; text-decoration: none; font-weight: 800; color: var(--blue-dark); border-right: 1px solid var(--grey-300); }
.nav a:hover, .nav a[aria-current="page"] { background: var(--grey-100); box-shadow: inset 0 -4px 0 var(--yellow); }
.nav .nav__login { margin-left: auto; background: var(--orange); color: var(--white); border: 0; padding: 0 2rem; }
.nav .nav__login:hover { background: #d9840e; color: var(--white); box-shadow: none; }
.nav__item--drop { position: relative; }
.nav__item--drop > a::after { content: ""; border: 5px solid transparent; border-top-color: currentColor; margin-left: .5rem; margin-top: 5px; }
.nav__drop { display: none; position: absolute; top: 100%; left: 0; background: var(--white); min-width: 240px; box-shadow: 0 8px 20px rgba(13,42,77,.2); flex-direction: column; }
.nav__item--drop:hover .nav__drop, .nav__item--drop:focus-within .nav__drop { display: flex; }
.nav__drop a { padding: .8rem 1.1rem; border: 0; border-bottom: 1px solid var(--grey-300); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .8rem 1.8rem; border-radius: 999px; font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; border: 3px solid var(--white); transition: transform .15s ease, background .15s ease; }
.btn--primary { background: var(--yellow); color: var(--blue-dark); }
.btn--primary:hover { background: var(--yellow-dark); color: var(--blue-dark); transform: translateY(-2px); }
.btn--secondary { background: var(--blue-dark); color: var(--white); border-color: var(--blue-dark); }
.btn--secondary:hover { background: var(--blue); color: var(--white); }
.btn--light { background: var(--white); color: var(--blue-dark); border-color: var(--white); }
.btn--large { padding: 1rem 2.4rem; font-size: 1.15rem; }
.link-light { color: var(--white); font-weight: 800; }
.link-light:hover { color: var(--yellow); }

/* ---------- Hero ---------- */
.hero { color: var(--white); text-align: center; padding: var(--space-5) 0 var(--space-4);
  background: repeating-conic-gradient(from 0deg at 50% 38%, var(--cyan) 0deg 10deg, var(--cyan-dark) 10deg 20deg); }
.hero h1 { color: var(--yellow); text-shadow: 0 3px 0 rgba(11,78,162,.35); }
.hero p { font-size: 1.35rem; font-weight: 800; max-width: 40ch; margin-inline: auto; }
.hero--page { padding: var(--space-4) 0; text-align: left; }
.hero--page p { margin-inline: 0; font-size: 1.15rem; }

.panel { background: var(--white); border-radius: var(--radius); padding: 1rem; margin-top: -2rem; position: relative; box-shadow: 0 10px 30px rgba(13,42,77,.18); }
.panel__grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
.lcard { border-radius: 20px; padding: 1.5rem; color: var(--white); position: relative; overflow: hidden; min-height: 330px; display: flex; flex-direction: column; }
.lcard--weekly { background: linear-gradient(160deg, var(--blue) 0%, var(--cyan-dark) 100%); }
.lcard--special { background: var(--blue-dark); background-image: radial-gradient(circle at 20% 25%, rgba(255,204,0,.28) 0 28px, transparent 29px), radial-gradient(circle at 80% 20%, rgba(255,204,0,.2) 0 40px, transparent 41px), radial-gradient(circle at 60% 85%, rgba(255,204,0,.2) 0 22px, transparent 23px); }
.lcard h2 { color: var(--white); }
.lcard__flower { position: absolute; top: 1rem; right: 1rem; width: 150px; height: 150px; display: grid; place-items: center; text-align: center; font-weight: 900; color: var(--blue-dark); line-height: 1.1; background: var(--yellow); border-radius: 50% 12% 50% 12%; transform: rotate(8deg); font-size: 1.05rem; }
.lcard__flower span { display: block; font-size: 1.6rem; }
.countdown { background: rgba(255,255,255,.22); border-radius: 14px; padding: .8rem; margin: 1rem 0; max-width: 360px; }
.countdown p { margin: 0 0 .5rem; font-weight: 800; }
.countdown__boxes { display: grid; grid-template-columns: repeat(4,1fr); gap: .4rem; }
.countdown__boxes div { background: var(--white); color: var(--blue-dark); border-radius: 10px; text-align: center; padding: .4rem .2rem; font-weight: 900; font-size: .8rem; }
.countdown__boxes b { display: block; font-size: 1.6rem; line-height: 1.1; }
.lcard__actions { margin-top: auto; display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }

.info-panel { background: var(--blue-dark); border-radius: var(--radius); padding: 1rem; margin-top: 1.25rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; color: var(--white); }
.info-panel__left { text-align: center; padding: 2rem 1rem; background: repeating-conic-gradient(from 0deg at 50% 45%, rgba(255,255,255,.06) 0deg 12deg, transparent 12deg 24deg); border-radius: 18px; }
.info-panel__left h2 { color: var(--white); }
.bignum { display: block; color: var(--yellow); font-size: 4.5rem; font-weight: 900; line-height: 1; }
.yellow { color: var(--yellow); font-weight: 800; font-size: 1.4rem; }
.info-panel__right { display: grid; gap: 1rem; }
.mcard { background: var(--white); color: var(--ink); border-radius: 12px; padding: 1.25rem; display: grid; grid-template-columns: 110px 1fr; gap: 1.2rem; align-items: center; }
.mcard__deco { width: 100px; height: 100px; border: 6px solid var(--yellow); border-radius: 14px; transform: rotate(-6deg); display: grid; place-items: center; background: var(--grey-100); color: var(--blue-dark); }
.mcard__deco svg { width: 48px; height: 48px; }
.mcard h3 { font-size: 1.6rem; margin-bottom: .4rem; }

.social-strip { background: var(--blue-dark); color: var(--white); text-align: center; padding: var(--space-3) 1rem; margin-top: var(--space-5); font-size: 1.5rem; font-weight: 900; }
.social-strip a { color: var(--white); margin-left: 1rem; }

/* ---------- Content pages ---------- */
.breadcrumb { background: var(--grey-100); border-bottom: 1px solid var(--grey-300); font-size: .95rem; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: .7rem 0; }
.breadcrumb li + li::before { content: "/"; margin-right: .4rem; color: var(--grey-600); }
.layout { display: grid; grid-template-columns: 260px 1fr; gap: var(--space-4); padding: var(--space-4) 0; align-items: start; }
.layout--single { grid-template-columns: 1fr; max-width: 820px; }
.sidebar { position: sticky; top: 90px; background: var(--grey-100); border: 1px solid var(--grey-300); border-radius: 16px; padding: 1rem 1.25rem; }
.sidebar summary { font-weight: 900; cursor: pointer; color: var(--blue-dark); }
.sidebar ul { list-style: none; padding: 0; margin: .75rem 0 0; }
.sidebar li { border-top: 1px solid var(--grey-300); }
.sidebar a { display: block; padding: .5rem 0; text-decoration: none; font-weight: 700; }
.sidebar a:hover { text-decoration: underline; }
.content section { margin-bottom: var(--space-4); scroll-margin-top: 90px; }
.content h2 { border-bottom: 4px solid var(--yellow); padding-bottom: .3rem; display: inline-block; }
.content ol.clauses { padding-left: 1.4rem; }
.content ol.clauses li { margin-bottom: .6rem; }
.keyfacts { background: var(--grey-100); border: 1px solid var(--grey-300); border-left: 8px solid var(--yellow); border-radius: 12px; padding: 1.25rem 1.5rem; margin-bottom: var(--space-4); }
.keyfacts h2 { border: 0; font-size: 1.3rem; margin-bottom: .75rem; }
.keyfacts dl { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.5rem; margin: 0; }
.keyfacts dt { font-weight: 800; }
.keyfacts dd { margin: 0; }
.related, .updated { font-size: .95rem; color: var(--grey-600); }
.related { background: var(--grey-100); padding: 1rem 1.25rem; border-radius: 12px; }
.related ul { margin: .5rem 0 0; padding-left: 1.2rem; }
.callout { border: 2px solid var(--blue-dark); background: #eaf4fd; border-radius: 12px; padding: 1.1rem 1.4rem; margin-bottom: var(--space-3); display: flex; gap: .9rem; }
.callout--warn { border-color: var(--red); background: #fff1f3; }
.callout p:last-child { margin: 0; }
.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 1rem; }
.steps li { counter-increment: step; position: relative; padding: 1rem 1rem 1rem 4.2rem; background: var(--grey-100); border-radius: 14px; }
.steps li::before { content: counter(step); position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); width: 2.4rem; height: 2.4rem; background: var(--yellow); color: var(--blue-dark); border-radius: 50%; display: grid; place-items: center; font-weight: 900; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-bottom: var(--space-3); }
.card { border: 1px solid var(--grey-300); border-top: 6px solid var(--cyan); border-radius: 14px; padding: 1.25rem; }
.card h3 { margin-bottom: .4rem; }

table { border-collapse: collapse; width: 100%; background: var(--white); }
caption { text-align: left; font-weight: 800; padding-bottom: .5rem; color: var(--blue-dark); }
th, td { border: 1px solid var(--grey-300); padding: .65rem .8rem; text-align: left; vertical-align: top; }
th { background: var(--blue-dark); color: var(--white); }
.table-wrap { overflow-x: auto; }

.bars { display: grid; gap: .9rem; }
.bar__label { display: flex; justify-content: space-between; font-weight: 800; margin-bottom: .25rem; }
.bar__track { background: var(--grey-300); border-radius: 999px; height: 22px; overflow: hidden; }
.bar__fill { height: 100%; background: var(--cyan-dark); border-radius: 999px; }
.bar__fill--yellow { background: var(--yellow); }
.bar__fill--blue { background: var(--blue-dark); }

.timeline { list-style: none; padding: 0 0 0 1.5rem; border-left: 4px solid var(--yellow); }
.timeline li { position: relative; padding: 0 0 1.5rem 1.2rem; }
.timeline li::before { content: ""; position: absolute; left: -2.1rem; top: .35rem; width: 1rem; height: 1rem; border-radius: 50%; background: var(--blue-dark); border: 3px solid var(--yellow); }
.timeline b { color: var(--blue-dark); }

details.faq { border: 1px solid var(--grey-300); border-radius: 12px; margin-bottom: .6rem; background: var(--white); }
details.faq summary { padding: .9rem 1.2rem; cursor: pointer; font-weight: 800; color: var(--blue-dark); }
details.faq[open] summary { background: var(--grey-100); border-bottom: 1px solid var(--grey-300); }
details.faq > div { padding: 1rem 1.2rem 0; }

/* ---------- Forms ---------- */
.form { background: var(--grey-100); border: 1px solid var(--grey-300); border-radius: 16px; padding: 1.5rem; }
.form fieldset { border: 1px solid var(--grey-300); border-radius: 12px; margin: 0 0 var(--space-2); padding: 1rem 1.25rem; background: var(--white); }
.form legend { font-weight: 900; color: var(--blue-dark); padding: 0 .5rem; }
.field { margin-bottom: var(--space-2); }
.field label { display: block; font-weight: 800; margin-bottom: .3rem; }
.field small { display: block; color: var(--grey-600); }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], select, textarea {
  width: 100%; padding: .7rem .9rem; font: inherit; border: 2px solid var(--grey-300); border-radius: 10px; background: var(--white); color: var(--ink); }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: 3px solid rgba(10,110,189,.25); }
input:user-invalid, select:user-invalid, textarea:user-invalid { border-color: var(--red); background: #fff7f8; }
.check { display: flex; gap: .7rem; align-items: flex-start; margin-bottom: .7rem; }
.check input { width: 1.3rem; height: 1.3rem; margin-top: .2rem; accent-color: var(--blue-dark); flex: none; }
.pills { display: flex; flex-wrap: wrap; gap: .6rem; }
.pills input { position: absolute; opacity: 0; }
.pills label { padding: .6rem 1.3rem; border: 2px solid var(--blue-dark); border-radius: 999px; font-weight: 800; cursor: pointer; background: var(--white); color: var(--blue-dark); margin: 0; }
.pills input:checked + label { background: var(--blue-dark); color: var(--white); }
.pills input:focus-visible + label { outline: 3px solid var(--orange); outline-offset: 2px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ---------- Footer ---------- */
.site-footer { margin-top: var(--space-5); }
.footer-hello { background: var(--blue-dark); color: var(--white); padding: 1.5rem 0; }
.footer-hello .container { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }
.footer-hello strong { font-size: 1.4rem; }
.footer-hello a { color: var(--white); font-weight: 800; }
.footer-top { background: var(--white); border-bottom: 1px solid var(--grey-300); }
.footer-top__grid { display: grid; grid-template-columns: 1.1fr 1.6fr 1.1fr; }
.footer-top__grid > div { padding: 1.75rem 1.5rem; border-right: 1px solid var(--grey-300); }
.footer-top__grid > div:last-child { border-right: 0; }
.footer-top h2 { font-size: 1.1rem; margin-bottom: .6rem; }
.footer-top ul { list-style: none; padding: 0; margin: 0 0 .75rem; display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font-weight: 800; }
.age { display: flex; align-items: center; gap: 1rem; }
.age-badge { flex: none; width: 64px; height: 64px; border-radius: 50%; border: 5px solid var(--red); background: var(--white); color: var(--ink); display: grid; place-items: center; font-weight: 900; font-size: 1.25rem; }
.rg-bar { background: #fff8d6; border-bottom: 3px solid var(--yellow); padding: 1.25rem 0; font-size: .98rem; }
.rg-bar h2 { font-size: 1.1rem; margin-bottom: .4rem; }
.rg-bar ul { margin: .5rem 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px,1fr)); gap: .5rem 1.5rem; }
.small-print { text-align: center; font-size: .88rem; color: var(--grey-600); padding: 1.5rem 0 1rem; }
.small-print p { max-width: 90ch; margin-inline: auto; }
.legal-links { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem 0; padding: 0 0 2rem; margin: 0; font-size: .92rem; }
.legal-links li + li::before { content: "|"; margin: 0 .8rem; color: var(--grey-600); }
.legal-links a { color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nav a { padding: 0 .75rem; font-size: .95rem; }
  .brand { padding: 0 .9rem; }
}
@media (max-width: 900px) {
  .nav-burger { display: flex; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); box-shadow: 0 10px 20px rgba(13,42,77,.2); max-height: 80vh; overflow-y: auto; }
  .nav-toggle:checked ~ .nav { display: block; }
  .nav ul { flex-direction: column; }
  .nav a { padding: 1rem 1.25rem; border-right: 0; border-bottom: 1px solid var(--grey-300); }
  .nav .nav__login { margin: 0; }
  .nav__item--drop > a::after { display: none; }
  .nav__drop { display: flex; position: static; box-shadow: none; background: var(--grey-100); }
  .nav__drop a { padding-left: 2.25rem; }
  .panel__grid, .info-panel, .grid-2, .footer-top__grid { grid-template-columns: 1fr; }
  .footer-top__grid > div { border-right: 0; border-bottom: 1px solid var(--grey-300); }
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .hero { background: repeating-conic-gradient(from 0deg at 50% 30%, var(--cyan) 0deg 15deg, #20bde3 15deg 30deg); }
  .mcard { grid-template-columns: 1fr; }
  .keyfacts dl { grid-template-columns: 1fr; gap: 0; }
  .keyfacts dd { margin-bottom: .6rem; }
}
@media (max-width: 600px) {
  .lcard__flower { position: static; margin-bottom: 1rem; width: 120px; height: 120px; }
  .bignum { font-size: 3.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .sidebar, .site-footer .footer-hello, .breadcrumb, .btn, .skip-link { display: none !important; }
  body { font-size: 11pt; color: #000; }
  .layout { display: block; padding: 0; }
  .hero { background: none; color: #000; padding: 0; }
  .hero h1 { color: #000; text-shadow: none; }
  a { color: #000; text-decoration: none; }
  .content section { break-inside: avoid; }
}
