/* ==========================================================================
   Pilato Productions — site stylesheet
   Modern, centred, responsive design system for a pageantry publisher.
   ========================================================================== */

:root {
  --plum:        #5b2a63;
  --plum-dark:   #3a1a40;
  --plum-soft:   #f4ecf6;
  --gold:        #b08243;
  --gold-soft:   #f6efe2;
  --ink:         #241c2a;
  --body:        #453d4c;
  --muted:       #6e6678;
  --line:        #e6dfe8;
  --cream:       #fdfbf7;
  --white:       #ffffff;
  --blush:       #fbf4f7;
  --radius:      14px;
  --radius-sm:   8px;
  --shadow:      0 1px 2px rgba(36, 28, 42, .06), 0 8px 24px -12px rgba(36, 28, 42, .18);
  --shadow-lg:   0 2px 4px rgba(36, 28, 42, .06), 0 20px 45px -20px rgba(58, 26, 64, .35);
  --maxw:        1140px;
  --serif:       Georgia, "Times New Roman", "Iowan Old Style", "Palatino Linotype", serif;
  --sans:        system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--body);
  background: var(--cream);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; border: 0; }

a { color: var(--plum); text-decoration: none; }
a:hover { color: var(--plum-dark); text-decoration: underline; }

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

h1, h2, h3, h4, h5 {
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.22;
  margin: 0 0 .55em;
  font-weight: 700;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(1.85rem, 1.2rem + 2.6vw, 2.85rem); }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.3vw, 1.95rem); margin-top: 1.8em; }
h3 { font-size: clamp(1.15rem, 1rem + .7vw, 1.4rem); margin-top: 1.5em; }
h4 { font-size: 1.06rem; margin-top: 1.3em; }

p  { margin: 0 0 1.05em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.35em; }
li { margin-bottom: .45em; }

hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
  margin: 2rem 0;
}

blockquote {
  margin: 1.6rem 0;
  padding: .3rem 0 .3rem 1.25rem;
  border-left: 4px solid var(--gold);
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--ink);
}

strong, b { color: var(--ink); font-weight: 650; }

/* On dark surfaces --ink would be unreadable: force light text there instead.
   (.callout and .notice use light tints, so they keep the normal ink colour.) */
