/*
Theme Name: Paddock
Description: Minimal theme for paddock.com (2026). Replaces X + Cornerstone: same URLs, content and heading structure; refined typography and spacing.
Version: 0.1.0
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: paddock
*/

/* ---------- fonts (self-hosted, Latin, variable) ---------- */
@font-face { font-family: "Source Serif 4"; src: url(fonts/source-serif-4-latin-opsz-normal.woff2) format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url(fonts/source-serif-4-latin-opsz-italic.woff2) format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url(fonts/source-sans-3-latin-wght-normal.woff2) format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url(fonts/source-sans-3-latin-wght-italic.woff2) format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url(fonts/inter-latin-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url(fonts/inter-latin-wght-italic.woff2) format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url(fonts/montserrat-latin-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url(fonts/montserrat-latin-wght-italic.woff2) format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }

/* ---------- tokens ---------- */
:root {
	--cyan: #00aeef;          /* logo / accent (X: button + nav colour) */
	--cyan-dark: #0083b8;     /* hover, links on white (better contrast than #00aeef) */
	--ink: #1c1c1c;           /* headings */
	--text: #3f3f3f;          /* body */
	--muted: #6b6b6b;
	--line: #e3e5e8;
	--paper: #ffffff;
	--paper-2: #f5f6f7;       /* banner / footer */
	--night: #2b2b2b;         /* header (X: #2d2d2d / #333) */
	--night-2: #1f1f1f;

	--font-head: "Source Serif 4", Georgia, "Times New Roman", serif;
	--font-body: "Source Sans 3", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--font-ui: var(--font-body);
	--head-weight: 600;
	--head-tracking: -0.01em;

	--wrap: 1080px;
	--gutter: clamp(16px, 4vw, 32px);
	--s1: .5rem; --s2: .75rem; --s3: 1rem; --s4: 1.5rem; --s5: 2rem; --s6: 3rem; --s7: 4.5rem;
	--radius: 4px;
	--shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 8px 24px rgba(0, 0, 0, .10);
}
/* dev-only type options (?type=a|b|c); a = default */
body.type-b { --font-head: "Inter", system-ui, sans-serif; --font-body: "Inter", system-ui, sans-serif; --head-weight: 650; --head-tracking: -0.02em; }
body.type-c { --font-head: "Montserrat", system-ui, sans-serif; --font-body: "Source Sans 3", system-ui, sans-serif; --head-weight: 600; --head-tracking: -0.01em; }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--text); font: 400 1.0625rem/1.7 var(--font-body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body.type-b { font-size: 1rem; }
img, video, iframe { max-width: 100%; }
img { height: auto; }
a { color: var(--cyan-dark); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--cyan); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); font-weight: var(--head-weight); letter-spacing: var(--head-tracking); color: var(--ink); line-height: 1.2; margin: var(--s5) 0 var(--s3); text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.1rem); }
h3 { font-size: clamp(1.45rem, 1.15rem + 1vw, 1.85rem); }
h4 { font-size: 1.25rem; }
h5, h6 { font-size: 1.05rem; }
p, ul, ol, blockquote, table { margin: 0 0 var(--s4); }
strong, b { font-weight: 650; color: var(--ink); }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s6) 0; }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; width: auto; height: auto; clip: auto; background: #fff; padding: 8px 12px; }

