/*
Theme Name: VENU Foundation
Theme URI: https://venufoundation.org
Author: Brendan Lawn
Description: Custom theme for the VENU Arts & Culture Foundation. Ported from the approved hi-fi designs (July 2026).
Version: 0.2.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: venufoundation
*/

/* -------------------------------------------------------------------------- */
/* Table of Contents                                                          */
/* 1. Design Tokens                                                            */
/* 2. Base                                                                     */
/* 3. Type Scale                                                               */
/* 4. Buttons & Links                                                          */
/* 5. Form Controls                                                            */
/* 6. Rich Text Column                                                         */
/* 7. Generic Page Chrome (used until ACF blocks exist)                        */
/* -------------------------------------------------------------------------- */

/* 0. Self-hosted fonts (variable woff2 from Google Fonts, OFL, latin subset)
   No external font requests — GDPR / Cookiebot. */
@font-face {
  font-family: "Sofia Sans Condensed";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/sofia-sans-condensed.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/public-sans.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* 1. Design Tokens
   Values extracted verbatim from the hi-fi HTML. No border-radius anywhere. */
:root {
  /* Surfaces */
  --bg: #fdfdfc;
  --bg-tint: #f2f3f6;
  --bg-dark: #0d0e12;
  --bg-brand: #4262ae;
  --bg-input: #ffffff;
  --header-bg: rgba(253, 253, 252, 0.94);

  /* Text */
  --ink: #1b1d24;
  --text-nav: #3c4152;
  --text-2: #5a6175;
  --text-muted: #6a7186;
  --text-utility: #7a8093;
  --text-eyebrow: #8a93aa;
  --text-arrow: #b4bac8;
  --on-dark: #b8bfd2;
  --on-dark-hero: #dbe0ec;
  --on-blue: #d5def2;
  --on-image-caption: #d7dbe6;

  /* Brand */
  --brand: #4262ae;
  --brand-hover: #2c4377;
  --brand-light: #9db8ec;
  --brand-tint: #eef1f8;
  --brand-tag: #c3d2f2;
  --white-hover: #e8edf8;

  /* Lines */
  --line: #e4e6ea;
  --line-soft: #ecedf0;
  --line-card: #dfe2e9;
  --line-row: #d9dce4;
  --line-input: #c9cdd8;

  /* Image overlays: rgba(var(--overlay-rgb), .72) etc. Stops used: 0 .05 .15 .22 .30 .40 .65 .72 .78 */
  --overlay-rgb: 13, 14, 18;

  /* Type */
  --font-display: "Sofia Sans Condensed", Arial, sans-serif;
  --font-body: "Public Sans", Arial, sans-serif;

  /* Shape */
  --radius: 0;

  /* Layout */
  --container: 1240px;
  --gutter: 40px;
  --header-logo-height: 64px; /* header logo (navigation.css) */
  --logo-height: 48px;        /* footer logo (footer.css) */
  --site-header-height: 93px; /* header logo + 14px padding ×2 + 1px border */
  --admin-bar-offset: 0px;
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-right: env(safe-area-inset-right, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-left: env(safe-area-inset-left, 0px);
}

@media (max-width: 640px) {
  :root {
    --gutter: 20px;
    --header-logo-height: 52px;
    --logo-height: 40px;
    --site-header-height: 81px;
  }
}

/* 2. Base */
html {
  background-color: var(--bg);
  overscroll-behavior-y: none;
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  overflow-x: hidden;
}

@supports (overflow: clip) {
  html,
  body {
    overflow-x: clip;
  }
}

body.admin-bar {
  min-height: calc(100vh - 32px);
  --admin-bar-offset: 32px;
}

@media (max-width: 782px) {
  body.admin-bar {
    min-height: calc(100vh - 46px);
    --admin-bar-offset: 46px;
  }
}

/* WP core makes #wpadminbar position:absolute at ≤600px (it scrolls away), so
   the sticky header must not reserve space for it there. */
@media (max-width: 600px) {
  body.admin-bar {
    --admin-bar-offset: 0px;
  }
}

main {
  flex: 1 0 auto;
}

.site-footer {
  margin-top: auto;
}

::selection {
  background: var(--brand);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 4px;
}

/* 3. Type Scale
   Display face for every heading, eyebrow, nav, button and number.
   Element defaults + class equivalents so blocks can pick a size without
   changing the semantic level. */
h1, h2, h3, h4, h5, h6,
.h-hero, .h-page, .h-story, .h-section, .h-feature, .h-band,
.h-card, .h-card-lg, .h-person, .statement, .pull-quote,
.eyebrow, .label, .meta {
  font-family: var(--font-display);
  margin: 0;
  text-transform: uppercase;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--ink);
  text-wrap: balance;
}

h1, .h-page {
  font-weight: 800;
  font-size: clamp(52px, 7vw, 96px);
  line-height: 0.96;
}

.h-hero {
  font-weight: 800;
  font-size: clamp(58px, 8.5vw, 112px);
  line-height: 0.96;
  letter-spacing: 0.01em;
  max-width: 12em;
}

.h-story {
  font-weight: 800;
  font-size: clamp(44px, 5.6vw, 78px);
  line-height: 0.98;
  max-width: 15em;
}

h2, .h-section {
  font-weight: 700;
  font-size: clamp(32px, 3.6vw, 44px);
  line-height: 1.02;
}

.h-feature {
  font-weight: 700;
  font-size: clamp(38px, 4.5vw, 56px);
  line-height: 1.02;
}

.h-band {
  font-weight: 700;
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.05;
}

h3 {
  font-weight: 700;
  font-size: 30px;
  line-height: 1.1;
}

h4 {
  font-weight: 700;
  font-size: 26px;
  line-height: 1.1;
}

h5, h6 {
  font-weight: 700;
  font-size: 19px;
  line-height: 1.2;
}

.h-card {
  font-weight: 700;
  font-size: 24px;
  line-height: 1.05;
}

.h-card-lg {
  font-weight: 700;
  font-size: 27px;
  line-height: 1.02;
}

.h-person {
  font-weight: 700;
  font-size: 22px;
  line-height: 1.1;
}

.statement {
  font-weight: 600;
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.25;
  text-transform: none;
  text-wrap: balance;
}

.pull-quote {
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.15;
  color: var(--brand);
}

.eyebrow {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.3em;
  color: var(--brand);
}

.label {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.3em;
  color: var(--text-eyebrow);
}

.meta {
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--brand);
}

