/* ==========================================================================
   Green Venture Advisory — brand layer
   Loaded on the front end and inside the block editor.

   theme.json owns colour, type and spacing. This file only does the handful
   of things core blocks cannot express on their own: the split hero, the
   statistic figures, card hover, chips, portrait cropping and the form.
   Every colour below comes from a theme.json preset — change it there and it
   changes everywhere.
   ========================================================================== */

:root {
  --bone:        var(--wp--preset--color--bone,        #f7f4ed);
  --white:       var(--wp--preset--color--white,       #ffffff);
  --mint:        var(--wp--preset--color--mint,        #e2ece5);
  --sage:        var(--wp--preset--color--sage,        #cfe3d5);
  --sand:        var(--wp--preset--color--sand,        #f0dcb4);
  --leaf:        var(--wp--preset--color--leaf,        #3d8b5b);
  --brass:       var(--wp--preset--color--brass,       #a5742a);
  --bark:        var(--wp--preset--color--bark,        #7a5420);
  --forest:      var(--wp--preset--color--forest,      #12563a);
  --forest-deep: var(--wp--preset--color--forest-deep, #0c3d29);
  --ink:         var(--wp--preset--color--ink,         #14231c);
  --ink-muted:   var(--wp--preset--color--ink-muted,   #4c5c54);
  --on-dark-muted: rgba(247, 244, 237, .80);

  --display: var(--wp--preset--font-family--display, "Young Serif", Georgia, serif);
  --sans:    var(--wp--preset--font-family--sans, Outfit, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif);
  --mono:    var(--wp--preset--font-family--mono, "JetBrains Mono", ui-monospace, Menlo, monospace);

  --r-sm: 4px;
  --r-md: 10px;
  --r-lg: 18px;
  --ease: cubic-bezier(.2, 0, 0, 1);
  --hairline: rgba(18, 35, 28, .16);
}

/* --------------------------------------------------------------------------
   1. Base
   -------------------------------------------------------------------------- */

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body { -webkit-font-smoothing: antialiased; }

/* Anchors land below the sticky header. */
[id] { scroll-margin-top: 92px; }

:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Dark grounds need the warmer ring — brass on forest is only 2.1:1. */
.has-forest-background-color :focus-visible,
.has-forest-deep-background-color :focus-visible,
.has-ink-background-color :focus-visible,
.has-bark-background-color :focus-visible,
.gva-hero-art :focus-visible,
.wp-block-template-part footer :focus-visible {
  outline-color: var(--sand);
}

.skip-link:focus {
  background: var(--forest);
  color: var(--bone);
  padding: 12px 24px;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   2. Type helpers
   -------------------------------------------------------------------------- */

.gva-eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin: 0 0 16px;
}

.gva-measure { max-width: 60ch; }
.gva-measure-tight { max-width: 34ch; }

.gva-mono {
  font-family: var(--mono);
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
}

.gva-lead { font-size: 18px; line-height: 30px; }

/* Muted body copy, light and dark grounds. */
.gva-muted { color: var(--ink-muted); }
.has-forest-background-color .gva-muted,
.has-forest-deep-background-color .gva-muted,
.has-ink-background-color .gva-muted,
.has-bark-background-color .gva-muted { color: var(--on-dark-muted); }

/* --------------------------------------------------------------------------
   3. Hero — copy beside a full-bleed art panel
   -------------------------------------------------------------------------- */

.gva-hero { position: relative; }

/* The art panel is an Image block (a <figure>), so it needs to be told to
   fill its column. 620px of artwork sits right beside the copy on a desktop
   and is far too much stacked above it on a phone. */
.gva-hero .gva-hero-art {
  margin: 0;
  min-height: 320px;
  overflow: hidden;
}

.gva-hero .gva-hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (min-width: 960px) {
  .gva-hero > .wp-block-column:last-child { display: flex; }
  .gva-hero .gva-hero-art { flex: 1; min-height: 620px; }
}

.gva-hero-rule {
  width: 76px;
  height: 8px;
  background: var(--brass);
  margin: 0 0 32px;
}

/* --------------------------------------------------------------------------
   4. Statistic figures
   -------------------------------------------------------------------------- */

.gva-stat {
  padding-top: 16px;
  border-top: 4px solid var(--sand);
}

.gva-figure {
  font-family: var(--mono);
  font-size: 40px;
  line-height: 44px;
  letter-spacing: -.02em;
  color: var(--sand);
  display: block;
  margin: 0 0 8px;
}

.gva-stat-label { font-size: 14px; font-weight: 700; display: block; }
.gva-stat-note  { font-size: 14px; line-height: 20px; color: var(--on-dark-muted); display: block; margin-top: 4px; }

/* --------------------------------------------------------------------------
   5. Cards and tiles
   -------------------------------------------------------------------------- */

.is-style-gva-card { border-radius: var(--r-md); overflow: hidden; }
.is-style-gva-card.wp-block-group { padding: 32px; }

.is-style-gva-lift,
.gva-lift { transition: transform .15s var(--ease); }
.is-style-gva-lift:hover,
.gva-lift:hover { transform: translateY(-4px); }

.gva-tile-num {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .06em;
  display: block;
}

.gva-tile-go {
  font-family: var(--mono);
  font-size: 14px;
  margin-top: auto;
  padding-top: 16px;
  display: block;
}

/* Numbers and "go" text pick up the right accent for their tile ground. */
.has-sand-background-color .gva-tile-num,
.has-sand-background-color .gva-tile-go { color: var(--bark); }
.has-bone-background-color .gva-tile-num,
.has-bone-background-color .gva-tile-go,
.has-mint-background-color .gva-tile-num,
.has-mint-background-color .gva-tile-go,
.has-sage-background-color .gva-tile-num,
.has-sage-background-color .gva-tile-go { color: var(--forest); }

/* A whole tile that is one link. */
a.gva-tile-link { text-decoration: none; color: inherit; display: block; height: 100%; }
a.gva-tile-link:hover h3,
a.gva-tile-link:hover h4 { text-decoration: underline; text-underline-offset: 3px; }

/* --------------------------------------------------------------------------
   6. Section rule
   -------------------------------------------------------------------------- */

.wp-block-separator.is-style-gva-rule {
  border: 0;
  border-top: 2px solid var(--hairline);
  width: 100%;
  max-width: none;
  margin: 64px 0 48px;
  opacity: 1;
}

/* --------------------------------------------------------------------------
   7. Chips
   -------------------------------------------------------------------------- */

.wp-block-list.is-style-gva-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
}

.wp-block-list.is-style-gva-chips li {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--bone);
  color: var(--forest);
}

/* The first three chips are funding stages, the rest are sectors. Outlining
   from the fourth on splits the row into two readable groups. core/list-item
   does not support a class attribute, so this has to be positional. */
.wp-block-list.is-style-gva-chips li:nth-child(n + 4) {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--forest);
  padding: 4px 14px;
}

/* --------------------------------------------------------------------------
   8. Portraits and card media
   -------------------------------------------------------------------------- */

.wp-block-image.is-style-gva-portrait img {
  border-radius: var(--r-md);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  width: 100%;
  display: block;
}

.gva-advisor-role {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--bark);
  margin: 4px 0 12px;
}

.gva-card-media { margin: 0; }
.gva-card-media a { display: block; line-height: 0; }

.gva-card-media img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
  display: block;
}

/* A press tile's title is a link to someone else's site; keep it looking like
   part of the card rather than body-copy link text. */
.is-style-gva-card h3 a {
  text-decoration: none;
  color: inherit;
}

.is-style-gva-card h3 a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* core/latest-posts, used for actual blog posts once there are some. */
.wp-block-latest-posts.gva-latest {
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 24px;
}

.wp-block-latest-posts.gva-latest li { background: var(--bone); border-radius: var(--r-md); overflow: hidden; }
.wp-block-latest-posts.gva-latest .wp-block-latest-posts__featured-image img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.wp-block-latest-posts.gva-latest .wp-block-latest-posts__post-title { display: block; padding: 20px 20px 0; font-weight: 700; font-size: 17px; line-height: 1.4; text-decoration: none; }
.wp-block-latest-posts.gva-latest .wp-block-latest-posts__post-date { display: block; padding: 6px 20px 0; font-family: var(--mono); font-size: 12px; color: var(--bark); }
.wp-block-latest-posts.gva-latest .wp-block-latest-posts__post-excerpt { padding: 10px 20px 20px; font-size: 14px; line-height: 21px; color: var(--ink-muted); margin: 0; }

.gva-card-kind {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--bark);
  display: block;
  margin-top: auto;
  padding-top: 12px;
}

/* Core's grid layout emits a fixed column count with no responsive fallback,
   so a three-up post grid stays three-up at 390px unless we say otherwise. */
@media (max-width: 900px) {
  .wp-block-post-template.is-layout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .wp-block-post-template.is-layout-grid { grid-template-columns: minmax(0, 1fr); }
}

/* --------------------------------------------------------------------------
   9. Header
   -------------------------------------------------------------------------- */

.gva-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bone);
  border-bottom: 3px solid var(--forest);
}

.admin-bar .gva-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .gva-header { top: 46px; } }

.gva-header .wp-block-site-logo img,
.gva-header .custom-logo { height: 46px; width: auto; }

.gva-header .wp-block-navigation {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
}

.gva-header .wp-block-navigation a {
  text-decoration: none;
  color: var(--ink-muted);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

.gva-header .wp-block-navigation a:hover { color: var(--ink); }

.gva-header .wp-block-navigation .current-menu-item a,
.gva-header .wp-block-navigation a[aria-current="page"] {
  color: var(--forest);
  border-bottom-color: var(--brass);
}

/* The CTA in the nav is a real button, not a nav link. */
.gva-header .wp-block-button .wp-block-button__link { border-bottom: none; }

/* --------------------------------------------------------------------------
   10. Footer
   -------------------------------------------------------------------------- */

.gva-footer .gva-foot-head {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--sage);
  margin: 0 0 16px;
}

.gva-footer .wp-block-navigation,
.gva-footer ul { font-size: 14px; }

.gva-footer .wp-block-navigation a,
.gva-footer a { text-decoration: none; }
.gva-footer a:hover { text-decoration: underline; }

.gva-colophon {
  border-top: 1px solid rgba(247, 244, 237, .25);
  padding-top: 24px;
  margin-top: 48px;
  font-size: 13px;
  color: var(--on-dark-muted);
}

.gva-footer .wp-block-site-logo img { height: 110px; width: auto; }

/* --------------------------------------------------------------------------
   11. Contact form
   -------------------------------------------------------------------------- */

.gva-form-card {
  background: var(--bone);
  border-radius: var(--r-lg);
  padding: 32px;
}

@media (min-width: 720px) { .gva-form-card { padding: 48px; } }

.gva-form-grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 620px) { .gva-form-grid { grid-template-columns: repeat(2, 1fr); } }

.gva-field { display: flex; flex-direction: column; gap: 6px; }
.gva-field.is-full { grid-column: 1 / -1; }

.gva-field label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--bark);
}

