/* wellsroad.ca - crisp, technical. Navy ink, teal accent, amber "road line" highlights. */
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --text: #0f1b2d;
  --muted: #566275;
  --border: #dfe4eb;
  --accent: #0b7a75;
  --accent-ink: #ffffff;
  --link: #0b6f6a;
  --focus: #f2a900;
  --amber: #f2a900;

  --header-bg: rgba(255, 255, 255, .88);
  --hero-bg: #0f1b2d;
  --hero-text: #f4f7fb;
  --footer-bg: #0f1b2d;
  --footer-text: #aeb8c6;

  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: var(--font-body);
  --heading-weight: 700;
  --heading-tracking: -0.025em;
  --radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --surface: #111a2b;
    --surface-2: #172236;
    --text: #e7ecf3;
    --muted: #9aa6b8;
    --border: #233049;
    --accent: #2fb8ad;
    --accent-ink: #062321;
    --link: #48c9be;
    --header-bg: rgba(11, 18, 32, .88);
    --hero-bg: #070d18;
    --footer-bg: #070d18;
  }
}

body { font-feature-settings: "cv11", "ss01"; }
.site-header { backdrop-filter: saturate(1.6) blur(10px); -webkit-backdrop-filter: saturate(1.6) blur(10px); }
.brand__name { letter-spacing: -0.02em; }

/* Technical details in monospace */
.meta, .eyebrow, .tag, .sidebar__title, .pagination__status, .entry__nav a span { font-family: var(--font-mono); letter-spacing: 0; }
.eyebrow, .sidebar__title { text-transform: none; font-size: .8rem; }
.tag { border-radius: var(--radius-sm); background: transparent; }
.status { color: var(--accent); }
.status--archived, .status--complete { color: var(--muted); }