/* Captions use the body face (readable at small sizes) and set no margin, so
   .caption can sit on a .container element without breaking its centering. */
.caption {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-eyebrow);
}

.accent {
  color: var(--brand);
}

.accent-light {
  color: var(--brand-light);
}

/* Body copy sizes */
p {
  margin: 0;
}

.lead {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-2);
}

.lead-lg {
  font-size: 20px;
  line-height: 1.65;
  font-weight: 500;
  color: var(--ink);
}

.prose {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-nav);
}

.prose-story {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-nav);
}

.small {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

.fine {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-eyebrow);
}

strong, b {
  font-weight: 600;
  color: var(--ink);
}

/* 4. Buttons & Links
   Square, 2px border, display face. Hover variants depend on the surface:
   wrap dark/blue sections in .on-dark / .on-blue (see utilities.css). */
.btn,
.wp-block-button__link {
  display: inline-block;
  padding: 13px 30px;
  border: 2px solid var(--brand);
  border-radius: var(--radius);
  background-color: var(--brand);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover,
.btn:focus-visible,
.wp-block-button__link:hover,
.wp-block-button__link:focus-visible {
  background-color: var(--brand-hover);
  border-color: var(--brand-hover);
  color: #fff;
}

.btn--outline {
  background-color: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.btn--outline:hover,
.btn--outline:focus-visible {
  background-color: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.btn--ghost {
  background-color: transparent;
  border-color: #fff;
  color: #fff;
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  background-color: rgba(255, 255, 255, 0.14);
  border-color: #fff;
  color: #fff;
}

.on-dark .btn--ghost:hover,
.on-dark .btn--ghost:focus-visible {
  background-color: #fff;
  color: var(--bg-dark);
}

.on-blue .btn--ghost:hover,
.on-blue .btn--ghost:focus-visible {
  background-color: #fff;
  color: var(--brand);
}

.btn--white {
  background-color: #fff;
  border-color: #fff;
  color: var(--brand);
}

.btn--white:hover,
.btn--white:focus-visible {
  background-color: var(--white-hover);
  border-color: var(--white-hover);
  color: var(--brand);
}

.btn--muted {
  background-color: transparent;
  border-color: var(--line-input);
  color: var(--text-muted);
}

.btn--muted:hover,
.btn--muted:focus-visible {
  background-color: transparent;
  border-color: var(--brand);
  color: var(--brand);
}

.btn--sm {
  font-size: 14px;
  padding: 10px 22px;
}

.btn--block {
  display: block;
  width: 100%;
  font-size: 17px;
  padding: 16px 0;
}

/* Amount chip (donation picker). State via aria-pressed. */
.chip {
  display: inline-block;
  padding: 13px 22px;
  border: 1px solid var(--line-input);
  border-radius: var(--radius);
  background-color: #fff;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.chip:hover,
.chip:focus-visible {
  border-color: var(--brand);
  color: var(--brand);
}

.chip[aria-pressed="true"] {
  background-color: var(--brand-tint);
  border-color: var(--brand);
  color: var(--brand);
}

.chip--lg {
  padding: 16px 0;
  width: 100%;
  font-size: 19px;
  text-align: center;
}

/* External-link arrow drawn as an SVG mask (never the ↗ character — iOS
   renders emoji-capable arrows with the emoji font). Add .icon-ext to a link. */
.icon-ext::after {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 0.55em;
  margin-left: 0.35em;
  vertical-align: 0.05em;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 9L9 3M4 3h5v5' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 9L9 3M4 3h5v5' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Text link CTA: "More about us →" */
.link-cta {
  display: inline-block;
  padding-bottom: 2px;
  border-bottom: 2px solid var(--brand);
  color: var(--brand);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.link-cta--plain {
  border-bottom: 0;
}

.link-cta:hover,
.link-cta:focus-visible {
  color: var(--brand-hover);
  border-color: var(--brand-hover);
}

/* 5. Form Controls
   Used by native forms, the donate picker, and HubSpot raw-HTML forms. */
.form-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px;
  background-color: #fff;
  border: 1px solid var(--line-card);
}

.form-card--lg {
  padding: 40px;
}

.form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-nav);
}

.input,
.select,
.textarea,
.form-card input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
.form-card select,
.form-card textarea {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line-input);
  border-radius: var(--radius);
  background-color: var(--bg-input);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
}

.input:focus,
.select:focus,
.textarea:focus,
.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus {
  outline: 2px solid var(--brand);
  outline-offset: 0;
  border-color: var(--brand);
}

.input--inline {
  padding: 13px 16px;
}

.select,
.form-card select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236a7186' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.textarea,
.form-card textarea {
  resize: vertical;
  min-height: 7em;
}

.dropzone {
  padding: 22px;
  border: 1.5px dashed var(--line-input);
  text-align: center;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-eyebrow);
}

.dropzone a,
.dropzone button {
  color: var(--brand);
  font-weight: 600;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 600;
}

.inline-form {
  display: flex;
  gap: 10px;
}

.inline-form .input,
.inline-form input {
  flex: 1;
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .inline-form {
    flex-direction: column;
  }
}

/* 6. Rich Text Column
   WYSIWYG / story prose. 720px measure, story prose values. */
.content {
  max-width: 720px;
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-nav);
}

