/*
Theme Name: Tarleton Rugby Club
Theme URI: https://tarletonrugby.com
Author: W Web Design
Author URI: https://wwebdesign.co.uk
Description: Lean custom ACF-blocks theme for Tarleton Rugby Union Football Club. No page builder, no build step. Rebuilt like-for-like from the previous Elementor + Kadence site.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: trfc
*/

/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
  /* Brand palette (from the previous Kadence global palette) */
  --trfc-red:        #ce3131;
  --trfc-red-dark:   #a72424;
  --trfc-black:      #111214;
  --trfc-ink:        #1e2024;   /* body text */
  --trfc-muted:      #5b6167;   /* secondary text */

  --trfc-bg:         #f4f5f6;   /* page background */
  --trfc-card-bg:    #ffffff;   /* discrete card surfaces */
  --trfc-line:       #e2e5e7;   /* hairline borders */
  --trfc-panel:      #101216;   /* dark panels / footer */

  --trfc-white:      #ffffff;

  /* Typography — matches the old site's Trebuchet stack */
  --trfc-font-body: "Trebuchet MS", "Segoe UI", Helvetica, Arial, sans-serif;
  --trfc-font-head: "Trebuchet MS", "Segoe UI", Helvetica, Arial, sans-serif;

  /* Layout */
  --trfc-content-max: 1200px;
  --trfc-content-narrow: 820px;
  --trfc-gutter: clamp(18px, 5vw, 48px);
  --trfc-header-height: 96px;
  --trfc-radius: 10px;
  --trfc-radius-lg: 16px;
  --trfc-shadow: 0 10px 30px rgba(17, 18, 20, .10);
  --trfc-shadow-sm: 0 4px 14px rgba(17, 18, 20, .08);
}

/* ==========================================================================
   Reset-ish base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--trfc-font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--trfc-ink);
  background: var(--trfc-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--trfc-red); text-decoration: none; }
a:hover { color: var(--trfc-red-dark); }

h1, h2, h3, h4 {
  font-family: var(--trfc-font-head);
  line-height: 1.12;
  margin: 0 0 .5em;
  color: var(--trfc-black);
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); }

p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }

/* ==========================================================================
   Layout helpers
   ========================================================================== */
.trfc-wrap {
  width: 100%;
  max-width: var(--trfc-content-max);
  margin-inline: auto;
  padding-inline: var(--trfc-gutter);
}
.trfc-wrap--narrow { max-width: var(--trfc-content-narrow); }

.trfc-section { padding-block: clamp(48px, 7vw, 88px); }
.trfc-section--tight { padding-block: clamp(32px, 4vw, 52px); }

.trfc-eyebrow {
  display: inline-block;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--trfc-red);
  margin-bottom: .8em;
}

/* Buttons */
.trfc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: .8em 1.6em;
  font-family: var(--trfc-font-head);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.1;
  border-radius: 999px;
  background: var(--trfc-red);
  color: var(--trfc-white);
  border: 2px solid var(--trfc-red);
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease, color .18s ease;
}
.trfc-btn:hover { background: var(--trfc-red-dark); border-color: var(--trfc-red-dark); color: var(--trfc-white); transform: translateY(-1px); }
.trfc-btn--ghost { background: transparent; color: var(--trfc-black); border-color: currentColor; }
.trfc-btn--ghost:hover { background: var(--trfc-black); color: var(--trfc-white); border-color: var(--trfc-black); }
.trfc-btn--light { background: var(--trfc-white); color: var(--trfc-red); border-color: var(--trfc-white); }
.trfc-btn--light:hover { background: rgba(255,255,255,.88); color: var(--trfc-red-dark); border-color: transparent; }

/* Prose defaults inside WYSIWYG blocks */
.trfc-prose :where(h2,h3){ margin-top: 1.2em; }
.trfc-prose a { text-decoration: underline; }
.trfc-prose > :last-child { margin-bottom: 0; }

/* Skip link */
.trfc-skip {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--trfc-red); color: #fff; padding: 10px 16px;
}
.trfc-skip:focus { left: 8px; top: 8px; color: #fff; }

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