.hero strong, .hero b,
.site-footer strong, .site-footer b,
.dark strong, .dark b { color: #fff; }

.hero a:not(.btn) { color: #f4dfae; text-decoration-color: rgba(244, 223, 174, .5); }
.hero a:not(.btn):hover { color: #fff; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 1.15rem;
}

/* ---------------------------------------------------------------- skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--plum-dark);
  color: #fff;
  padding: .7rem 1.1rem;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ------------------------------------------------------------------- header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(253, 251, 247, .96);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 74px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  margin-right: auto;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--plum) 0%, var(--plum-dark) 60%, #2b1230 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .04em;
  box-shadow: 0 0 0 3px var(--gold-soft);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.16; }
.brand-name {
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--ink);
}
.brand-tag {
  font-size: .73rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

/* --------------------------------------------------------------- navigation */
.nav-toggle {
  display: none;
  align-items: center;
  gap: .45rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .5rem .95rem;
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  color: var(--plum-dark);
  cursor: pointer;
}
.nav-toggle:hover { background: var(--plum-soft); }

.site-nav { width: 100%; }
.site-nav > ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .15rem;
  list-style: none;
  margin: 0;
  padding: 0 0 .55rem;
}
.site-nav li { position: relative; margin: 0; }
.site-nav > ul > li > a,
.site-nav > ul > li > .nav-parent {
  display: inline-block;
  padding: .45rem .72rem;
  border-radius: 999px;
  font-size: .93rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.site-nav > ul > li > a:hover,
.site-nav > ul > li:hover > .nav-parent { background: var(--plum-soft); color: var(--plum-dark); }
.site-nav > ul > li.is-current > a,
.site-nav > ul > li.is-current > .nav-parent { background: var(--plum); color: #fff; }

.site-nav ul ul {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 290px;
  max-width: 340px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: .5rem;
  list-style: none;
  margin: 0;
  display: none;
  z-index: 70;
  max-height: min(74vh, 620px);
  overflow-y: auto;
}
.site-nav li:hover > ul,
.site-nav li:focus-within > ul,
.site-nav li.is-open > ul { display: block; }
.site-nav ul ul a {
  display: block;
  padding: .42rem .65rem;
  border-radius: var(--radius-sm);
  font-size: .89rem;
  color: var(--body);
  text-decoration: none;
}
.site-nav ul ul a:hover { background: var(--plum-soft); color: var(--plum-dark); }

/* --------------------------------------------------------------------- hero */
.hero {
  position: relative;
  background:
    radial-gradient(1100px 420px at 12% -18%, rgba(176, 130, 67, .20), transparent 62%),
    radial-gradient(900px 480px at 92% 4%, rgba(91, 42, 99, .30), transparent 60%),
    linear-gradient(160deg, #3a1a40 0%, #4c2253 46%, #2c1330 100%);
  color: #f4ecf6;
  padding: clamp(2.6rem, 1.6rem + 4vw, 4.6rem) 0 clamp(2.4rem, 1.6rem + 3vw, 3.8rem);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .95fr);
  gap: clamp(1.5rem, 1rem + 2.4vw, 3.2rem);
  align-items: center;
}
.hero h1 { color: #fff; margin-bottom: .5rem; text-wrap: balance; }
.hero p {
  color: rgba(244, 236, 246, .92);
  font-size: clamp(1rem, .95rem + .28vw, 1.14rem);
  max-width: 54ch;
}
.eyebrow {
  display: inline-block;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #e2c48d;
  margin-bottom: .85rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.5rem; }

.hero-figure { margin: 0; }
.hero-figure img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 26px 55px -22px rgba(0, 0, 0, .65);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 2.3rem;
  padding-top: 1.7rem;
  border-top: 1px solid rgba(255, 255, 255, .16);
}
.hero-stats .stat strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.5rem;
  color: #fff;
}
.hero-stats .stat span {
  font-size: .82rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: rgba(244, 236, 246, .72);
}

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .72rem 1.28rem;
  border-radius: 999px;
  font-weight: 650;
  font-size: .94rem;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--plum); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--plum-dark); color: #fff; }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: #966c33; color: #fff; }
.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, .55);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.btn-outline { background: var(--white); color: var(--plum-dark); border-color: var(--line); }
.btn-outline:hover { background: var(--plum-soft); color: var(--plum-dark); }

/* -------------------------------------------------------------------- main */
main { display: block; padding: clamp(1.6rem, 1rem + 1.8vw, 2.6rem) 0 3.4rem; }

.breadcrumbs {
  font-size: .83rem;
  color: var(--muted);
  margin-bottom: 1.15rem;
}
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.breadcrumbs li { margin: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: .35rem; color: var(--line); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--plum); text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--ink); font-weight: 600; }

.page-head { max-width: 62ch; margin-bottom: 1.7rem; }
.page-head h1 { margin-bottom: .4rem; text-wrap: balance; }
.page-head .lede {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0;
}
.section-label {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .5rem;
  display: block;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: clamp(1.4rem, 1rem + 2vw, 2.8rem);
  align-items: start;
}
.layout--wide { grid-template-columns: minmax(0, 1fr); }

.article-body { min-width: 0; }
.article-body > :first-child { margin-top: 0; }

/* -------------------------------------------------------------------- cards */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
  box-shadow: var(--shadow);
}
.card > :last-child { margin-bottom: 0; }
.card h2, .card h3 { margin-top: 0; }

.grid { display: grid; gap: 1.15rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(195px, 1fr)); }

