/* DOA — Dubai Open for Academies.
 *
 * Built to sit next to the shield: near-black steel, a blue-to-red edge, and
 * condensed caps. The sport's own colour arrives as --brand and --accent and
 * is used as light — glows and edges — rather than as flat fill, so seven
 * associations share one design language without seven stylesheets. */

@import url('/assets/fonts.css');

:root {
  --brand: #2b7fff;
  --accent: #38bdf8;

  --ink: #05080f;
  --ink-2: #090e1a;
  --steel: #0f1626;
  --steel-2: #131d31;
  --edge: rgba(148, 176, 214, .14);
  --edge-strong: rgba(168, 196, 232, .28);

  --text: #eaf0fa;
  --muted: #9aabc4;
  --dim: #6b7c96;
  --silver: linear-gradient(180deg, #ffffff 0%, #cfe0f5 45%, #8fa6c4 100%);

  --red: #ff3355;
  --win: #4ade80;
  --radius: 14px;
  --display: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --ui: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  background: var(--ink);
  font: 15px/1.55 var(--ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Ambient light: a cool wash from the left and a warm one from the right, the
   same two-sided lighting the shield uses. Fixed so it does not scroll away. */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(70rem 40rem at 8% -10%, rgba(43, 127, 255, .20), transparent 60%),
    radial-gradient(60rem 36rem at 96% 4%, rgba(255, 51, 85, .13), transparent 62%),
    linear-gradient(180deg, #070c16 0%, var(--ink) 55%);
}
/* A faint engineered grid, like the plate behind the logo. */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(rgba(148, 176, 214, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 176, 214, .04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(80% 60% at 50% 0%, #000 0%, transparent 75%);
}

a { color: inherit; text-decoration: none; }
.shell { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ------------------------------------------------------------------ header */

.masthead {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(180deg, rgba(9, 14, 26, .92), rgba(9, 14, 26, .78));
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--edge);
}
/* The blue-to-red hairline under the masthead is the shield's edge lighting. */
.masthead::after {
  content: ''; display: block; height: 2px;
  background: linear-gradient(90deg, var(--brand), transparent 35%, transparent 65%, var(--red));
  opacity: .85;
}
.masthead__row { display: flex; align-items: center; gap: 16px; padding: 13px 20px 12px; }
.masthead__brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.masthead__mark {
  font-family: var(--display); font-weight: 700; font-size: 20px;
  letter-spacing: .1em; line-height: 1; padding: 8px 12px 6px;
  color: #fff; border-radius: 9px;
  background: linear-gradient(160deg, rgba(255,255,255,.16), rgba(255,255,255,.04));
  border: 1px solid var(--edge-strong);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 0 22px -8px var(--brand);
}
.masthead__logo { height: 30px; width: auto; max-width: 168px; object-fit: contain; display: block; filter: drop-shadow(0 2px 8px rgba(0,0,0,.5)); }
.masthead__name {
  font-family: var(--display); font-weight: 600; font-size: 16px;
  letter-spacing: .07em; text-transform: uppercase; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.masthead__sports { margin-left: auto; display: flex; gap: 6px; }
.masthead__sports a {
  font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  padding: 7px 13px; border-radius: 999px; color: var(--muted);
  border: 1px solid var(--edge); background: rgba(255,255,255,.03);
  transition: color .15s, border-color .15s, background .15s;
}
.masthead__sports a:hover, .masthead__sports a.on { color: #fff; border-color: var(--edge-strong); background: rgba(255,255,255,.08); }
.masthead__lead { padding: 0 20px 12px; }

.picker { display: flex; gap: 6px; flex-wrap: wrap; }
.picker a {
  font-size: 12px; font-weight: 600; letter-spacing: .05em; color: var(--muted);
  padding: 6px 12px; border-radius: 8px; border: 1px solid var(--edge); background: rgba(255,255,255,.03);
}
.picker a.on { color: #04121f; background: var(--accent); border-color: var(--accent); }

.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  font-family: var(--display); font-size: 16px; font-weight: 600;
  letter-spacing: .09em; text-transform: uppercase; white-space: nowrap;
  color: var(--dim); padding: 11px 16px 9px; border-radius: 10px 10px 0 0;
  border-bottom: 2px solid transparent;
}
.tabs a:hover { color: var(--muted); }
.tabs a.on {
  color: #fff; background: linear-gradient(180deg, rgba(255,255,255,.07), transparent);
  border-bottom-color: var(--accent);
}

/* -------------------------------------------------------------------- body */

main { padding: 26px 0 60px; }

.hero { padding: 10px 0 4px; }
.hero h1 {
  margin: 0 0 8px; font-family: var(--display); font-weight: 700;
  font-size: clamp(30px, 5.4vw, 52px); line-height: .98;
  letter-spacing: .02em; text-transform: uppercase;
  background: var(--silver); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { margin: 0; color: var(--muted); max-width: 62ch; font-size: 15.5px; }
.hero--umbrella { text-align: center; padding: 22px 0 10px; }
.hero--umbrella p { margin: 0 auto; }
.hero__logo {
  height: clamp(120px, 22vw, 210px); width: auto; max-width: min(340px, 82vw);
  object-fit: contain; margin-bottom: 14px;
  filter: drop-shadow(0 18px 44px rgba(0,0,0,.65)) drop-shadow(0 0 30px rgba(43,127,255,.28));
}
.hero--team h1 { font-size: clamp(24px, 4vw, 36px); }

.section-head {
  font-family: var(--display); font-size: 15px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .16em; color: var(--muted);
  margin: 34px 2px 12px; display: flex; align-items: center; gap: 10px;
}
.section-head::before {
  content: ''; width: 26px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

/* Steel panel: a dark plate with a lit top edge. */
.card {
  background: linear-gradient(180deg, var(--steel-2), var(--steel));
  border: 1px solid var(--edge); border-radius: var(--radius); overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 18px 40px -28px rgba(0,0,0,.9);
}

.daygroup { margin-bottom: 26px; }
.daygroup h2 {
  font-family: var(--display); font-size: 15px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .14em; color: var(--dim);
  margin: 0 2px 10px;
}

/* ---------------------------------------------------------------- fixtures */

.fx {
  display: grid; align-items: center; gap: 8px;
  grid-template-columns: 1fr 108px 1fr;
  grid-template-areas: 'home score away' 'meta meta meta';
  padding: 14px 18px; border-top: 1px solid rgba(148,176,214,.08);
  position: relative;
}
.fx:first-child { border-top: none; }
.fx--link { transition: background .15s; }
.fx--link:hover { background: rgba(255,255,255,.035); }
.fx__team {
  grid-area: away; min-width: 0; font-weight: 600; font-size: 15px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fx__team--home { grid-area: home; text-align: right; }
.tbd { color: var(--dim); font-weight: 500; font-style: italic; }
.fx__badge {
  grid-area: meta; justify-self: start; color: #fff;
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; border: 1px solid rgba(255,255,255,.22);
}
.fx__meta { grid-area: meta; justify-self: end; color: var(--dim); font-size: 12px; }

.score {
  grid-area: score; text-align: center;
  font-family: var(--display); font-weight: 700; font-size: 26px; line-height: 1;
  font-variant-numeric: tabular-nums; letter-spacing: .02em;
}
.score i { color: var(--dim); font-style: normal; padding: 0 4px; font-weight: 600; }
.score b { color: #fff; }
.score b.win { color: var(--win); text-shadow: 0 0 18px rgba(74,222,128,.35); }
.score--pending { font-family: var(--ui); font-size: 13px; font-weight: 600; color: var(--muted); }
.score--live b { color: var(--red); text-shadow: 0 0 20px rgba(255,51,85,.45); }

/* A live match gets a lit left edge rather than a coloured background. */
.fx--live::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--red); box-shadow: 0 0 18px var(--red);
}
.live { color: var(--red); font-style: normal; font-weight: 700; letter-spacing: .1em; }
.periods { color: var(--dim); }

.fx--event { grid-template-columns: 1fr 120px 1fr; }
.fx--event .fx__team--home { text-align: left; font-family: var(--display); font-size: 19px; letter-spacing: .04em; text-transform: uppercase; }
.fx--event .fx__team { color: var(--muted); font-weight: 500; }

/* ------------------------------------------------------------------ tables */

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 11px 8px; text-align: center; white-space: nowrap; }
.table th {
  color: var(--dim); font-size: 10.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .12em;
  background: rgba(255,255,255,.03); border-bottom: 1px solid var(--edge);
}
.table .th-team { text-align: left; padding-left: 18px; width: 100%; font-weight: 600; }
.table .th-pos { width: 46px; color: var(--dim); font-family: var(--display); font-size: 16px; }
.table .th-pts { font-family: var(--display); font-size: 19px; font-weight: 700; padding-right: 18px; color: #fff; }
.table tbody tr { border-top: 1px solid rgba(148,176,214,.07); }
.table tbody tr:hover { background: rgba(255,255,255,.03); }
/* The top two carry a lit edge — promotion, qualification, the podium. */
.table tbody tr:nth-child(-n+2) td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.table tbody td { color: var(--muted); }
.table tbody .th-team { color: var(--text); }

/* ------------------------------------------------------------------- tiles */

.sportgrid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); margin-top: 20px; }
.sportcard {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  padding: 22px 20px 18px; border-radius: 16px; overflow: hidden; isolation: isolate;
  background: linear-gradient(180deg, var(--steel-2), var(--steel));
  border: 1px solid var(--edge);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 20px 40px -30px #000;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
/* The sport's colour is light on the plate, not paint over it. */
.sportcard::before {
  content: ''; position: absolute; inset: -40% -30% auto -30%; height: 150%; z-index: -1;
  background: radial-gradient(60% 55% at 50% 0%, var(--brand), transparent 70%);
  opacity: .38; transition: opacity .16s ease;
}
.sportcard::after {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .75;
}
.sportcard:hover { transform: translateY(-3px); border-color: var(--edge-strong); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 26px 50px -28px #000; }
.sportcard:hover::before { opacity: .58; }
.sportcard__logo { height: 46px; width: auto; max-width: 82%; object-fit: contain; align-self: flex-start; filter: drop-shadow(0 3px 10px rgba(0,0,0,.55)); }
.sportcard__mark {
  font-family: var(--display); font-size: 34px; font-weight: 700; line-height: 1;
  letter-spacing: .05em; color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.5);
}
.sportcard__name { font-weight: 600; font-size: 14.5px; color: var(--text); }
.sportcard__tag { font-size: 12.5px; color: var(--muted); }

.teamgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.teamcard {
  display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: 12px;
  background: linear-gradient(180deg, var(--steel-2), var(--steel));
  border: 1px solid var(--edge); transition: border-color .15s, transform .15s;
}
.teamcard:hover { border-color: var(--accent); transform: translateY(-2px); }
.teamcard__name { font-family: var(--display); font-size: 19px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.teamcard__meta { color: var(--muted); font-size: 12.5px; }

.empty { color: var(--dim); font-style: italic; padding: 22px 4px; }

.footer { border-top: 1px solid var(--edge); margin-top: 30px; padding: 22px 0 34px; color: var(--dim); font-size: 12.5px; }
.footer p { margin: 0; }

@media (max-width: 640px) {
  .shell { padding: 0 14px; }
  .fx { grid-template-columns: 1fr 82px 1fr; padding: 12px 14px; }
  .score { font-size: 22px; }
  .fx__team { font-size: 14px; white-space: normal; }
  .masthead__name { display: none; }
  .table th, .table td { padding: 9px 6px; }
}

.footer__row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer__partner { height: 30px; width: auto; opacity: .8; }
.footer__row p { flex: 1; min-width: 220px; }
@media (max-width: 640px) { .footer__row { gap: 12px; } .footer__partner { height: 24px; } }

/* Club crests. Sized in the flow rather than absolutely, so a team without one
   simply has no image and the row stays aligned. */
.crest { height: 22px; width: auto; vertical-align: -6px; margin: 0 8px; flex: none; }
.fx__team--home .crest { margin-right: 0; }
.fx__team .crest { margin-left: 0; }
.table .th-team .crest { height: 20px; vertical-align: -5px; margin: 0 9px 0 0; }
.teamcard__crest { height: 48px; width: auto; margin-bottom: 8px; align-self: flex-start; }
.hero__crest { height: 74px; width: auto; margin-bottom: 10px; filter: drop-shadow(0 8px 20px rgba(0,0,0,.5)); }
@media (max-width: 640px) { .crest { height: 18px; vertical-align: -4px; margin: 0 5px; } }
