/* Herts Cyber — hertscyber.org
   Fonts are self-hosted (no third-party requests) — see /assets/fonts */

@font-face { font-family: "Archivo"; src: url("../fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("../fonts/atkinson-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("../fonts/atkinson-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("../fonts/atkinson-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --ink: #0e1e24;
  --ink-soft: #4a5e66;
  --river: #0b4f5c;
  --river-deep: #073640;
  --aqua: #3fd0c9;
  --aqua-pale: #bce9e6;
  --coral: #ff6b4a;
  --coral-deep: #c9401f;
  --mist: #eaf5f4;
  --paper: #f7f9f8;
  --line: #d2e3e1;

  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --body: "Atkinson", "Verdana", system-ui, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: clamp(2.1rem, 4.5vw, 2.75rem);
  --step-4: clamp(2.6rem, 7.5vw, 4.75rem);

  --measure: 68ch;
  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}
img, svg { max-width: 100%; display: block; }

a { color: var(--river); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0 0 0.5em; }
h1 { font-size: var(--step-4); font-weight: 800; font-stretch: 118%; letter-spacing: -0.02em; }
h2 { font-size: var(--step-3); font-weight: 750; font-stretch: 110%; letter-spacing: -0.01em; }
h3 { font-size: var(--step-1); font-weight: 700; font-stretch: 100%; }
p, ul, ol { margin: 0 0 1em; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.prose { max-width: var(--measure); }
.skip { position: absolute; left: -999px; top: 0.5rem; background: var(--paper); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 0.5rem; }
.muted { color: var(--ink-soft); }

/* Header */
.site-header { background: var(--river-deep); color: #fff; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 2rem; padding-block: 1rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; color: #fff; text-decoration: none; font-family: var(--display); font-weight: 800; font-stretch: 115%; font-size: 1.35rem; letter-spacing: -0.01em; }
.brand svg { width: 2.1rem; height: auto; }
.brand-tile { display: inline-flex; align-items: center; justify-content: center; width: 3.4rem; height: 3.4rem; padding: 0.3rem; border-radius: 10px; background: var(--paper); flex-shrink: 0; }
.brand-tile img { width: 100%; height: 100%; object-fit: contain; }
.brand:hover .brand-tile { box-shadow: 0 0 0 2px var(--aqua); }
.nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 1.4rem; margin: 0; padding: 0; }
.nav a { color: var(--aqua-pale); text-decoration: none; font-size: var(--step--1); padding-block: 0.3rem; border-bottom: 2px solid transparent; }
.nav a:hover { color: #fff; border-color: var(--aqua); }
.nav a[aria-current="page"] { color: #fff; border-color: var(--coral); }

/* Hero */
.hero { background: var(--river); color: #fff; padding-top: clamp(3rem, 8vw, 6rem); }
.hero-grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr; align-items: end; }
@media (min-width: 60rem) { .hero-grid { grid-template-columns: 1.6fr 1fr; } }
.hero h1 { max-width: 14ch; }
.hero .lede { font-size: var(--step-1); line-height: 1.5; max-width: 38ch; color: #e3f4f3; }
.next-meetup { border-left: 4px solid var(--coral); padding: 0.25rem 0 0.25rem 1.25rem; }
.next-meetup h2 { font-size: var(--step-1); font-stretch: 100%; margin-bottom: 0.4rem; color: var(--aqua); font-weight: 600; }
.next-meetup .date { font-family: var(--display); font-size: var(--step-2); font-weight: 750; font-stretch: 110%; line-height: 1.15; margin-bottom: 0.4rem; }
.next-meetup p { color: #e3f4f3; }
.waves { display: block; margin-bottom: -1px; width: 100%; height: clamp(60px, 9vw, 120px); margin-top: clamp(2.5rem, 6vw, 4.5rem); }

.page-hero { background: var(--river); color: #fff; padding-top: clamp(2.5rem, 6vw, 4rem); }
.page-hero h1 { font-size: var(--step-3); font-stretch: 115%; max-width: 20ch; }
.page-hero p { color: #e3f4f3; max-width: 55ch; font-size: var(--step-1); line-height: 1.5; }
.page-hero .waves { height: clamp(40px, 6vw, 80px); margin-top: 2rem; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.btn { display: inline-block; font-family: var(--display); font-weight: 700; font-stretch: 105%; font-size: 1rem; padding: 0.8rem 1.35rem; border-radius: 3px; text-decoration: none; border: 2px solid transparent; }
.btn-gold { background: var(--coral); color: var(--ink); }
.btn-gold:hover { background: #ff866a; }
.btn-line { border-color: #fff; color: #fff; }
.btn-line:hover { background: rgba(255,255,255,0.1); }
.btn-river { background: var(--river); color: #fff; }
.btn-river:hover { background: var(--river-deep); }

/* Sections */
section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.mist { background: var(--mist); }
.section-intro { max-width: 52ch; margin-bottom: 2.5rem; }
.section-intro p { color: var(--ink-soft); font-size: var(--step-1); line-height: 1.5; }

/* Evening timeline — a real sequence, so times are used as markers */
.evening { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.evening li { display: grid; grid-template-columns: 1fr; gap: 0.25rem 2rem; padding-block: 1.75rem; border-top: 1px solid var(--line); }
.evening li:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 48rem) { .evening li { grid-template-columns: 9rem 1fr 14rem; align-items: baseline; } }
.evening li:first-child time { color: var(--coral-deep); }
.evening time { font-family: var(--display); font-weight: 750; font-stretch: 110%; font-size: var(--step-2); color: var(--river); }
.evening h3 { margin-bottom: 0.3rem; }
.evening p { margin: 0; color: var(--ink-soft); max-width: 50ch; }
.evening .who { font-size: var(--step--1); color: var(--ink); }
.evening .who strong { display: block; font-family: var(--display); font-stretch: 100%; }

/* The rule */
.rule { background: var(--river-deep); color: #fff; }
.rule-grid { display: grid; gap: 2rem; }
@media (min-width: 56rem) { .rule-grid { grid-template-columns: 1.2fr 1fr; align-items: center; } }
.rule .statement { font-family: var(--display); font-size: clamp(2.2rem, 6vw, 3.8rem); font-weight: 800; font-stretch: 120%; line-height: 1.02; letter-spacing: -0.02em; margin: 0; }
.rule p { color: var(--aqua-pale); font-size: var(--step-1); line-height: 1.5; margin: 0; max-width: 42ch; }

/* Post lists */
.posts { list-style: none; margin: 0; padding: 0; }
.posts li { padding-block: 1.4rem; border-top: 1px solid var(--line); display: grid; gap: 0.3rem; }
.posts li:last-child { border-bottom: 1px solid var(--line); }
.posts a.title { font-family: var(--display); font-size: var(--step-1); font-weight: 700; color: var(--ink); text-decoration: none; }
.posts a.title:hover { color: var(--river); text-decoration: underline; }
.posts .meta { font-size: var(--step--1); color: var(--ink-soft); }
.posts p { margin: 0; color: var(--ink-soft); max-width: 60ch; }
.tag { display: inline-block; font-size: 0.8rem; padding: 0.05rem 0.55rem; border-radius: 99px; background: var(--mist); color: var(--river-deep); border: 1px solid var(--line); margin-right: 0.4rem; }

/* Article */
.article { padding-block: clamp(2.5rem, 6vw, 4rem); }
.article .prose { font-size: 1.125rem; line-height: 1.7; }
.article h2 { font-size: var(--step-2); margin-top: 2em; }
.article .byline { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }

/* Two-column helpers */
.split { display: grid; gap: 2.5rem; }
@media (min-width: 52rem) { .split { grid-template-columns: 1fr 1fr; } }
.panel { border-top: 4px solid var(--river); padding-top: 1.25rem; }
.panel.gold { border-color: var(--coral); }

/* Resources */
.links { list-style: none; margin: 0 0 2.5rem; padding: 0; }
.links li { padding: 1rem 0; border-top: 1px solid var(--line); }
.links li:last-child { border-bottom: 1px solid var(--line); }
.links a { font-weight: 700; }
.links p { margin: 0.2rem 0 0; color: var(--ink-soft); }

/* Notice for placeholders — delete once filled in */
.todo { background: #fff0ec; border: 1px dashed var(--coral); padding: 0.1rem 0.35rem; border-radius: 2px; color: var(--ink); }
.hero .todo, .page-hero .todo, .rule .todo, .site-footer .todo { background: rgba(255,107,74,0.2); color: #fff; }

/* Footer */
.site-footer { background: var(--ink); color: #bfd3d2; padding-block: 3rem 2rem; font-size: var(--step--1); }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 48rem) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h2 { font-size: 1rem; font-stretch: 100%; color: #fff; margin-bottom: 0.6rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.35rem; }
.site-footer .small { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid #21393d; color: #93abaa; }

@media (prefers-reduced-motion: no-preference) {
  .waves .w1 { animation: drift 14s ease-in-out infinite alternate; }
}
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-40px); } }

@media print {
  .site-header, .site-footer, .waves, .actions { display: none; }
  body { color: #000; }
}

/* Page helpers */
.big-date { font-family: var(--display); font-size: var(--step-2); font-weight: 750; font-stretch: 110%; line-height: 1.2; }
.post-title { font-size: var(--step-3); font-stretch: 112%; }
.more { margin-top: 1.5rem; }

/* ---------- Admin ---------- */
.admin .site-header .wrap { padding-block: 0.75rem; }
.admin .brand { font-size: 1.1rem; }
.admin form.inline { display: flex; gap: 1.25rem; align-items: center; margin: 0; }
.admin .nav-link, .admin .linkish { color: var(--aqua-pale); font: inherit; font-size: var(--step--1); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 0.18em; }
.admin-main { padding-block: 2.5rem 5rem; max-width: 60rem; }
.admin-main h1 { font-size: var(--step-3); font-stretch: 110%; }
.admin-form fieldset { border: 1px solid var(--line); border-top: 4px solid var(--river); padding: 1.25rem 1.5rem 0.5rem; margin: 0 0 2rem; border-radius: 3px; }
.admin-form legend { font-family: var(--display); font-weight: 700; font-size: var(--step-1); padding: 0 0.4rem; }
.admin-form.narrow { max-width: 26rem; }
.field { margin-bottom: 1.1rem; display: grid; gap: 0.3rem; }
.field label { font-weight: 700; font-size: 0.95rem; }
.field small, .hint { color: var(--ink-soft); font-size: var(--step--1); }
.field input[type=text], .field input[type=url], .field input[type=date], .field input[type=time], .field input[type=password], .field textarea {
  font: inherit; font-size: 1rem; padding: 0.55rem 0.7rem; border: 1px solid #9cb5b3; border-radius: 3px; background: #fff; color: var(--ink); width: 100%;
}
.field input:focus, .field textarea:focus { border-color: var(--river); }
.field.check label { font-weight: 400; display: flex; gap: 0.5rem; align-items: center; }
.grid2, .grid3 { display: grid; gap: 0 1.25rem; }
@media (min-width: 40rem) { .grid2 { grid-template-columns: 1fr 1fr; } .grid3 { grid-template-columns: repeat(3, 1fr); } }
.past-row { display: grid; gap: 0 1rem; padding-top: 0.75rem; border-top: 1px dashed var(--line); }
@media (min-width: 44rem) { .past-row { grid-template-columns: 10rem 1fr 1fr 6rem; align-items: start; } .past-row .check { padding-top: 2rem; } }
.post-row { padding-top: 0.75rem; border-top: 1px dashed var(--line); display: grid; gap: 0 1rem; }
@media (min-width: 44rem) { .post-row { grid-template-columns: 1fr 12rem 8rem; align-items: center; } .post-row .check { padding-top: 1.6rem; } }
.post-row p { margin: 0; }
.save-bar { position: sticky; bottom: 0; background: rgba(255,255,255,0.95); padding: 1rem 0; border-top: 1px solid var(--line); }
.btn { cursor: pointer; }
button.btn { font-family: var(--display); }
.admin-box { padding: 1.5rem 0 0; margin-top: 2rem; border-top: 1px solid var(--line); }
.admin-box h2 { font-size: var(--step-2); }
.flash { padding: 0.8rem 1rem; border-radius: 3px; margin-bottom: 1.5rem; }
.flash-ok { background: #e3f3e8; border-left: 4px solid #2f7d4a; }
.flash-error { background: #fbe9e7; border-left: 4px solid #b3261e; }
.log { background: var(--mist); padding: 1rem; font-size: 0.85rem; overflow-x: auto; border-radius: 3px; }
code { background: var(--mist); padding: 0.05rem 0.3rem; border-radius: 2px; font-size: 0.95em; }

/* Sponsors */
.sponsors-strip { padding-block: 2.5rem 3rem; border-top: 1px solid var(--line); }
.sponsors-strip h2 { font-size: var(--step-1); font-stretch: 100%; color: var(--ink-soft); font-weight: 600; margin-bottom: 1.25rem; }
.sponsor-row { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; align-items: center; margin-bottom: 1.25rem; }
.sponsors-strip p { font-size: var(--step--1); max-width: 70ch; margin: 0; }
.sponsor { display: inline-flex; align-items: center; justify-content: center; width: 12rem; height: 5rem; text-decoration: none; }
.sponsor img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-placeholder { display: flex; align-items: center; justify-content: center; text-align: center; width: 100%; height: 100%; padding: 0.5rem;
  border: 2px dashed #9cb5b3; border-radius: 4px; color: var(--river-deep); font-family: var(--display); font-weight: 750; font-stretch: 110%; font-size: 1.05rem; line-height: 1.15; background: var(--mist); }
a.sponsor:hover .logo-placeholder { border-color: var(--river); }
.sponsor-list { list-style: none; padding: 0; margin: 0 0 2rem; }
.sponsor-list li { display: grid; gap: 1rem 1.5rem; padding-block: 1.25rem; border-top: 1px solid var(--line); align-items: center; }
.sponsor-list li:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 36rem) { .sponsor-list li { grid-template-columns: 12rem 1fr; } }
.sponsor-list p { margin: 0.2rem 0 0; color: var(--ink-soft); }
.sponsor-row-admin { display: grid; gap: 0 1rem; padding-top: 0.75rem; border-top: 1px dashed var(--line); }
@media (min-width: 44rem) { .sponsor-row-admin { grid-template-columns: 1fr 1fr; } }
.sponsor-row-admin .full { grid-column: 1 / -1; }
.sponsor-row-admin .checks { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.logo-preview { display: flex; align-items: center; gap: 1rem; }
.logo-preview .sponsor { width: 9rem; height: 4rem; }

/* Scrolling stripe */
.ticker { background: var(--aqua); color: var(--river-deep); padding-block: 0; overflow: hidden; border-block: 3px solid var(--river-deep); }
.ticker-track { display: flex; width: max-content; }
.ticker-group { display: flex; flex-shrink: 0; list-style: none; margin: 0; padding: 0; }
.ticker-group li { display: flex; align-items: center; gap: 1.75rem; padding: 1.1rem 0 1.1rem 1.75rem; white-space: nowrap;
  font-family: var(--display); font-weight: 750; font-stretch: 112%; font-size: clamp(1.05rem, 2.2vw, 1.4rem); letter-spacing: -0.005em; }
.ticker-mark { width: 1.9rem; height: auto; color: var(--coral-deep); flex-shrink: 0; }

@media (prefers-reduced-motion: no-preference) {
  .ticker-track { animation: ticker-scroll linear infinite; }
  .ticker-short .ticker-track { animation-duration: 28s; }
  .ticker-mid .ticker-track { animation-duration: 45s; }
  .ticker-long .ticker-track { animation-duration: 65s; }
  .ticker:hover .ticker-track, .ticker:focus-within .ticker-track { animation-play-state: paused; }
}
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Visitors who prefer less motion get a still, wrapped band */
@media (prefers-reduced-motion: reduce) {
  .ticker-track { display: block; width: auto; }
  .ticker-group { flex-wrap: wrap; flex-shrink: 1; justify-content: center; column-gap: 0; padding: 0.5rem var(--gutter); }
  .ticker-group[aria-hidden="true"] { display: none; }
  .ticker-group li { padding-block: 0.35rem; white-space: normal; gap: 1rem; padding-left: 1rem; }
}

/* Hide the sub-pixel seam where the hero waves meet the next section */
.hero + *, .page-hero + * { position: relative; margin-top: -2px; border-top: 2px solid var(--paper); }
.hero + .mist, .page-hero + .mist { border-top-color: var(--mist); }