.content > * + * {
  margin-top: 22px;
}

.content h2 {
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.05;
  margin-top: 40px;
}

.content h3 {
  font-size: 24px;
  margin-top: 32px;
}

.content a:not(.btn):not(.wp-block-button__link):not(.link-cta) {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.content a:not(.btn):not(.wp-block-button__link):not(.link-cta):hover,
.content a:not(.btn):not(.wp-block-button__link):not(.link-cta):focus-visible {
  color: var(--brand-hover);
}

.content ul,
.content ol {
  padding-left: 1.5rem;
}

.content ul { list-style: disc; }
.content ol { list-style: decimal; }

.content li + li {
  margin-top: 8px;
}

.content blockquote {
  margin: 0;
  padding: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.15;
  text-transform: uppercase;
  text-align: center;
  color: var(--brand);
}

.content blockquote cite {
  display: block;
  margin-top: 18px;
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.22em;
  color: var(--text-eyebrow);
}

.content figcaption,
.content .wp-element-caption {
  margin-top: 12px;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-eyebrow);
}

.content hr {
  border-top: 1px solid var(--line);
  opacity: 1;
}

/* 7. Generic Page Chrome
   Title + content only. Replaced by flexible-content blocks once ACF is in. */
.page-hero {
  padding: 96px 0 20px;
}

.page-hero .lead {
  max-width: 750px;
  margin-top: 24px;
}

.page-body {
  padding: 40px 0 90px;
}

.page-body--full {
  padding-top: 0;
}

.error-404 .page-hero {
  padding-bottom: 32px;
}

.error-404 .page-body {
  max-width: 560px;
}

.error-404 .btn {
  margin-top: 28px;
}

@media (max-width: 640px) {
  .page-hero {
    padding-top: 64px;
  }

  .page-body {
    padding-bottom: 64px;
  }
}