/* Hero: navy grid with an amber road-line */
.hero { background-color: var(--hero-bg); background-image: url("hero-pattern.svg"), radial-gradient(1200px 500px at 85% -10%, rgba(11, 122, 117, .45), transparent 60%); }
.hero__inner { padding-block: clamp(3.5rem, 11vw, 7.5rem); }
.hero__eyebrow { font-family: var(--font-mono); font-size: .85rem; color: #c9d3e0; margin: 0 0 1.25rem; display: flex; align-items: center; gap: .75rem; }
.hero__eyebrow::before { content: ""; width: 28px; height: 3px; border-radius: 2px; background: var(--amber); box-shadow: 40px 0 0 var(--amber); margin-right: 40px; }
.hero__heading { max-width: 20ch; }
.hero__text { color: #c9d3e0; opacity: 1; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.hero .button { background: var(--amber); border-color: var(--amber); color: #1a1300; }
.hero .button--ghost { background: transparent; color: #f4f7fb; border-color: rgba(255, 255, 255, .35); }
.hero .button--ghost:hover { border-color: #fff; filter: none; }

/* Home: compact post list */
.post-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.post-rows li { border-bottom: 1px solid var(--border); }
.post-rows a { display: grid; gap: .15rem 1.5rem; padding: 1rem 0; color: inherit; text-decoration: none; }
.post-rows a:hover .post-rows__title { color: var(--accent); }
.post-rows__title { font-weight: 600; font-size: var(--step-1); letter-spacing: -0.015em; line-height: 1.3; }
.post-rows__excerpt { color: var(--muted); font-size: .95rem; }
.post-rows time { font-family: var(--font-mono); font-size: .82rem; color: var(--muted); }
@media (min-width: 760px) {
  .post-rows a { grid-template-columns: 150px 1fr; }
  .post-rows time { grid-row: 1 / span 2; padding-top: .3rem; }
}

.section--alt { background: var(--surface); border-block: 1px solid var(--border); }
.project-card { box-shadow: 0 1px 2px rgba(15, 27, 45, .04); }
.project-card__placeholder { background: linear-gradient(135deg, var(--surface-2), var(--surface)); color: var(--accent); font-family: var(--font-mono); }

/* Dark footer */
.site-footer { border-top: 0; }
.site-footer__title { color: #f4f7fb; }
.site-footer a:hover { color: #fff; }

.prose blockquote { border-left-color: var(--amber); }
.button:not(.button--ghost):hover { filter: brightness(1.1); }

/* The WellsRoad badge as the header mark */
.brand__mark { width: 44px; height: 44px; border-radius: 50%; }
@media (prefers-color-scheme: dark) {
  .brand__mark { box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); }
}

/* =====================================================================
   Home page: magazine layout (theme/views/public/home.ejs)
   ===================================================================== */
.page-mag { --navy: #0f1b2d; --card-shadow: 0 1px 2px rgba(15, 27, 45, .06), 0 2px 10px rgba(15, 27, 45, .05); }

/* Slim masthead band */
.masthead { background-color: var(--hero-bg); background-image: url("hero-pattern.svg"), radial-gradient(900px 300px at 90% -40%, rgba(11, 122, 117, .45), transparent 60%); color: var(--hero-text); }
.masthead__inner { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .5rem 2rem; padding-block: clamp(1.4rem, 4vw, 2.2rem); }
.masthead__eyebrow { font-family: var(--font-mono); font-size: .8rem; color: #c9d3e0; margin: 0 0 .5rem; display: flex; align-items: center; gap: .6rem; }
.masthead__eyebrow::before { content: ""; width: 22px; height: 3px; border-radius: 2px; background: var(--amber); box-shadow: 30px 0 0 var(--amber); margin-right: 30px; }
.masthead__title { font-size: var(--step-3); margin: 0; max-width: 24ch; }
.masthead__text { color: #c9d3e0; margin: .5rem 0 0; max-width: 60ch; font-size: 1rem; }
.masthead__date { font-family: var(--font-mono); font-size: .8rem; color: #9fb0c4; margin: 0; white-space: nowrap; }

/* Two columns: stories | sidebar */
.mag { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; padding-block: 1.5rem 3rem; }
@media (min-width: 980px) { .mag { grid-template-columns: minmax(0, 1fr) 320px; gap: 2rem; padding-top: 2rem; } }

/* Lead story: photo with the headline over it */
.mag-lead { border-radius: var(--radius); overflow: hidden; box-shadow: var(--card-shadow); background: var(--navy); }
.mag-lead__link { position: relative; display: block; color: #fff; text-decoration: none; aspect-ratio: 16 / 9; }
.mag-lead--noimg .mag-lead__link { aspect-ratio: auto; min-height: 15rem; background-image: url("hero-pattern.svg"), linear-gradient(135deg, #0f1b2d, #0b4f4c); }
.mag-lead__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.mag-lead__link:hover .mag-lead__img { transform: scale(1.02); }
.mag-lead__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 18, 30, 0) 35%, rgba(10, 18, 30, .82) 100%); }
.mag-lead--noimg .mag-lead__shade { display: none; }
.mag-lead__body { position: absolute; left: 0; right: 0; bottom: 0; padding: clamp(1rem, 3vw, 1.6rem); display: grid; gap: .4rem; }
.mag-lead--noimg .mag-lead__body { position: relative; padding-top: 3rem; }
.mag-lead__kicker { justify-self: start; background: var(--amber); color: #1a1300; font-family: var(--font-mono); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: .2rem .5rem; border-radius: 3px; }
.mag-lead__title { font-size: clamp(1.4rem, 1rem + 2vw, 2.3rem); font-weight: 750; letter-spacing: -0.02em; line-height: 1.15; text-shadow: 0 1px 12px rgba(0, 0, 0, .35); }
.mag-lead__excerpt { color: #dde4ee; max-width: 62ch; font-size: 1rem; line-height: 1.5; }
.mag-lead__meta { font-family: var(--font-mono); font-size: .78rem; color: #c9d3e0; }
@media (max-width: 600px) {
  .mag-lead__link { aspect-ratio: 4 / 3; }
  .mag-lead__excerpt { display: none; }
}

/* Story cards: coloured top strip + label, one big story, then a short list */
.mag-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; margin-top: 1.5rem; }
@media (min-width: 700px) { .mag-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mag-card { --strip: var(--accent); background: var(--surface); border-radius: var(--radius); box-shadow: var(--card-shadow); border-top: 4px solid var(--strip); overflow: hidden; display: flex; flex-direction: column; }
.mag-card--amber { --strip: var(--amber); }
.mag-card--navy { --strip: #3b5b8c; }
.mag-card__label { margin: 0; padding: .8rem 1.1rem; font-family: var(--font-mono); font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; border-bottom: 1px solid var(--border); }
.mag-card__label a { color: var(--strip); text-decoration: none; }
.mag-card--amber .mag-card__label a { color: #b07800; }
.mag-card__label span { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--muted); font-size: .8rem; }
.mag-card__media { display: block; aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
.mag-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.mag-card__media:hover img { transform: scale(1.03); }
.mag-card__body { padding: 1rem 1.1rem .4rem; }
.mag-card__title { font-size: 1.2rem; margin: 0 0 .3rem; line-height: 1.25; }
.mag-card__title a { color: var(--text); text-decoration: none; }
.mag-card__title a:hover { color: var(--accent); }
.mag-card__excerpt { color: var(--muted); font-size: .95rem; margin: .5rem 0 .6rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mag-meta { font-family: var(--font-mono); font-size: .75rem; color: var(--muted); margin: 0; }
.mag-ph { display: block; width: 100%; height: 100%; background-image: url("hero-pattern.svg"), linear-gradient(135deg, #0f1b2d, #0b4f4c); }
.mag-empty { padding: 1.5rem 1.1rem; margin: 0; }

/* Thumbnail lists (story cards and sidebar) */
.mag-list, .side-list { list-style: none; margin: 0; padding: 0; }
.mag-list li, .side-list li { border-top: 1px solid var(--border); }
.mag-list a, .side-list a { display: flex; gap: .8rem; align-items: flex-start; padding: .8rem 1.1rem; color: var(--text); text-decoration: none; }
.mag-list a:hover .mag-list__title, .side-list a:hover .side-list__name { color: var(--accent); }
.mag-thumb { flex: none; width: 56px; height: 56px; border-radius: 6px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; }
.mag-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mag-thumb > span { width: 100%; height: 100%; display: grid; place-items: center; font-family: var(--font-mono); font-weight: 700; color: #fff; background-image: linear-gradient(135deg, #0f1b2d, #0b4f4c); }
.mag-list__text, .side-list__text { display: grid; gap: .15rem; min-width: 0; }
.mag-list__title, .side-list__name { font-weight: 600; line-height: 1.3; }
.side-list__summary { color: var(--muted); font-size: .85rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.side-list__star { color: var(--amber); }
.mag__more { margin: 1.5rem 0 0; text-align: center; }

/* Sidebar boxes with navy header bars */
.mag__side { display: grid; gap: 1.5rem; align-content: start; }
.side-box { background: var(--surface); border-radius: var(--radius); box-shadow: var(--card-shadow); overflow: hidden; }
.side-box__title { margin: 0; padding: .75rem 1.1rem; background: var(--navy); color: #f4f7fb; font-family: var(--font-mono); font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; border-bottom: 3px solid var(--amber); }
.side-box__body { padding: 1rem 1.1rem; font-size: .95rem; color: var(--muted); }
.side-box__body p { margin: 0 0 .6rem; }
.side-box__body p:last-child { margin-bottom: 0; }
.side-box__more { margin: 0; padding: .7rem 1.1rem; border-top: 1px solid var(--border); font-weight: 600; font-size: .9rem; }
.side-box__more a, .side-box__links a { text-decoration: none; font-weight: 600; }
.side-tags { padding: 1rem 1.1rem; margin: 0; }
.side-tags .tag span { color: var(--muted); font-size: .72rem; margin-left: .15rem; }
@media (prefers-color-scheme: dark) {
  .page-mag { --navy: #070d18; }
  .mag-card--amber .mag-card__label a { color: var(--amber); }
}

/* Category colours (story card strips, sidebar dots) */
.mag-card--rose { --strip: #c2416b; }
.mag-card--green { --strip: #3f8f3a; }
.mag-card--slate { --strip: #64748b; }
.side-cats { list-style: none; margin: 0; padding: 0; }
.side-cats li { border-top: 1px solid var(--border); }
.side-cats li:first-child { border-top: 0; }
.side-cats a { display: flex; align-items: center; gap: .6rem; padding: .65rem 1.1rem; color: var(--text); text-decoration: none; font-weight: 600; }
.side-cats a:hover { color: var(--accent); }
.side-cats__n { margin-left: auto; font-family: var(--font-mono); font-size: .75rem; color: var(--muted); font-weight: 500; }
.side-cats__dot { width: 10px; height: 10px; border-radius: 3px; background: var(--accent); flex: none; }
.side-cats__dot--amber { background: var(--amber); } .side-cats__dot--navy { background: #3b5b8c; }
.side-cats__dot--rose { background: #c2416b; } .side-cats__dot--green { background: #3f8f3a; } .side-cats__dot--slate { background: #64748b; }
/* A project as the lead story: amber kicker becomes teal */
.mag-lead--project .mag-lead__kicker { background: var(--accent); color: #fff; }

/* Lead story whose image would crop badly: image whole on top, text below it */
.mag-lead--fit .mag-lead__link { aspect-ratio: auto; display: flex; flex-direction: column; }
.mag-lead__frame { display: block; aspect-ratio: 16 / 9; }
.mag-lead__frame--wide { aspect-ratio: 5 / 2; }
.mag-lead--fit .mag-lead__shade { display: none; }
.mag-lead--fit .mag-lead__body { position: relative; padding-top: 1rem; }
.mag-lead--fit .mag-lead__excerpt { display: block; }
@media (max-width: 600px) { .mag-lead--fit .mag-lead__link { aspect-ratio: auto; } }