.gva-field input,
.gva-field textarea {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 24px;
  color: var(--ink);
  background: var(--white);
  border: 2px solid #8d8674;
  border-radius: var(--r-sm);
  padding: 12px 16px;
  width: 100%;
}

.gva-field textarea { min-height: 132px; resize: vertical; }
.gva-field input::placeholder,
.gva-field textarea::placeholder { color: #5d6d65; }

.gva-field input:focus-visible,
.gva-field textarea:focus-visible { border-color: var(--forest); }

/* Honeypot — off-screen, never displayed, never announced. */
.gva-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.gva-form-submit {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  min-height: 56px;
  width: 100%;
  padding: 16px 48px;
  border: 2px solid var(--forest);
  border-radius: var(--r-sm);
  background: var(--forest);
  color: var(--bone);
  cursor: pointer;
  transition: background-color .15s var(--ease);
}

.gva-form-submit:hover { background: var(--forest-deep); border-color: var(--forest-deep); }

.gva-form-note {
  font-size: 13px;
  line-height: 20px;
  color: var(--ink-muted);
  margin-top: 16px;
}

.gva-form-message {
  font-size: 15px;
  line-height: 22px;
  font-weight: 700;
  margin: 0 0 24px;
  padding: 14px 18px;
  border-radius: var(--r-sm);
}

.gva-form-message.is-ok    { background: var(--mint); color: var(--forest); }
.gva-form-message.is-error { background: var(--sand); color: var(--bark); }

.gva-field-error {
  font-size: 13px;
  font-weight: 700;
  color: var(--bark);
}

/* --------------------------------------------------------------------------
   12. Reach rows (email / phone beside the form)
   -------------------------------------------------------------------------- */

.gva-reach-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.gva-reach-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--forest);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.gva-reach-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--bone);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gva-reach-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--bark);
  display: block;
  margin-bottom: 2px;
}

.gva-reach-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.gva-reach-value:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   13. Editor-only nudges
   -------------------------------------------------------------------------- */

.editor-styles-wrapper .gva-hero-art { min-height: 260px; }
.editor-styles-wrapper .gva-hero-art img { height: auto; }
