/*
Theme Name: JackAudio
Theme URI: https://www.jackaud.io
Author: Jack Elliot
Description: Custom theme for jackaud.io — producer, bassist, teacher. Fast, SEO-focused, with parallax headers and the jackaud.io brand palette.
Version: 1.5.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: jackaudio
*/

/* ---------- Tokens ---------- */
:root {
  --orange: #E87102;
  --orange-light: #F49542;
  --orange-h2: #ED9C2B;
  --midnight: #191970;
  --charcoal: #2C3E50;
  --slate: #34495E;
  --slate-2: #7F8C8D;
  --grey: #95A5A6;
  --bg: #ffffff;
  --bg-alt: #F7F8F9;
  --grad: linear-gradient(100deg, #F49542, #E87102);
  --font-body: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --max: 1120px;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
}

/* ---------- Fonts ---------- */
@font-face {
  font-family: 'Playfair Display';
  src: url('assets/fonts/playfair-display-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('assets/fonts/playfair-display-latin-600-italic.woff2') format('woff2');
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--charcoal);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

h1, .h1 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--orange);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: 0.005em;
}
h2 {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--orange-h2);
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
  margin: 0 0 0.6em;
}
h3 {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--midnight);
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  margin: 0 0 0.5em;
}
.subtitle {
  font-weight: 300;
  color: var(--slate);
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  line-height: 1.5;
  margin: 0 0 1em;
}
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--grey);
  margin: 0 0 0.9em;
}
p { margin: 0 0 1.1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--charcoal); color: #fff;
  padding: 0.6em 1em; z-index: 200; border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header / nav ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background 0.25s ease, box-shadow 0.25s ease;
  padding: 0.35rem 0;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; max-width: 1240px; }
.site-logo { display: inline-flex; align-items: center; }
.site-logo svg, .site-logo img { height: 46px; width: auto; }
.logo-dark { display: none; }
.site-header.scrolled { background: rgba(255, 255, 255, 0.96); box-shadow: 0 1px 12px rgba(44, 62, 80, 0.12); backdrop-filter: blur(6px); }
.site-header.scrolled .logo-light { display: none; }
.site-header.scrolled .logo-dark { display: inline-flex; }

.site-nav ul { list-style: none; display: flex; gap: clamp(0.9rem, 2.5vw, 2rem); margin: 0; padding: 0; }
.site-nav a {
  color: #fff; font-weight: 500; font-size: 0.95rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.4em 0.1em; border-bottom: 2px solid transparent; transition: color 0.2s, border-color 0.2s;
}
.site-nav a:hover, .site-nav a:focus { text-decoration: none; border-color: var(--orange-light); }
.site-nav a[aria-current="page"] { border-color: var(--orange); }
.site-header.scrolled .site-nav a { color: var(--charcoal); }
.solid-header .site-header { background: rgba(255,255,255,0.96); box-shadow: 0 1px 12px rgba(44,62,80,0.1); }
.solid-header .site-header .site-nav a { color: var(--charcoal); }
.solid-header .site-header .logo-light { display: none; }
.solid-header .site-header .logo-dark { display: inline-flex; }

