/* Listmonk — Public pages custom CSS
   Paste into: Settings → Appearance → Public → Custom CSS
   Brand tokens mapped from variables.css (ProVinylFencing design system). */

/* ── Geomanist font faces (hosted on Listmonk uploads) ────────────── */
@font-face {
  font-family: 'Geomanist';
  src: url('https://mail.provinylfencing.com/uploads/geomanist-thin-webfont.woff2') format('woff2');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geomanist';
  src: url('https://mail.provinylfencing.com/uploads/geomanist-extralight-webfont.woff2') format('woff2');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geomanist';
  src: url('https://mail.provinylfencing.com/uploads/geomanist-light-webfont.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geomanist';
  src: url('https://mail.provinylfencing.com/uploads/geomanist-regular-webfont.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geomanist';
  src: url('https://mail.provinylfencing.com/uploads/geomanist-medium-webfont.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geomanist';
  src: url('https://mail.provinylfencing.com/uploads/geomanist-bold-webfont.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geomanist';
  src: url('https://mail.provinylfencing.com/uploads/geomanist-black-webfont.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ── brand tokens (mirrored from variables.css) ───────────────────── */
:root {
  /* primary — vibrant red (the project's CTA color) */
  --primary:             oklch(0.5535529295 0.2227766819 21.416563725);
  --primary-hover:       oklch(0.637 0.223 21.416563725);
  --primary-semi-dark:   oklch(0.531001 0.223 21.416563725);
  --primary-dark:        oklch(0.419386 0.19 21.416563725);
  --primary-light:       oklch(0.901928 0.066 21.416563725);
  --primary-ultra-light: oklch(0.968062 0.02 21.416563725);

  /* accent — blue (used sparingly, e.g. focus ring support) */
  --accent:              oklch(0.4367700872 0.1420968974 254.6495577314);
  --accent-dark:         oklch(0.413227 0.142 254.6495577314);
  --accent-light:        oklch(0.905044 0.051 254.6495577314);

  /* base — near-black surface/text */
  --base:                oklch(0.201053462 0.0039447667 286.0395788544);
  --base-dark:           oklch(0.224444 0.004 286.0395788544);
  --base-ultra-light:    oklch(0.961687 0.004 286.0395788544);

  --secondary-ultra-light: oklch(0.952183 0.005 258.3247125136);

  /* surface / text */
  --surface:             #fff;
  --surface-muted:       var(--secondary-ultra-light);
  --text-dark:           var(--base);
  --text:                var(--text-dark);
  --text-muted:          color-mix(in srgb, var(--base) 55%, transparent);

  /* radius — mirrors --radius-s / --radius-l / --radius-circle */
  --radius-s:            0.8rem;
  --radius-m:            1.2rem;
  --radius-l:            1.8rem;
  --radius-card:         2.5rem;
  --radius-pill:         50vw;

  --shadow-card:         0 8px 40px color-mix(in srgb, #000 8%, transparent);

  /* links — project uses primary (red), not blue accent */
  --link-color:          var(--primary-semi-dark);
  --link-color-hover:    var(--primary-hover);

  /* focus — red, matches --focus-color: var(--primary) */
  --focus-color:         var(--primary);
}

/* ── base ─────────────────────────────────────────────────────────── */
html, body {
  font-family: 'Geomanist', system-ui, sans-serif;
  background: var(--surface-muted);
  color: var(--text);
  font-size: 16px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── page width constraint ─────────────────────────────────────────── */
body > section,
body > main,
body > .container,
.wrap, .box, .ui-box, .section {
  max-width: 560px;
  margin: 3rem auto;
}

/* ── card wrapper ──────────────────────────────────────────────────── */
.wrap, .box, .ui-box, .section > .container, main > .container {
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: clamp(2rem, 4vw, 3rem);
  border: 1px solid color-mix(in srgb, #000 6%, transparent);
}

/* ── typography ────────────────────────────────────────────────────── */
h1, h2, h3, h4, .title, .subtitle {
  font-family: 'Geomanist', sans-serif;
  font-weight: 700;
  color: var(--text);
  line-height: calc(4px + 2ex);
  text-wrap: balance;
}
h1, .title.is-1 { font-weight: 800; }
p {
  line-height: calc(6px + 2ex);
  color: var(--text);
  text-wrap: pretty;
  font-weight: 400;
}

/* ── logo normalization ───────────────────────────────────────────── */
.logo, header .logo, .site-header img,
.wrap img[src*="logo" i], .box img[src*="logo" i],
header img, h1 img, .brand img,
img[src$=".svg"][src*="Logo"] {
  max-width: 250px;
  max-height: 80px;
  height: auto;
  width: auto;
  object-fit: contain;
  margin: 0 auto 1.5rem;
  display: block;
}

/* ── links ─────────────────────────────────────────────────────────── */
a {
  color: var(--link-color);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color .3s ease-in-out;
}
@media (hover: hover) and (pointer: fine) {
  a:hover { color: var(--link-color-hover); }
}

/* ── buttons (Bulma-based) ─────────────────────────────────────────── */
.button, button[type="submit"], input[type="submit"] {
  font-family: 'Geomanist', sans-serif;
  font-weight: 450;
  text-transform: none;
  letter-spacing: 0;
  font-size: 1rem;
  line-height: 1;
  border-radius: var(--radius-s);
  border: 2px solid var(--primary);
  background: var(--primary);
  color: #fff;
  padding: 0.85em 1.75em;
  min-inline-size: 15rem;
  cursor: pointer;
  transition: background .3s ease-in-out, border-color .3s ease-in-out, color .3s ease-in-out, transform .1s ease;
  box-shadow: none;
  height: auto;
}
@media (hover: hover) and (pointer: fine) {
  .button:hover,
  button[type="submit"]:hover,
  input[type="submit"]:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #fff;
  }
}
.button:active { transform: translateY(1px); }

.button.is-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
@media (hover: hover) and (pointer: fine) {
  .button.is-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
  }
}

.button.is-danger {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
}
@media (hover: hover) and (pointer: fine) {
  .button.is-danger:hover {
    background: var(--base);
    border-color: var(--base);
  }
}

.button.is-light, .button.is-text {
  background: transparent;
  color: var(--base);
  border-color: color-mix(in srgb, #000 15%, transparent);
}
@media (hover: hover) and (pointer: fine) {
  .button.is-light:hover,
  .button.is-text:hover {
    background: var(--primary-ultra-light);
    border-color: var(--primary);
    color: var(--primary-semi-dark);
  }
}

/* ── inputs ────────────────────────────────────────────────────────── */
input[type="text"], input[type="email"], input[type="password"],
textarea, select, .input, .textarea {
  font-family: 'Geomanist', sans-serif;
  font-size: 1rem;
  font-weight: 400;
  border: 1px solid color-mix(in srgb, #000 15%, transparent);
  border-radius: var(--radius-s);
  padding: 0.85em 1em;
  background: #fff;
  color: var(--text);
  transition: border-color .2s, box-shadow .2s;
  box-shadow: none;
  width: 100%;
}
input:focus, textarea:focus, select:focus,
.input:focus, .textarea:focus {
  outline: none;
  border-color: var(--focus-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus-color) 25%, transparent);
}

/* keyboard focus on buttons/links — matches project's primary ring */
.button:focus-visible,
button[type="submit"]:focus-visible,
input[type="submit"]:focus-visible,
a:focus-visible {
  outline: 2px solid var(--focus-color);
  outline-offset: 2px;
}

/* ── labels ────────────────────────────────────────────────────────── */
label, .label {
  font-weight: 500;
  color: var(--text);
}

/* ── tables (archive, etc.) ────────────────────────────────────────── */
table { border-collapse: collapse; width: 100%; }
table th, table td {
  padding: 0.8em 0.6em;
  border-bottom: 1px solid color-mix(in srgb, #000 8%, transparent);
  text-align: left;
}
table th {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ── notifications ─────────────────────────────────────────────────── */
.notification, .message {
  border-radius: var(--radius-l);
  padding: 1rem 1.25rem;
  background: var(--primary-ultra-light);
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent);
}

/* ── footer ────────────────────────────────────────────────────────── */
footer, .footer, .powered {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── selection ─────────────────────────────────────────────────────── */
::selection { background: var(--primary-dark); color: #fff; }