.feature-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.35rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, box-shadow .18s ease, border-color .18s ease;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: #d9cbdd;
}
.feature-card h3 { margin-top: 0; font-size: 1.16rem; }
.feature-card p { color: var(--muted); font-size: .95rem; }
.feature-card .card-link {
  margin-top: auto;
  font-weight: 650;
  font-size: .9rem;
  color: var(--plum);
}
.feature-card .icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--plum-soft);
  color: var(--plum);
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  margin-bottom: .85rem;
}

/* cards that carry a real photograph or banner */
.feature-card.has-media { padding-top: 0; overflow: hidden; }
.feature-card .card-media {
  display: block;
  width: calc(100% + 2.7rem);
  margin: 0 -1.35rem 1.1rem;
  height: 218px;
  padding: .5rem;
  object-fit: contain;                 /* never crop a branded banner */
  object-position: center;
  background: linear-gradient(180deg, #faf7fb 0%, #efe6f1 100%);
  border-bottom: 1px solid var(--line);
}

/* compact winner / contestant gallery tiles */
.gallery-card {
  margin: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: .6rem;
  display: flex;
  flex-direction: column;
}
.gallery-card img {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: contain;
  object-position: center;
  background: linear-gradient(180deg, #faf7fb 0%, #efe6f1 100%);
  border-radius: var(--radius-sm);
}
.gallery-card figcaption {
  font-size: .83rem;
  color: var(--muted);
  margin-top: .55rem;
  line-height: 1.35;
}

/* ----------------------------------------------------------------- sections */
.section { padding: clamp(1.9rem, 1.2rem + 2.2vw, 3.1rem) 0; }
.section--tint { background: var(--white); border-block: 1px solid var(--line); }
.section--blush { background: var(--blush); border-block: 1px solid var(--line); }
.section-head { max-width: 62ch; margin-bottom: 1.7rem; }
.section-head h2 { margin-top: 0; }
.section-head p { color: var(--muted); margin-bottom: 0; }
.section-head--center { margin-inline: auto; text-align: center; }

/* ------------------------------------------------------------------- tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: .95rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: table;
}
.data-table caption { caption-side: top; text-align: left; padding: .6rem 0; color: var(--muted); font-size: .87rem; }
.data-table th,
.data-table td {
  padding: .7rem .85rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}
.data-table tr:last-child > td { border-bottom: 0; }
.data-table th { background: var(--plum-soft); color: var(--plum-dark); font-weight: 650; }
.data-table img { border-radius: var(--radius-sm); }

/* photo / contestant galleries built from legacy tables */
.gallery .data-table,
.gallery-table {
  border: 0;
  background: transparent;
}
.gallery-table td { border: 0; text-align: center; }
.gallery-table img { border-radius: var(--radius-sm); box-shadow: var(--shadow); }

/* ------------------------------------------------------------- content flow */
.article-body img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: .35rem 0;
}
.article-body p img { margin-bottom: .2rem; }
.article-body ul { padding-left: 1.25rem; }
.article-body ul li::marker { color: var(--gold); }

.notice {
  background: var(--gold-soft);
  border: 1px solid #e7d6b4;
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  margin: 1.5rem 0;
}
.notice > :last-child { margin-bottom: 0; }

.callout {
  background: var(--plum-soft);
  border: 1px solid #ded0e2;
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  margin: 1.6rem 0;
}
.callout > :last-child { margin-bottom: 0; }

.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li {
  padding: .7rem 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
}
.contact-list li:last-child { border-bottom: 0; }
.contact-list b { min-width: 8.5rem; }

/* -------------------------------------------------------------- side / aside */
.sidebar { display: grid; gap: 1.15rem; position: sticky; top: 96px; }
.sidebar .card h2, .sidebar .card h3 { font-size: 1.05rem; }
.sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar li { padding: .34rem 0; border-bottom: 1px dashed var(--line); font-size: .93rem; }
.sidebar li:last-child { border-bottom: 0; }
.sidebar li a { text-decoration: none; }
.sidebar li a:hover { text-decoration: underline; }

.related h2 { font-size: 1.3rem; }
.related-grid { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); list-style: none; padding: 0; margin: 0; }
.related-grid li { margin: 0; }
.related-grid a {
  display: block;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .7rem .9rem;
  font-size: .93rem;
  text-decoration: none;
  color: var(--plum-dark);
  font-weight: 600;
}
.related-grid a:hover { background: var(--plum-soft); text-decoration: none; }

