/*
Theme Name: Garf17 Bold Paddock
Theme URI: https://garf17.co.uk
Author: Gareth Williams
Description: A lean, custom theme for Garf17.co.uk — a personal motorcycle racing blog. Built to replace a heavy page-builder theme and its dozen dependent plugins with plain, fast, maintainable WordPress. High-contrast black-and-orange "paddock" look, race-livery graphics, real fonts (Orbitron for display, Verdana for body).
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
Author URI: https://garf17.co.uk
Text Domain: garf17-bold-paddock
*/

/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
  --g17-bg: #121212;
  --g17-bg-raised: #1a1a1a;
  --g17-text: #F5F1EA;
  --g17-text-muted: #B7B2A8;
  --g17-text-dim: #8A857C;
  --g17-accent: #FF7A1A;
  --g17-accent-dark: #331B00;
  --g17-rule: #2A2A2A;
  --g17-font-display: 'Orbitron', sans-serif;
  --g17-font-body: Verdana, Geneva, sans-serif;
  --g17-max-width: 1280px;
}

/* ==========================================================================
   Reset / base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--g17-bg);
  color: var(--g17-text);
  font-family: var(--g17-font-body);
  font-size: 16px;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--g17-accent); text-decoration: none; }
a:hover, a:focus { color: #ffb073; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--g17-font-display);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--g17-text);
}
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--g17-accent); color: #121212; padding: 12px 20px;
  font-weight: bold; text-transform: uppercase; letter-spacing: 1px; font-size: 13px;
}
.skip-link:focus { left: 16px; top: 16px; }

.g17-container { max-width: var(--g17-max-width); margin: 0 auto; padding: 0 32px; }

/* ==========================================================================
   Header
   ========================================================================== */
.g17-site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; height: 88px; border-bottom: 3px solid var(--g17-accent);
  position: relative;
}
.g17-logo { font-family: var(--g17-font-display); font-weight: 900; font-size: 26px; letter-spacing: 1px; }
.g17-logo a { color: var(--g17-text); }
.g17-logo .accent { color: var(--g17-accent); }

.g17-nav { display: flex; align-items: center; gap: 36px; }
.g17-nav ul { display: flex; gap: 36px; }
.g17-nav a {
  color: var(--g17-text); font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase;
}
.g17-nav a:hover { color: var(--g17-accent); }

.g17-social { display: flex; align-items: center; gap: 16px; }
.g17-social a { color: var(--g17-text); display: flex; }
.g17-social a:hover { color: var(--g17-accent); }
.g17-social svg { width: 18px; height: 18px; }

.g17-menu-toggle {
  display: none; background: none; border: 2px solid var(--g17-text); color: var(--g17-text);
  padding: 8px 10px; cursor: pointer;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.g17-hero { position: relative; height: 560px; overflow: hidden; }
.g17-hero img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.g17-hero::before {
  content: ""; position: absolute; inset: 0;
  /* Horizontal darkening for the left-aligned text, PLUS a bottom-up
     darkening so the headline/meta/button stay readable regardless of
     how bright the underlying photo is at that spot. */
  background:
    linear-gradient(0deg, rgba(18,18,18,0.9) 0%, rgba(18,18,18,0.15) 55%),
    linear-gradient(90deg, rgba(18,18,18,0.9) 0%, rgba(18,18,18,0.5) 45%, rgba(18,18,18,0.1) 78%);
}
.g17-hero-wedge {
  position: absolute; top: 0; right: 0; width: 180px; height: 100%;
  background: var(--g17-accent);
  clip-path: polygon(60% 0, 100% 0, 100% 100%, 20% 100%);
  display: none;
  align-items: flex-end; justify-content: center; padding-bottom: 32px;
}
@media (min-width: 900px) {
  .g17-hero-wedge { display: flex; }
}
.g17-hero-wedge span { font-family: var(--g17-font-display); font-weight: 900; font-size: 64px; color: var(--g17-bg); line-height: 1; }
.g17-hero-content { position: absolute; left: 32px; right: 32px; bottom: 40px; max-width: 640px; }
.g17-badge {
  display: inline-block; background: var(--g17-accent); color: var(--g17-bg);
  font-size: 11px; font-weight: bold; letter-spacing: 2px; text-transform: uppercase;
  padding: 6px 14px; transform: skewX(-10deg); margin-bottom: 14px;
}
.g17-badge span { display: inline-block; transform: skewX(10deg); }
.g17-hero-title { font-size: 38px; line-height: 1.1; margin-bottom: 10px; text-shadow: 0 2px 12px rgba(0,0,0,0.85); }
.g17-hero-title a { color: var(--g17-text); }
.g17-hero-content .g17-meta { text-shadow: 0 1px 6px rgba(0,0,0,0.95); color: #E7E2D8; }
.g17-meta { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--g17-text-muted); margin-bottom: 18px; }
.g17-btn {
  display: inline-block; background: transparent; border: 2px solid var(--g17-accent);
  color: var(--g17-text); font-size: 12px; font-weight: bold; letter-spacing: 1.5px;
  text-transform: uppercase; padding: 10px 22px; transform: skewX(-10deg);
}
.g17-btn span { display: inline-block; transform: skewX(10deg); }
.g17-btn:hover { background: var(--g17-accent); color: var(--g17-bg); }

/* Stripe divider */
.g17-stripe {
  height: 8px; width: 100%;
  background: repeating-linear-gradient(-45deg, var(--g17-accent) 0 20px, var(--g17-bg) 20px 40px);
}

/* ==========================================================================
   Post grid / cards
   ========================================================================== */
.g17-section { padding: 48px 32px; }
.g17-section-heading { display: flex; align-items: baseline; gap: 16px; margin-bottom: 32px; }
.g17-section-heading h2 { font-size: 24px; text-transform: uppercase; letter-spacing: 1px; margin: 0; white-space: nowrap; }
.g17-section-heading .rule { flex: 1; height: 2px; background: var(--g17-rule); }

.g17-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px;
}
.g17-card { display: flex; flex-direction: column; }
.g17-card-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--g17-bg-raised); }
.g17-card-media img { width: 100%; height: 100%; object-fit: cover; }
.g17-card .g17-badge { position: absolute; top: 14px; left: -4px; margin: 0; }
.g17-card-body { padding-top: 16px; display: flex; flex-direction: column; gap: 6px; }
.g17-card-title { font-size: 17px; margin: 0; }
.g17-card-title a { color: var(--g17-text); }
.g17-card-title a:hover { color: var(--g17-accent); }
.g17-card-meta { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--g17-text-dim); }
.g17-card-excerpt { font-size: 13px; line-height: 1.5; color: var(--g17-text-muted); }