/* ---------- header ---------- */
.site-header { background: var(--night); color: #fff; }
.site-header .wrap { display: flex; flex-direction: column; align-items: center; padding-top: 18px; }
.brand img { display: block; width: 300px; max-width: 70vw; height: auto; }
.nav-toggle { display: none; }
.main-nav { width: 100%; }
.main-nav > ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 0; list-style: none; margin: 10px 0 0; padding: 0; }
.main-nav li { position: relative; }
.main-nav a { display: block; color: #fff; text-decoration: none; font-family: var(--font-ui); }
.main-nav > ul > li > a { padding: 14px 16px 16px; font-size: .8125rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: #e9e9e9; border-bottom: 2px solid transparent; }
.main-nav > ul > li > a:hover, .main-nav > ul > li:focus-within > a, .main-nav > ul > li.current-menu-ancestor > a, .main-nav > ul > li.current-menu-item > a { color: #fff; border-bottom-color: var(--cyan); }
.main-nav > ul > li.menu-item-has-children > a::after { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 0 3px 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); opacity: .7; }
.main-nav > ul > li.nav-phone > a { color: var(--cyan); }  /* same size + tracking as the other items; only the colour differs */
/* dropdowns */
.main-nav .sub-menu { position: absolute; top: 100%; left: 50%; z-index: 20; min-width: 250px; margin: 0; padding: 8px 0; list-style: none; background: #fff; border-radius: 6px; box-shadow: 0 12px 32px rgba(0, 0, 0, .18); transform: translate(-50%, 6px); opacity: 0; visibility: hidden; transition: opacity .15s, transform .15s, visibility .15s; }
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.main-nav .sub-menu a { padding: 8px 20px; color: var(--text); font-size: .95rem; line-height: 1.35; }
.main-nav .sub-menu a:hover, .main-nav .sub-menu .current-menu-item > a { background: var(--paper-2); color: var(--cyan-dark); }
.main-nav .sub-menu .sub-menu { top: -8px; left: 100%; transform: translate(4px, 0); }
.main-nav .sub-menu li:hover > .sub-menu, .main-nav .sub-menu li:focus-within > .sub-menu { transform: translate(0, 0); }
.main-nav .sub-menu .menu-item-has-children > a::after { content: "›"; float: right; margin-left: 12px; color: var(--muted); }

/* ---------- page banner (h1 + breadcrumbs) ---------- */
.page-banner { background: var(--paper-2); border-bottom: 1px solid var(--line); }
.page-banner .wrap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s2) var(--s5); padding-top: var(--s5); padding-bottom: var(--s5); }
.page-banner h1 { margin: 0; font-size: clamp(1.15rem, 1rem + .5vw, 1.4rem); font-family: var(--font-ui); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.breadcrumbs, .aioseo-breadcrumbs { font-family: var(--font-ui); font-size: .95rem; color: var(--muted); }
.breadcrumbs a, .aioseo-breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover, .aioseo-breadcrumbs a:hover { color: var(--cyan-dark); text-decoration: underline; }
.aioseo-breadcrumb-separator { margin: 0 .45em; color: #b5b5b5; }

/* ---------- content ---------- */
.site-main { padding: var(--s6) 0 var(--s7); }
.entry { display: flow-root; }
.entry > :first-child { margin-top: 0; }
.entry img { border-radius: var(--radius); }
.entry a > img, .entry > p > img, .entry figure img { box-shadow: var(--shadow); }
.entry img.no-shadow, .entry .logos img { box-shadow: none; border-radius: 0; }
.alignright { float: right; margin: 0 0 var(--s4) var(--s5); }
.alignleft { float: left; margin: 0 var(--s5) var(--s4) 0; }
.aligncenter { display: block; margin: 0 auto var(--s4); }
/* videos floated with an inline style (99 pages: <p><iframe style="float:right" width="420" height="315"></p><h3>) */
.entry iframe[style*="float:right"], .entry iframe[style*="float: right"] { margin: 0 0 var(--s4) var(--s5); box-shadow: var(--shadow); }
.entry iframe[style*="float:left"], .entry iframe[style*="float: left"] { margin: 0 var(--s5) var(--s4) 0; box-shadow: var(--shadow); }
.entry > p:first-child:has(> iframe[style*="float"]) { margin: 0; }
.entry > p:first-child:has(> iframe[style*="float"]) + :is(h2, h3, h4) { margin-top: -.24em; }
@media (max-width: 700px) {
	.entry iframe[style*="float"] { float: none !important; width: 100%; height: auto; aspect-ratio: 4 / 3; margin: 0 0 var(--s4); }
}
/* the common pattern: <p><a><img class="alignright"></a></p> <h3>…</h3> <p>…</p> → image and headline share the top line */
.entry > p:first-child:has(> .alignright, > a > .alignright, > .alignleft, > a > .alignleft) { margin: 0; }
.entry > p:first-child:has(> .alignright, > a > .alignright, > .alignleft, > a > .alignleft) + :is(h2, h3, h4) { margin-top: -.24em; } /* cap height meets the image top */
@media (min-width: 820px) {
	.entry img.alignright, .entry img.alignleft { max-width: 46%; }
}
@media (max-width: 700px) {
	.alignright, .alignleft { float: none; display: block; margin: 0 0 var(--s4); }
	.entry img.alignright, .entry img.alignleft { width: 100%; }
}
.entry ul, .entry ol { padding-left: 1.3em; }
.entry li { margin-bottom: .35em; }
.entry blockquote { margin-left: 0; padding: .2em 0 .2em var(--s4); border-left: 3px solid var(--cyan); font-family: var(--font-head); font-size: 1.15em; color: var(--ink); }
.entry iframe { display: block; border: 0; border-radius: var(--radius); }
.video { position: relative; aspect-ratio: 16 / 9; margin: 0 0 var(--s4); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; box-shadow: var(--shadow); }

/* buttons */
.btn, .entry .gform_button, .entry input[type="submit"] { display: inline-block; padding: .75em 1.6em; border: 0; border-radius: 4px; background: var(--cyan); color: #fff; font: 600 .9rem/1 var(--font-ui); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; cursor: pointer; }
.btn:hover, .entry .gform_button:hover, .entry input[type="submit"]:hover { background: var(--cyan-dark); color: #fff; }

/* in-page section menus ([widgets_on_pages] replacement) */
.section-menu { list-style: none; margin: 0 0 var(--s5); padding: 0; columns: 2 220px; column-gap: var(--s5); }
.section-menu li { break-inside: avoid; padding: 6px 0; border-bottom: 1px solid var(--line); }

/* ---------- footer ---------- */
.site-footer { background: var(--paper-2); border-top: 1px solid var(--line); }
.footer-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s5); padding-top: var(--s6); padding-bottom: var(--s6); }
.footer-cols h2 { margin: 0 0 var(--s3); font-family: var(--font-ui); font-size: .8125rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.footer-cols ul { list-style: none; margin: 0; padding: 0; }
.footer-cols li { margin: 0; }
.footer-cols a { display: inline-block; padding: 4px 0; font-size: .95rem; color: var(--text); text-decoration: none; }
.footer-cols a:hover, .footer-cols .current-menu-item > a { color: var(--cyan-dark); }
.footer-bottom { background: var(--night); color: #bdbdbd; font-family: var(--font-ui); font-size: .875rem; }
.footer-bottom .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding-top: var(--s4); padding-bottom: var(--s4); }
.footer-bottom a { color: #e0e0e0; }
.social a { display: inline-flex; color: #cfcfcf; }
.social a:hover { color: var(--cyan); }
.social svg { width: 22px; height: 22px; fill: currentColor; }
@media (max-width: 900px) { .footer-cols { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .footer-cols { grid-template-columns: 1fr; } .footer-bottom .wrap { flex-direction: column-reverse; } }

/* back to top */
.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 30; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(43, 43, 43, .85); color: #fff; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .2); opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
.to-top.is-visible { opacity: 1; visibility: visible; }
.to-top:hover { background: var(--cyan-dark); }
.to-top svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------- mobile nav ---------- */
@media (max-width: 960px) {
	.site-header .wrap { flex-direction: row; flex-wrap: wrap; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
	.brand img { width: 210px; }
	.nav-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid #555; border-radius: 4px; background: none; color: #fff; font: 600 .8rem var(--font-ui); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
	.main-nav { display: none; }
	.main-nav.is-open { display: block; }
	.main-nav > ul { display: block; margin-top: 12px; border-top: 1px solid #444; }
	.main-nav > ul > li > a { padding: 12px 4px; border-bottom: 1px solid #3a3a3a; }
	.main-nav .sub-menu, .main-nav .sub-menu .sub-menu { position: static; display: none; min-width: 0; padding: 0 0 8px 12px; background: none; box-shadow: none; transform: none; opacity: 1; visibility: visible; }
	.main-nav li.is-open > .sub-menu { display: block; }
	.main-nav .sub-menu a { color: #d6d6d6; padding: 8px 4px; }
	.main-nav .sub-menu a:hover { background: none; color: #fff; }
	.page-banner .wrap { padding-top: var(--s4); padding-bottom: var(--s4); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* ---------- YouTube click-to-load ---------- */
.yt { display: block; position: relative; margin: 0 0 var(--s4); aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.yt--right { margin: 0 0 var(--s4) var(--s5); max-width: 46%; }
.yt--left { margin: 0 var(--s5) var(--s4) 0; max-width: 46%; }
.video .yt { position: absolute; inset: 0; margin: 0; }
.yt__play { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.yt__play img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; box-shadow: none !important; }
.yt__icon { position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; margin: -24px 0 0 -34px; border-radius: 12px; background: rgba(23, 23, 23, .8); transition: background .15s; }
.yt__icon::after { content: ""; position: absolute; left: 27px; top: 14px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff; }
.yt__play:hover .yt__icon, .yt__play:focus-visible .yt__icon { background: #f00; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.entry > p:first-child:has(> .yt--right, > .yt--left) { margin: 0; }
.entry > p:first-child:has(> .yt--right, > .yt--left) + :is(h2, h3, h4) { margin-top: -.24em; }
.entry > .yt--right:first-child + :is(h2, h3, h4), .entry > .yt--left:first-child + :is(h2, h3, h4) { margin-top: -.24em; }
@media (max-width: 700px) { .yt--right, .yt--left { float: none !important; width: 100% !important; max-width: none; margin: 0 0 var(--s4); } }

/* ---------- home ---------- */
.home-intro { display: grid; grid-template-columns: 1fr 2.4fr; gap: var(--s5); align-items: start; }
.home-intro__text p { font-size: 1rem; }
.home-intro__cta { margin-top: var(--s4); text-align: center; }
.spot-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s4); list-style: none; margin: 0 0 var(--s5); padding: 0; }
.spot-grid a { display: block; text-decoration: none; text-align: center; }
.spot-grid span { display: block; margin-bottom: var(--s2); font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; }
.spot-grid img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; box-shadow: var(--shadow); transition: transform .2s; }
.spot-grid a:hover img { transform: translateY(-2px); }
.entry h2 { margin-top: 0; }
.logos { text-align: center; margin: 0; }
.logos img { box-shadow: none !important; border-radius: 0; }
@media (max-width: 900px) { .home-intro { grid-template-columns: 1fr; } .home-intro__media { order: -1; } .spot-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) { .hide-small { display: none; } }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s6); align-items: start; }
.contact-address { margin-bottom: var(--s5); }
.map { position: sticky; top: var(--s4); }
.map iframe { width: 100%; aspect-ratio: 4 / 5; border: 0; box-shadow: var(--shadow); }
.map__link { margin-top: var(--s2); font-size: .95rem; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } .map { position: static; } .map iframe { aspect-ratio: 4 / 3; } }

/* ---------- Gravity Forms: fit the theme ---------- */
.gform_wrapper { font-family: var(--font-body); }
.gform_wrapper input[type="text"], .gform_wrapper input[type="email"], .gform_wrapper input[type="tel"], .gform_wrapper textarea, .gform_wrapper select { width: 100%; padding: .6em .75em; border: 1px solid #cfd3d8; border-radius: 4px; font: inherit; font-size: 1rem; background: #fff; }
.gform_wrapper input:focus, .gform_wrapper textarea:focus { border-color: var(--cyan); outline: 2px solid rgba(0, 174, 239, .25); }
.gform_wrapper .gfield_label { font-weight: 600; color: var(--ink); }
.gform_wrapper.gform_wrapper .gfield :is(input.small, input.medium, input.large, textarea.small, textarea.medium, textarea.large, select.medium, select.large) { width: 100%; max-width: 100%; }
.gform_wrapper.gform_wrapper .gfield textarea { min-height: 9em; }

/* ---------- small helpers for converted pages ---------- */
.center { text-align: center; }
.btn--small { padding: .6em 1.2em; font-size: .8rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); align-items: start; margin-bottom: var(--s4); }
.two-col img { display: block; width: 100%; box-shadow: var(--shadow); }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }

/* team (/about/the-team/) */
.team-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s6) var(--s5); list-style: none; margin: 0; padding: 0; }
.team-card img { display: block; width: 387px; max-width: 100%; height: auto; margin-bottom: var(--s4); box-shadow: var(--shadow); } /* 387×58 name banners: shown whole, at native size (live stretched them) */
.team-card h3 { margin: 0; }
.team-card h4 { margin: .25rem 0 var(--s3); font-family: var(--font-ui); font-size: .85rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--cyan-dark); }
.team-card__cta { margin-top: var(--s3); }
@media (max-width: 760px) { .team-grid { grid-template-columns: 1fr; } }

/* video grid (/drtv-spots/) */
.video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); list-style: none; margin: 0; padding: 0; }
.video-grid h5 { margin: 0 0 var(--s2); text-align: center; }
@media (max-width: 700px) { .video-grid { grid-template-columns: 1fr; } }

/* sitemap lists */
.html-sitemap, .html-sitemap ul { list-style: none; padding-left: 0; }
.html-sitemap ul { padding-left: 1.2em; border-left: 1px solid var(--line); margin: .3em 0 .6em .3em; }
.html-sitemap li { margin: .2em 0; }
