/* Club colours used quietly: plum lives in the ink, gold only as a thread, red and green mark the two sports. */
:root {
  --paper: #f6f3ee; --surface: #fffdfa; --ink: #19121f; --muted: #625a69; --line: #19121f1a;
  --night: #170f1e; --night-ink: #f3eee6; --night-muted: #b5abbb;
  --gold: #d9a248; --red: #9d2c43; --green: #17663d;
  --display: 'Archivo', system-ui, sans-serif; --text: 'Instrument Sans', system-ui, sans-serif;
  --edge: max(1.25rem, (100% - 72rem) / 2);
  --ease: cubic-bezier(.2, .7, .1, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1.0625rem/1.6 var(--text); display: flex; flex-direction: column; min-height: 100dvh; -webkit-font-smoothing: antialiased; }
main { flex: 1; width: 100%; outline: none; }
img, svg { max-width: 100%; }
h1, h2, h3 { font-family: var(--display); font-stretch: 118%; font-weight: 650; line-height: 1.02; letter-spacing: -.025em; margin: 0; text-wrap: balance; overflow-wrap: anywhere; }
h1 { font-size: clamp(2.5rem, 7.2vw, 5.25rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.75rem); }
h3 { font-size: 1.2rem; font-stretch: 108%; letter-spacing: -.01em; line-height: 1.25; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-underline-offset: .25em; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; box-shadow: 0 0 0 5px var(--night); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: .75rem; top: .75rem; background: var(--surface); padding: .6rem 1rem; z-index: 30; }

/* header */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem var(--edge); background: color-mix(in srgb, var(--paper) 82%, transparent); backdrop-filter: blur(14px) saturate(1.4); border-bottom: 1px solid var(--line); view-transition-name: top; }
.brand { display: flex; align-items: center; gap: .7rem; min-height: 44px; text-decoration: none; font: 700 1.05rem/1.1 var(--display); font-stretch: 118%; letter-spacing: -.01em; }
.brand small { display: block; font: 500 .75rem/1.4 var(--text); font-stretch: 100%; color: var(--muted); letter-spacing: 0; }
.menu { border: 1px solid var(--line); background: transparent; color: var(--ink); }
#nav { border: 0; margin: 0; color: var(--ink); }
#nav a { text-decoration: none; font-weight: 500; white-space: nowrap; transition: color .2s, background-size .35s var(--ease); background: linear-gradient(var(--gold), var(--gold)) left bottom / 0 2px no-repeat; }
#nav a:hover, #nav a[aria-current] { background-size: 100% 2px; }
@media (max-width: 999px) {
  #nav { position: fixed; inset: 4.2rem .75rem auto; width: auto; max-height: calc(100dvh - 5rem); overflow: auto; padding: .75rem 1.25rem 1.25rem; background: var(--surface); border-radius: 1.25rem; box-shadow: 0 30px 80px -20px #170f1e66; grid-template-columns: 1fr 1fr; column-gap: 1.5rem; opacity: 0; translate: 0 -8px; transition: opacity .25s, translate .35s var(--ease), display .35s allow-discrete, overlay .35s allow-discrete; }
  #nav:popover-open { display: grid; opacity: 1; translate: 0 0; }
  @starting-style { #nav:popover-open { opacity: 0; translate: 0 -8px; } }
  #nav::backdrop { background: #170f1e40; }
  #nav a { padding: .7rem 0; border-bottom: 1px solid var(--line); }
  #nav a[aria-current] { background: linear-gradient(var(--gold), var(--gold)) left bottom / 100% 2px no-repeat; }
}
@media (min-width: 1000px) {
  .menu { display: none; }
  #nav { display: flex; position: static; inset: auto; width: auto; height: auto; padding: 0; background: none; overflow: visible; gap: 1.15rem; font-size: .93rem; }
  #nav a { padding: .6rem 0; color: var(--muted); }
  #nav a:hover, #nav a[aria-current] { color: var(--ink); }
  #nav a[href="#home"] { display: none; }
}

/* buttons */
.button, button { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 46px; padding: .6rem 1.35rem; border: 1px solid var(--ink); border-radius: 999px; background: var(--ink); color: var(--paper); font: 600 .98rem/1 var(--text); text-decoration: none; cursor: pointer; transition: translate .25s var(--ease), background-color .25s, color .25s, scale .12s; }
.button:hover, button:hover { translate: 0 -2px; }
.button:active, button:active { scale: .97; translate: 0 0; }
.button.light { background: var(--night-ink); border-color: var(--night-ink); color: var(--night); }
button.ghost, button.menu { background: transparent; color: var(--ink); }
button.ghost { border-color: var(--line); }
button.menu { border-color: var(--line); }
button.danger { background: transparent; border-color: #9d2c4355; color: var(--red); }
.arrow::after { content: '→'; transition: translate .3s var(--ease); }
.arrow:hover::after { translate: 4px 0; }
.more { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; font-weight: 600; text-decoration: none; }

/* hero */
.hero { position: relative; margin: .75rem max(.75rem, (100% - 76rem) / 2) 0; border-radius: 1.75rem; overflow: hidden; isolation: isolate; background: radial-gradient(90% 120% at 85% 20%, #3b2149 0%, transparent 60%), radial-gradient(60% 80% at 0% 100%, #2a1d22 0%, transparent 70%), var(--night); color: var(--night-ink); display: grid; align-items: center; gap: 2.5rem; padding: clamp(2.25rem, 6vw, 5rem) clamp(1.25rem, 5vw, 4.5rem); }
.hero h1 { font-size: clamp(2.4rem, 4.8vw, 4.25rem); }
.hero p { color: var(--night-muted); font-size: 1.125rem; max-width: 34ch; }
.hero h1 + p { margin-top: 1.25rem; }
.hero .actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; margin-top: 2rem; }
.hero .more { color: var(--night-ink); }
.hero .note { margin-top: 1.25rem; font-size: .95rem; }
.art { position: relative; width: 100%; max-width: 34rem; justify-self: center; }
.art svg { display: block; width: 100%; height: auto; }
.art img { position: absolute; inset: 0; margin: auto; }
.art .crest { width: 30%; height: max-content;filter: drop-shadow(0 12px 30px #0009); }
.art.trophy { display: grid; place-items: center; }
.art.trophy img { position: static; height: clamp(15rem, 34vw, 25rem); width: auto; padding: 1.25rem 1.75rem; background: var(--paper); border-radius: 999px 999px 1.25rem 1.25rem; }
@media (min-width: 900px) { .hero { grid-template-columns: 1fr 1.05fr; min-height: min(38rem, calc(100dvh - 6rem)); } }

/* line drawings */
.lines { fill: none; stroke: currentColor; stroke-width: 1.25; vector-effect: non-scaling-stroke; }
.lines * { stroke-dasharray: 1; animation: draw 1.8s var(--ease) both; }
.lines .accent { stroke: var(--gold); animation-delay: .35s; }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* sections */
.wrap { padding: clamp(3rem, 7vw, 6rem) var(--edge) 0; width: 100%; }
.head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .5rem 2rem; margin-bottom: 1.75rem; }
.page-head { padding-top: clamp(3rem, 8vw, 6.5rem); }
.page-head h1 { padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); position: relative; }
.page-head h1::after { content: ''; position: absolute; left: 0; bottom: -1px; width: 4.5rem; height: 2px; background: var(--gold); }
.page-head p { margin-top: 1.25rem; max-width: 58ch; font-size: 1.15rem; color: var(--muted); }

.countdown { display: grid; gap: 1.25rem 2.5rem; align-items: center; padding: 1.75rem 0; border-block: 1px solid var(--line); }
.countdown .num { font: 300 clamp(4.5rem, 12vw, 8rem)/.85 var(--display); font-stretch: 125%; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.countdown .num small { font: 600 1rem var(--text); letter-spacing: 0; color: var(--muted); margin-left: .75rem; }
.countdown div p { color: var(--muted); }
@media (min-width: 800px) { .countdown { grid-template-columns: auto 1fr auto; } }

.sports { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.sport { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; min-height: 21rem; padding: 1.75rem; border-radius: 1.5rem; text-decoration: none; overflow: hidden; color: var(--night-ink); background: linear-gradient(155deg, #1d5139, #0f2a20 75%); transition: translate .35s var(--ease), box-shadow .35s var(--ease); }
.sport.cricket { background: linear-gradient(155deg, #6a2536, #31111b 75%); }
.sport:hover { translate: 0 -3px; box-shadow: 0 30px 50px -30px #170f1ecc; }
.sport .art { max-width: 19rem; opacity: .75; transition: scale .7s var(--ease), opacity .4s; }
.sport.cricket .art { max-width: 13rem; }
.sport:hover .art { scale: 1.04; opacity: 1; }
.sport h3 { font-size: 2rem; }
.sport .go { display: flex; justify-content: space-between; align-items: end; gap: 1rem; }

/* lists */
.list { list-style: none; margin: 0; padding: 0; }
.match { display: grid; grid-template-columns: 4.25rem 1fr; gap: .25rem 1.25rem; padding: 1.4rem 0; border-top: 1px solid var(--line); }
.match:last-child { border-bottom: 1px solid var(--line); }
.date-block { grid-row: span 2; text-align: center; font: 300 2.5rem/1 var(--display); font-stretch: 112%; font-variant-numeric: tabular-nums; }
.date-block small { display: block; margin-top: .35rem; font: 600 .78rem var(--text); color: var(--muted); }
.meta { color: var(--muted); font-size: .95rem; }
.tag { display: inline-flex; align-items: center; gap: .45rem; margin-right: .75rem; color: var(--ink); font-weight: 600; text-transform: capitalize; }
.tag::before { content: ''; width: .5rem; height: .5rem; border-radius: 50%; background: var(--green); }
.cricket .tag::before { background: var(--red); }
.result { grid-column: 2; justify-self: start; margin-top: .5rem; padding: .25rem .8rem; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: .9rem; font-weight: 600; }
.news { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 1.25rem; padding: 1.5rem; overflow-wrap: anywhere; }
.news .card { display: flex; flex-direction: column; gap: .6rem; }
.date { color: var(--muted); font-size: .9rem; }
.body { white-space: pre-line; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); }
.empty { padding: 2rem 0; border-block: 1px solid var(--line); color: var(--muted); }
figure { margin: 0; }
figure img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 1.25rem; }
.prose { max-width: 62ch; display: grid; gap: 1rem; font-size: 1.15rem; }

/* footer */
footer { margin-top: clamp(4rem, 10vw, 8rem); padding: clamp(3rem, 7vw, 5rem) var(--edge) 2rem; background: var(--night); color: var(--night-muted); }
footer .mark { font: 700 clamp(2.5rem, 10.5vw, 8.5rem)/.95 var(--display); font-stretch: 125%; letter-spacing: -.045em; color: var(--night-ink); }
footer .row { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid #f3eee626; font-size: .95rem; }
footer a { display: inline-flex; align-items: center; min-height: 44px; }

/* forms and admin */
.admin { max-width: 46rem; margin-inline: auto; padding: 2.5rem 1.25rem 0; }
.admin h2 { font-size: 1.6rem; margin: 2rem 0 1rem; }
.admin section.card h2 { margin-top: 0; }
.admin .list { display: grid; gap: .6rem; }
form { display: grid; gap: 1rem; }
label { display: grid; gap: .35rem; font-weight: 600; font-size: .95rem; }
input, select, textarea { width: 100%; min-width: 0; min-height: 46px; padding: .65rem .85rem; font: inherit; font-weight: 400; color: inherit; background: var(--paper); border: 1px solid #19121f40; border-radius: .75rem; }
section.card { margin-top: 1rem; }
.row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; }
#status { font-weight: 600; color: var(--red); margin-bottom: 1rem; }
#status:empty { display: none; }
[hidden] { display: none !important; }

/* header tools, league card, social, archive */
.tools { display: flex; gap: .5rem; align-items: center; }
.tools .login { font-size: .92rem; white-space: pre; gap: 0; }
@media (max-width: 599px) {
  .tools .login { padding-inline: 1rem; text-transform: capitalize; }
  .tools .login span { display: none; }
  .tools .menu { padding-inline: 1rem; }
  .brand small { display: none; }
}

.flash { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 1rem 1.5rem; margin: .9rem max(.75rem, (100% - 76rem) / 2) 0; padding: 1.1rem 1.5rem; background: var(--surface); border: 1px solid var(--gold); border-radius: 1.5rem; animation: glow 2.4s ease-in-out infinite; }
.flash img { height: 5.5rem; width: auto; }
.flash h2 { font-size: clamp(1.25rem, 2.4vw, 1.75rem); }
.flash p { color: var(--muted); }
.flash .live { display: flex; align-items: center; gap: .55rem; color: var(--red); font-weight: 600; font-size: .95rem; }
.live::before { content: ''; width: .55rem; height: .55rem; border-radius: 50%; background: currentColor; animation: blink 1.2s ease-in-out infinite; }
.flash-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; grid-column: 1 / -1; }
@media (min-width: 800px) { .flash { grid-template-columns: auto 1fr auto; } .flash-actions { grid-column: auto; } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 0 #d9a24800; } 50% { box-shadow: 0 0 0 5px #d9a24840, 0 14px 40px -12px #d9a24899; } }
@keyframes blink { 50% { opacity: .25; } }

.social { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; padding: 0; }
footer .social { margin-top: 2rem; }
.social a, .social li > span { display: inline-flex; align-items: center; gap: .6rem; min-height: 46px; padding: .5rem 1.2rem; border: 1px solid color-mix(in srgb, currentColor 28%, transparent); border-radius: 999px; font-weight: 600; text-decoration: none; transition: translate .25s var(--ease), border-color .25s; }
footer .social a, footer .social li > span { color: var(--night-ink); }
.social a:hover { translate: 0 -2px; border-color: var(--gold); }
.social small { font-weight: 400; opacity: .65; }
.ico { width: 1.15rem; height: 1.15rem; background: currentColor; mask: center / contain no-repeat; }
.ico.facebook { mask-image: url(/icons/facebook.svg); }
.ico.instagram { mask-image: url(/icons/instagram.svg); }
.ico.whatsapp { mask-image: url(/icons/whatsapp.svg); }

.events { display: grid; gap: 2rem 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.event { display: grid; gap: .4rem; align-content: start; }
.event img { width: 100%; aspect-ratio: 4/3; object-fit: contain; background: var(--night); border-radius: 1.25rem; }
.event h3 { margin-top: .75rem; font-size: 1.5rem; }
.poster { display: grid; place-content: center; justify-items: center; gap: 1rem; aspect-ratio: 4/3; padding: 2rem; border-radius: 1.25rem; background: linear-gradient(155deg, #3b2149, var(--night) 75%); color: #f3eee666; }
.poster svg { width: 16rem; max-width: 100%; height: auto; }
.poster p { color: var(--night-muted); font-size: .95rem; }

/* motion: one entrance per page, native cross-page transition */
.enter > * { animation: rise .8s var(--ease) both; }
.enter > :nth-child(2) { animation-delay: .09s; }
.enter > :nth-child(3) { animation-delay: .18s; }
.enter > :nth-child(n+4) { animation-delay: .26s; }
@keyframes rise { from { opacity: 0; translate: 0 18px; } }
::view-transition-old(root) { animation: .18s ease-out both fade-out; }
::view-transition-new(root) { animation: .3s ease-in .08s both fade-in; }
@keyframes fade-out { to { opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