.g17-pagination { display: flex; justify-content: center; gap: 12px; margin-top: 48px; }
.g17-pagination a, .g17-pagination span {
  padding: 10px 16px; border: 1px solid var(--g17-rule); color: var(--g17-text-muted); font-size: 13px;
}
.g17-pagination .current { border-color: var(--g17-accent); color: var(--g17-accent); }
.g17-pagination a:hover { border-color: var(--g17-accent); color: var(--g17-accent); }

/* ==========================================================================
   Single post
   ========================================================================== */
.g17-single-hero { position: relative; height: 420px; overflow: hidden; }
.g17-single-hero img { width: 100%; height: 100%; object-fit: cover; }
.g17-single-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(18,18,18,0.9), rgba(18,18,18,0.1));
}
.g17-single-header { position: absolute; left: 0; right: 0; bottom: 0; padding: 32px; }
.g17-single-title { font-size: 34px; max-width: 900px; }
.g17-article { max-width: 780px; margin: 0 auto; padding: 48px 32px; }
.g17-article .g17-single-header { position: static; padding: 0 0 32px; }
.g17-article-body { font-size: 16px; line-height: 1.75; color: var(--g17-text-muted); }
.g17-article-body p { margin: 0 0 1.4em; }
.g17-article-body h2, .g17-article-body h3 { color: var(--g17-text); margin-top: 1.6em; }
.g17-article-body img { margin: 1.5em 0; }
.g17-article-body a { text-decoration: underline; }
.g17-article-body blockquote {
  border-left: 3px solid var(--g17-accent); margin: 1.5em 0; padding: 0.2em 0 0.2em 24px;
  color: var(--g17-text); font-style: italic;
}
.g17-tags { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 10px; }
.g17-tags a {
  font-size: 11px; letter-spacing: 1px; text-transform: uppercase; border: 1px solid var(--g17-rule);
  padding: 6px 12px; color: var(--g17-text-muted);
}
.g17-tags a:hover { border-color: var(--g17-accent); color: var(--g17-accent); }

/* Responsive embeds (native oEmbed video, no plugin needed) */
.g17-article-body .wp-block-embed__wrapper,
.g17-article-body iframe,
.g17-article-body video {
  max-width: 100%;
}
.g17-article-body .wp-embed-aspect-16-9 .wp-block-embed__wrapper { aspect-ratio: 16/9; }
.g17-article-body .wp-embed-aspect-16-9 .wp-block-embed__wrapper iframe { width: 100%; height: 100%; }

/* Core Gallery block + Jetpack Tiled Gallery re-skin */
.g17-article-body .wp-block-gallery,
.g17-article-body .tiled-gallery { margin: 1.5em 0; }
.g17-article-body .blocks-gallery-item img,
.g17-article-body .wp-block-image img,
.g17-article-body .tiled-gallery img { border-radius: 0; }
.g17-article-body figcaption { color: var(--g17-text-dim); font-size: 12px; text-align: center; margin-top: 6px; }