.nav-toggle {
  display: none; background: none; border: 0; padding: 0.5rem; cursor: pointer;
}
.nav-toggle span { display: block; width: 26px; height: 2.5px; margin: 5px 0; background: #fff; border-radius: 2px; transition: transform 0.25s, opacity 0.25s; }
.site-header.scrolled .nav-toggle span, .solid-header .nav-toggle span { background: var(--charcoal); }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed; inset: 0; background: rgba(44, 62, 80, 0.97);
    display: none; align-items: center; justify-content: center;
  }
  .site-nav.open { display: flex; }
  .site-nav ul { flex-direction: column; text-align: center; gap: 1.6rem; }
  .site-nav a { color: #fff !important; font-size: 1.25rem; }
  body.nav-open { overflow: hidden; }
  .nav-open .nav-toggle { position: relative; z-index: 130; }
  .nav-open .nav-toggle span { background: #fff; }
  .nav-open .nav-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
  .site-nav { z-index: 120; }
}

/* ---------- Hero / parallax ---------- */
.hero {
  position: relative; overflow: hidden; display: flex; align-items: flex-end;
  min-height: clamp(420px, 72vh, 780px); color: #fff;
}
.hero.hero-tall { min-height: clamp(520px, 92vh, 900px); }
.hero-media { position: absolute; inset: -18% 0; z-index: 0; will-change: transform; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(24, 32, 44, 0.42) 0%, rgba(24, 32, 44, 0.12) 45%, rgba(24, 32, 44, 0.68) 100%);
}
.hero-inner { position: relative; z-index: 2; width: 100%; padding-bottom: clamp(2rem, 6vh, 4.5rem); }
.hero-inner h1 { color: #fff; text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35); }
.hero-inner h1 .accent { color: var(--orange-light); }
.hero-inner .subtitle { color: rgba(255, 255, 255, 0.92); max-width: 40em; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4); }
.hero-inner .kicker { color: var(--orange-light); }

/* Parallax quote / image bands */
.band {
  position: relative; overflow: hidden; color: #fff; text-align: center;
  padding: clamp(3rem, 10vh, 5.5rem) 0;
}
.band-media { position: absolute; inset: -22% 0; z-index: 0; will-change: transform; }
.band-media img { width: 100%; height: 100%; object-fit: cover; }
.band::after { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(30, 40, 54, 0.6); }
.band .wrap { position: relative; z-index: 2; }

/* Section-heading bands: the image runs behind the heading */
.band-head { padding: clamp(3.25rem, 14vh, 6rem) 0; }
.band-head .band-media { inset: -45% 0; }
.band-head::after { background: rgba(30, 40, 54, 0.52); }
.band-head .kicker { color: var(--orange-light); margin-bottom: 0.5em; }
.band-head h2 {
  color: #fff; font-family: var(--font-body); font-weight: 600;
  font-size: clamp(1.8rem, 4vw, 2.7rem); margin: 0;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}
.band-head .band-sub {
  color: rgba(255, 255, 255, 0.92); font-weight: 300;
  font-size: clamp(1.02rem, 2vw, 1.25rem); margin: 0.45em 0 0;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
}
.band blockquote {
  font-family: var(--font-display); font-style: italic; font-weight: 600;
  font-size: clamp(1.3rem, 2.8vw, 1.9rem); line-height: 1.45; margin: 0 auto; max-width: 30em;
}
.band cite { display: block; font-family: var(--font-body); font-style: normal; font-weight: 400; font-size: 1rem; margin-top: 1.2em; color: var(--orange-light); letter-spacing: 0.08em; }
.band .band-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.6rem, 3.6vw, 2.6rem); margin: 0; }

/* ---------- Sections ---------- */
.section { padding: clamp(2rem, 5.5vh, 3.25rem) 0; }
.section.alt { background: var(--bg-alt); }
.section-lede { max-width: 46em; }
.grid-2 { display: grid; gap: clamp(1.25rem, 3vw, 2.5rem); align-items: center; }
@media (min-width: 800px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-2.media-right .col-media { order: 2; }
}
.col-media img { border-radius: 10px; box-shadow: 0 12px 40px rgba(44, 62, 80, 0.18); }

