/*
Theme Name: Pass the Baton
Theme URI: https://passthebaton.fund
Author: Music Education Scholarship Fund
Description: Block theme for the Music Education Scholarship Fund, built on the Fraser Family Foundation design system — forest green and navy, the Fraser of Lovat dress tartan as signature texture, Noto Sans throughout.
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 8.0
Version: 0.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: passthebaton
Tags: block-theme, one-column, custom-colors, editor-style, full-site-editing
*/

/* ============================================================
   Fraser of Lovat dress tartan — the brand's signature texture.
   Layered behind the Fraser gradient at low opacity on hero and
   footer surfaces, and drawn as a woven band for separators.
   ============================================================ */

:root {
  --tartan-field:
    repeating-linear-gradient(0deg,   transparent, transparent 35px, #dc143c 35px, #dc143c 38px, transparent 38px, transparent 40px),
    repeating-linear-gradient(90deg,  transparent, transparent 35px, #dc143c 35px, #dc143c 38px, transparent 38px, transparent 40px),
    repeating-linear-gradient(45deg,  transparent, transparent 50px, #1e3a8a 50px, #1e3a8a 52px),
    repeating-linear-gradient(-45deg, transparent, transparent 50px, #1e3a8a 50px, #1e3a8a 52px),
    linear-gradient(90deg, #0f5e3a 0%, #1e3a8a 50%, #0f5e3a 100%);

  --tartan-band:
    repeating-linear-gradient(90deg, #0f5e3a 0 12px, #1e3a8a 12px 20px, #0f5e3a 20px 24px, #dc143c 24px 27px, #0f5e3a 27px 40px);
}

/* Full-field tartan backdrop. Content sits in a higher stacking context. */
.ptb-tartan {
  position: relative;
  isolation: isolate;
  background: linear-gradient(135deg, #0f5e3a 0%, #1e3a8a 100%);
  color: #fff;
  overflow: hidden;
}

.ptb-tartan::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--tartan-field);
  opacity: 0.15;
  z-index: -1;
}

.ptb-tartan :where(h1, h2, h3, h4, p, li) { color: #fff; }
.ptb-tartan :where(a:not(.wp-element-button)) { color: #fff; text-underline-offset: 3px; }

/* A woven tartan band, used as a section separator. */
.ptb-tartan-rule,
hr.is-style-tartan {
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: var(--tartan-band);
}

/* Eyebrow label above hero headings. */
.ptb-eyebrow {
  font-size: var(--wp--preset--font-size--xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
  opacity: 0.85;
}

/* Card surface. Matches the design system's --surface-card treatment. */
.ptb-card,
.wp-block-group.is-style-card {
  background: var(--wp--preset--color--surface);
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 16px;
  box-shadow: var(--wp--preset--shadow--card);
}

/* Buttons on the tartan surface invert to white-on-green. */
.ptb-tartan .wp-block-button.is-style-outline .wp-element-button {
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}
.ptb-tartan .wp-block-button.is-style-outline .wp-element-button:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
}

/* Story cards in the archive grid. */
.ptb-story-card {
  background: var(--wp--preset--color--surface);
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 16px;
  box-shadow: var(--wp--preset--shadow--card);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ptb-story-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--wp--preset--shadow--raised);
}

/* Recipient byline: the person, before the data. */
.ptb-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  color: var(--wp--preset--color--muted);
  font-size: var(--wp--preset--font-size--sm);
}
.ptb-byline strong { color: var(--wp--preset--color--ink); font-weight: 600; }

/* Accessibility: a visible focus ring in the brand green. */
:where(a, button, input, select, textarea, .wp-element-button):focus-visible {
  outline: 2px solid var(--wp--preset--color--forest);
  outline-offset: 2px;
}

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
  .ptb-story-card { transition: none; }
  .ptb-story-card:hover { transform: none; }
}
