/* News page styles. Needs css/root.css loaded first (colour + font tokens).
   Self-contained: it does NOT depend on css/index.css. */
/* Theme: same switching as css/index.css (dark when the OS is dark, or data-theme="dark"). */
:root{--red-text:var(--red)}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    color-scheme:dark;
    --bg:#150E0F; --bg-alt:#1F1516; --ink:#F6EFEE; --muted:#B7A6A8; --line:#33262770;
    --red-text:#FF5A62; /* lighter red for text so it stays readable on dark */
  }
}
:root[data-theme="dark"]{
  color-scheme:dark;
  --bg:#150E0F; --bg-alt:#1F1516; --ink:#F6EFEE; --muted:#B7A6A8; --line:#33262770;
  --red-text:#FF5A62;
}

*,*::before,*::after{box-sizing:border-box}
html{scroll-padding-top:env(safe-area-inset-top,0px)}
body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--body);line-height:1.6;-webkit-font-smoothing:antialiased}
a{color:inherit}
:focus-visible{outline:3px solid var(--red);outline-offset:3px}
.wrap{width:min(1120px,100% - 2.5rem);margin-inline:auto}

/* header / nav */
.site-head{background:var(--red-deep);border-bottom:1px solid rgba(255,255,255,.12);color:#fff;padding:1.25rem 0}
.site-head .wrap{display:flex;align-items:center;justify-content:space-between;gap:1rem}
.brand{display:flex;align-items:center;gap:.75rem;text-decoration:none;font-family:var(--display);font-weight:900;font-size:1.5rem;letter-spacing:.02em}
.crest{height:70px;width:auto;flex:none}
.site-head ul{display:flex;gap:1.75rem;list-style:none;margin:0;padding:0;font-weight:500}
.site-head ul a{text-decoration:none;padding:.25rem 0;border-bottom:2px solid transparent}
.site-head ul a:hover,.site-head ul a[aria-current]{border-color:#fff}
.btn{display:inline-block;font-weight:700;text-decoration:none;padding:.9rem 1.6rem;border-radius:2px;transition:transform .15s}
.btn-white{background:#fff;color:var(--red-deep)}
.btn-white:hover{transform:translateY(-2px)}

/* page */
.page{padding:clamp(2rem,5vw,4rem) 0 clamp(3rem,8vw,6rem);min-height:60vh}
.page h1{font-family:var(--display);font-weight:900;text-transform:uppercase;font-size:clamp(2.6rem,7vw,5rem);line-height:.95;margin:0 0 2rem}
.back{display:inline-block;margin-bottom:1.5rem;font-weight:700;color:var(--red-text);text-decoration:none}
.back:hover{text-decoration:underline}
.empty{color:var(--muted)}

/* article list */
.news-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:1.5rem}
.news-card{display:flex;flex-direction:column;background:var(--bg-alt);border:1px solid var(--line);border-top:5px solid var(--red);text-decoration:none;color:inherit;transition:transform .15s}
.news-card:hover{transform:translateY(-4px)}
.news-card .thumb{aspect-ratio:16/9;background:linear-gradient(135deg,var(--red-deep),var(--red));overflow:hidden}
.news-card .thumb img{width:100%;height:100%;object-fit:cover;display:block}
.news-card .card-body{padding:1.25rem 1.5rem 1.5rem;display:flex;flex-direction:column;gap:.6rem}
.news-card time,.article time{font-size:.85rem;font-weight:700;color:var(--red-text)}
.news-card h3{font-family:var(--display);font-size:1.8rem;line-height:1;margin:0;font-weight:900;text-transform:uppercase}
.news-card p{margin:0;color:var(--muted)}

/* single article */
.article{max-width:820px;margin-inline:auto}
.article time{display:block;font-size:1rem;margin-bottom:.5rem}
.article h1{font-size:clamp(2.2rem,6vw,4rem);margin-bottom:1.5rem}

/* carousel */
.carousel{position:relative;aspect-ratio:16/9;background:linear-gradient(135deg,var(--red-deep),var(--red));overflow:hidden;margin-bottom:2rem;touch-action:pan-y}
.track{display:flex;height:100%;transition:transform .55s cubic-bezier(.2,.8,.2,1)}
.slide{flex:0 0 100%;height:100%;margin:0;position:relative}
.slide img{width:100%;height:100%;object-fit:cover;display:block}
.slide figcaption{position:absolute;left:0;right:0;bottom:0;padding:2.5rem 1rem 1.6rem;color:#fff;font-size:.9rem;background:linear-gradient(transparent,rgba(0,0,0,.65))}
.cbtn{position:absolute;top:50%;translate:0 -50%;width:46px;height:46px;border:0;border-radius:50%;background:rgba(255,255,255,.92);color:var(--red-deep);font-size:1.4rem;font-weight:900;cursor:pointer;display:grid;place-items:center;transition:background .15s,color .15s}
.cbtn:hover{background:var(--red);color:#fff}
.cbtn.prev{left:.9rem}.cbtn.next{right:.9rem}
.dots{position:absolute;left:0;right:0;bottom:.8rem;display:flex;justify-content:center;gap:.5rem}
.dots button{width:11px;height:11px;border-radius:50%;border:2px solid #fff;background:transparent;padding:0;cursor:pointer}
.dots button[aria-current="true"]{background:#fff}

/* article body (HTML from news.json) */
.article-body{font-size:1.1rem}
.article-body>*:first-child{margin-top:0}
.article-body h2,.article-body h3{font-family:var(--display);text-transform:uppercase;line-height:1;margin:2rem 0 .75rem}
.article-body h2{font-size:2.2rem}.article-body h3{font-size:1.6rem}
.article-body a{color:var(--red-text);font-weight:700}
.article-body img,.article-body video{max-width:100%;height:auto;display:block;margin:1.5rem 0}
.article-body iframe{display:block;width:100%;aspect-ratio:16/9;border:0;margin:1.5rem 0}
.article-body blockquote{margin:1.5rem 0;padding:.5rem 0 .5rem 1.25rem;border-left:5px solid var(--red);font-size:1.25rem;font-style:italic}
.article-body table{width:100%;border-collapse:collapse;margin:1.5rem 0}
.article-body th,.article-body td{padding:.65rem .5rem;text-align:left;border-bottom:1px solid var(--line)}
.article-body ul,.article-body ol{padding-left:1.4rem}

footer{padding:2.5rem 0;color:var(--muted);font-size:.92rem}

@media (max-width:860px){
  .site-head ul{display:none}
  .carousel{aspect-ratio:4/3}
}
@media (prefers-reduced-motion:reduce){.track,.news-card,.btn{transition:none}}