/* ---------------------------------------------------------------- link lists */
.link-list { list-style: none; padding: 0; margin: 0; columns: 3; column-gap: 1.8rem; }
.link-list li { break-inside: avoid; padding: .2rem 0; font-size: .93rem; }
@media (max-width: 900px) { .link-list { columns: 2; } }
@media (max-width: 560px) { .link-list { columns: 1; } }

/* ----------------------------------------------------------------- FAQ page */
.faq { margin: 1.4rem 0; }
.faq details {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: .65rem;
  padding: .1rem 0;
}
.faq summary {
  cursor: pointer;
  padding: .85rem 1.05rem;
  font-weight: 650;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.06rem;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--gold); font-weight: 700; }
.faq details[open] summary::after { content: "\2013"; }
.faq details > *:not(summary) { padding-inline: 1.05rem; }
.faq details > *:last-child { margin-bottom: 1rem; }

/* ------------------------------------------------------------------- footer */
.site-footer {
  background: linear-gradient(180deg, #2c1330 0%, #231026 100%);
  color: rgba(244, 236, 246, .82);
  padding: 2.9rem 0 1.6rem;
  margin-top: 1rem;
}
.site-footer h2, .site-footer h3 {
  color: #fff;
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-family: var(--sans);
  margin-bottom: .8rem;
}
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 1.8rem 2rem;
}
.footer-brand p { font-size: .92rem; max-width: 34ch; }
.footer-brand .brand-name { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: .19rem 0; font-size: .9rem; }
.site-footer a { color: rgba(244, 236, 246, .84); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-contact { font-size: .92rem; }
.footer-contact a { color: #e2c48d; }

.footer-index {
  margin-top: 2.2rem;
  border-top: 1px solid rgba(255, 255, 255, .13);
  padding-top: 1.1rem;
}
.footer-index details summary {
  cursor: pointer;
  color: #e2c48d;
  font-weight: 650;
  font-size: .92rem;
  letter-spacing: .04em;
}
.footer-index .columns {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 1.4rem 1.9rem;
}
.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, .13);
  display: flex;
  justify-content: space-between;
  gap: .8rem;
  flex-wrap: wrap;
  font-size: .84rem;
  color: rgba(244, 236, 246, .62);
}

/* --------------------------------------------------------------- responsive */
@media (max-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; }
  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-figure { order: -1; max-width: 520px; }

  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; }
  .site-nav.is-open { display: block; }
  .site-nav > ul { flex-direction: column; align-items: stretch; padding-bottom: .9rem; }
  .site-nav > ul > li > a,
  .site-nav > ul > li > .nav-parent {
    display: flex;
    justify-content: space-between;
    width: 100%;
    border-radius: var(--radius-sm);
    padding: .6rem .75rem;
  }
  .site-nav ul ul {
    position: static;
    display: block;
    min-width: 0;
    max-width: none;
    max-height: none;
    box-shadow: none;
    border: 0;
    border-left: 2px solid var(--line);
    border-radius: 0;
    margin: 0 0 .35rem .6rem;
    padding: 0 0 0 .5rem;
    background: transparent;
  }
  .site-nav li:hover > ul { display: block; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .footer-top { grid-template-columns: minmax(0, 1fr); }
  .data-table { display: block; overflow-x: auto; white-space: nowrap; }
  .data-table td, .data-table th { white-space: normal; }
}

@media print {
  .site-header, .site-footer, .sidebar, .related, .hero-actions { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .layout { display: block; }
  a { color: #000; text-decoration: underline; }
}