/* ==========================================================================
   Generic page + widgets (About, Events, Contact)
   ========================================================================== */
.g17-page { max-width: 860px; margin: 0 auto; padding: 56px 32px; }
.g17-page-title { font-size: 34px; margin-bottom: 24px; }
.g17-page-body { font-size: 16px; line-height: 1.75; color: var(--g17-text-muted); }
.g17-page-body h2, .g17-page-body h3 { color: var(--g17-text); }

/* Events Manager re-skin (kept plugin — light touch to match theme) */
.em-event, .em-events-list .em-item { background: var(--g17-bg-raised); padding: 20px; margin-bottom: 16px; border-left: 3px solid var(--g17-accent); }
.em-event h3, .em-events-list h3 { font-family: var(--g17-font-display); color: var(--g17-text); }
.em-search-form input, .em-search-form select {
  background: var(--g17-bg); border: 1px solid var(--g17-rule); color: var(--g17-text); padding: 8px 12px;
}
a.em-button, input.em-button, .em-bookingform input[type="submit"] {
  display: inline-block; background: var(--g17-accent); color: var(--g17-bg) !important; border: none;
  padding: 10px 20px; font-weight: bold; letter-spacing: 1px; text-transform: uppercase; font-size: 12px;
}

/* Contact Form 7 re-skin (kept plugin) */
.wpcf7-form input[type="text"], .wpcf7-form input[type="email"], .wpcf7-form textarea {
  width: 100%; background: var(--g17-bg-raised); border: 1px solid var(--g17-rule);
  color: var(--g17-text); padding: 12px; font-family: var(--g17-font-body); margin-bottom: 16px;
}
.wpcf7-form input[type="submit"] {
  background: var(--g17-accent); color: var(--g17-bg); border: none; padding: 12px 28px;
  font-weight: bold; letter-spacing: 1.5px; text-transform: uppercase; cursor: pointer;
}
.wpcf7-form input[type="submit"]:hover { background: #ffb073; }

/* ==========================================================================
   Comments
   ========================================================================== */
.g17-comments-area { max-width: 780px; margin: 0 auto; padding: 0 32px 56px; }
.g17-comments-title { font-size: 20px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 24px; }
.g17-comment-list,
.g17-comment-list ul.children { list-style: none; margin: 0; padding: 0; }
.g17-comment-list ul.children { margin-left: 32px; }
.g17-comment-list .comment-body {
  background: var(--g17-bg-raised); padding: 20px; margin-bottom: 16px; border-left: 3px solid var(--g17-accent);
}
.g17-comment-list .comment-meta { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--g17-text-dim); margin-bottom: 8px; }
.g17-comment-list .comment-content p { color: var(--g17-text-muted); margin: 0 0 0.8em; }
.comment-respond input[type="text"], .comment-respond input[type="email"], .comment-respond input[type="url"], .comment-respond textarea {
  width: 100%; background: var(--g17-bg-raised); border: 1px solid var(--g17-rule);
  color: var(--g17-text); padding: 12px; font-family: var(--g17-font-body); margin-bottom: 16px;
}
.comment-respond input[type="submit"] {
  background: var(--g17-accent); color: var(--g17-bg); border: none; padding: 12px 28px;
  font-weight: bold; letter-spacing: 1.5px; text-transform: uppercase; cursor: pointer;
}
.comment-respond input[type="submit"]:hover { background: #ffb073; }
.comment-respond label { display: block; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--g17-text-dim); margin-bottom: 6px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.g17-site-footer {
  border-top: 3px solid var(--g17-accent); padding: 28px 32px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.g17-footer-text { font-family: var(--g17-font-display); font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--g17-text-dim); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .g17-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g17-hero { height: 460px; }
  .g17-hero-title { font-size: 28px; }
}

@media (max-width: 680px) {
  .g17-nav, .g17-social { display: none; }
  .g17-menu-toggle { display: inline-flex; }
  .g17-site-header.is-open .g17-nav {
    display: flex; position: absolute; top: 88px; left: 0; right: 0; background: var(--g17-bg);
    flex-direction: column; padding: 24px 32px; border-bottom: 3px solid var(--g17-accent); gap: 20px; z-index: 20;
  }
  .g17-site-header.is-open .g17-nav ul { flex-direction: column; gap: 20px; }
  .g17-grid { grid-template-columns: 1fr; }
  .g17-hero { height: 380px; }
  .g17-hero-content { max-width: 100%; }
  .g17-hero-title { font-size: 24px; }
  .g17-single-title { font-size: 26px; }
  .g17-section, .g17-article, .g17-page { padding-left: 20px; padding-right: 20px; }
  .g17-site-header { padding: 0 20px; }
}