.cards { display: grid; gap: 1.5rem; margin-top: 1.5rem; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: #fff; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 6px 24px rgba(44, 62, 80, 0.1); transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 36px rgba(44, 62, 80, 0.16); }
.card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.card-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.card-body h2 { font-size: 1.35rem; margin-bottom: 0.4em; }
.card-body p { flex: 1; margin-bottom: 1em; color: var(--slate); font-size: 0.98rem; }
.card-link { font-weight: 600; letter-spacing: 0.04em; }
.card-link::after { content: " →"; }

.testimonial {
  border-left: 4px solid; border-image: var(--grad) 1;
  background: var(--bg-alt); border-radius: 0 10px 10px 0;
  padding: 1.4rem 1.6rem; margin: 1.25rem 0 0; max-width: 46em;
}
.testimonial p { font-style: italic; color: var(--slate); margin-bottom: 0.8em; }
.testimonial cite { font-style: normal; font-weight: 600; color: var(--charcoal); }

.btn {
  display: inline-block; background: var(--grad); color: #fff !important; font-weight: 600;
  padding: 0.8em 1.7em; border-radius: 999px; letter-spacing: 0.03em;
  box-shadow: 0 6px 18px rgba(232, 113, 2, 0.35); transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover, .btn:focus { text-decoration: none; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(232, 113, 2, 0.42); }
.btn-ghost {
  display: inline-block; border: 2px solid var(--orange); color: var(--orange); font-weight: 600;
  padding: 0.7em 1.6em; border-radius: 999px; letter-spacing: 0.03em;
}
.btn-ghost:hover, .btn-ghost:focus { background: var(--orange); color: #fff; text-decoration: none; }

.deflist { margin: 1.2rem 0 0; padding: 0; list-style: none; }
.deflist li { padding: 0.55em 0 0.55em 1.6em; position: relative; color: var(--slate); }
.deflist li::before { content: ""; position: absolute; left: 0; top: 1.05em; width: 0.75em; height: 0.2em; border-radius: 2px; background: var(--grad); }
.deflist strong { color: var(--charcoal); }

.note { color: var(--slate-2); font-size: 0.95rem; }

/* reveal on scroll (hidden state only applies once JS has loaded) */
html.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
html.js .reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- CTA ---------- */
.cta { text-align: center; padding: clamp(2.5rem, 7vh, 4rem) 0; background: var(--bg-alt); }
.cta h2 { font-family: var(--font-display); color: var(--orange); font-size: clamp(1.8rem, 4vw, 2.6rem); }
.cta p { max-width: 36em; margin-left: auto; margin-right: auto; color: var(--slate); }

/* ---------- Footer ---------- */
.site-footer { background: var(--charcoal); color: #cfd8dc; padding: 3.5rem 0 2rem; font-size: 0.95rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--orange-light); }
.footer-grid { display: grid; gap: 2rem; margin-bottom: 2.5rem; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-logo svg, .footer-logo img { height: 40px; width: auto; margin-bottom: 1rem; }
.site-footer h4 { color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.14em; margin: 0 0 0.9em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.55em; }
.footer-social { display: flex; gap: 0.9rem; margin-top: 1rem; }
.footer-social a { display: inline-flex; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.1); align-items: center; justify-content: center; transition: background 0.2s; }
.footer-social a:hover { background: var(--orange); }
.footer-social svg { width: 20px; height: 20px; fill: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 1.4rem; display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: space-between; color: var(--grey); font-size: 0.85rem; }

/* generic page content fallback */
.page-content { padding: 8rem 0 4rem; }
.page-content .entry { max-width: 46em; }
.page-content .subtitle { max-width: 40em; margin-bottom: 1.5rem; }
.contact-grid { align-items: start; margin-top: 1.5rem; }

/* Multiple buttons together in a CTA block */
.cta .btn + .btn-ghost, .cta .btn-ghost + .btn { margin-left: 0.8rem; }

/* ---------- Contact form ---------- */
.contact-form { max-width: 32em; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; font-size: 0.9rem; letter-spacing: 0.02em; color: var(--charcoal); margin-bottom: 0.4em; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--charcoal); background: #fff;
  border: 1.5px solid #D7DBDE; border-radius: 8px; padding: 0.7em 0.9em;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(232, 113, 2, 0.15);
}
.field textarea { resize: vertical; min-height: 8em; }
.contact-form .btn { border: 0; cursor: pointer; font: inherit; font-size: 1rem; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-notice { border-radius: 8px; padding: 0.9em 1.1em; margin: 0 0 1.2rem; font-size: 0.95rem; }
.form-notice-success { background: rgba(39, 174, 96, 0.12); color: #1e8449; }
.form-notice-error { background: rgba(231, 76, 60, 0.1); color: #c0392b; }
