/*
  KiwiHookups.co.nz — design notes
  Subject: independent NZ hookup/casual-dating noticeboard, not a dating-app clone.
  Concept: newspaper personals column / corkboard noticeboard, not "app UI".
  No classes added to templates — every rule below targets bare tags,
  structural position, or attributes Hugo already emits (rel="sponsored").
*/

:root {
  --ink: #0e1a17;
  --panel: #16302a;
  --paper: #ede7dc;
  --pounamu: #4fc2ae;
  --pohutukawa: #e14f2a;
  --line: #2a4a42;

  --display: "Arial Narrow", "Helvetica Neue Condensed", "Liberation Sans Narrow", sans-serif;
  --body: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}

html {
  color-scheme: dark;
}

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---- masthead ---- */

header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

header > a:first-child {
  font-family: var(--display);
  font-weight: 700;
  font-stretch: condensed;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--paper);
  text-decoration: none;
}

header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

header nav a {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pounamu);
  text-decoration: none;
  padding-bottom: 0.15rem;
  background-image: linear-gradient(var(--pounamu), var(--pounamu));
  background-repeat: no-repeat;
  background-size: 0 1px;
  background-position: left bottom;
  transition: background-size 0.15s ease-out;
}

header nav a:hover,
header nav a:focus-visible {
  background-size: 100% 1px;
}

/* ---- main column ---- */

main {
  max-width: 42rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

main > h1:first-child {
  font-family: var(--display);
  font-weight: 700;
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.05;
  margin: 0 0 0.75rem;
}

main > h1:first-child + p {
  font-size: 1.1875rem;
  color: color-mix(in srgb, var(--paper) 80%, var(--pounamu));
  max-width: 34rem;
  margin: 0 0 2.25rem;
}

/* ---- homepage noticeboard ---- */

main > ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

main > ul > li {
  position: relative;
  border-radius: 2px;
  background: var(--panel);
  background-image: repeating-linear-gradient(
    to bottom,
    var(--line) 0 6px,
    transparent 6px 13px
  );
  background-size: 3px 100%;
  background-repeat: no-repeat;
  background-position: left top;
}

main > ul > li::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--pohutukawa), #8f2c14);
  transform: translateY(-50%);
  box-shadow: 0 0 0 3px var(--ink);
}

main > ul > li a {
  display: block;
  padding: 1.1rem 1.5rem 1.1rem 2rem;
  color: var(--paper);
  text-decoration: none;
  font-size: 1.0625rem;
}

main > ul > li a::after {
  content: " \2192";
  color: var(--pounamu);
}

main > ul > li:hover,
main > ul > li:has(a:focus-visible) {
  background-color: color-mix(in srgb, var(--panel) 80%, var(--pounamu) 20%);
}

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

article h1 {
  font-family: var(--display);
  font-weight: 700;
  font-stretch: condensed;
  text-transform: uppercase;
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  line-height: 1.1;
  margin: 0 0 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed var(--line);
}

article h2 {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pounamu);
  margin: 2.25rem 0 0.75rem;
}

article h2::before {
  content: "\2014 ";
}

article p {
  margin: 0 0 1.25rem;
}

article > p:first-of-type {
  font-size: 1.1875rem;
}

article a:not([rel~="sponsored"]) {
  color: var(--pounamu);
  text-decoration-color: color-mix(in srgb, var(--pounamu) 50%, transparent);
  text-underline-offset: 0.2em;
}

article strong {
  color: var(--paper);
}

/* ---- sponsored CTA (Hugo's rel="sponsored" render-hook, no class needed) ---- */

a[rel~="sponsored"] {
  display: inline-block;
  margin: 0.5rem 0 1.5rem;
  padding: 0.85rem 1.5rem;
  background: var(--pohutukawa);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-radius: 2px;
  box-shadow: 0 2px 0 #8f2c14;
  transition: transform 0.1s ease-out, box-shadow 0.1s ease-out;
}

a[rel~="sponsored"]:hover,
a[rel~="sponsored"]:focus-visible {
  transform: translateY(1px);
  box-shadow: 0 1px 0 #8f2c14;
}

/* ---- footer ---- */

footer {
  padding: 2rem 1.5rem;
  background: var(--panel);
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: color-mix(in srgb, var(--paper) 70%, transparent);
}

footer p {
  max-width: 42rem;
  margin: 0 auto 0.75rem;
}

footer nav {
  max-width: 42rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

footer nav a,
footer p a {
  color: var(--pounamu);
}

/* ---- focus + motion ---- */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--pounamu);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  header nav a,
  a[rel~="sponsored"] {
    transition: none;
  }
}

@media (max-width: 30rem) {
  header {
    padding: 1rem;
  }

  main {
    padding: 1.75rem 1rem 3rem;
  }
}
