/*
Theme Name: Jachym Spilka Golf Coaching
Theme URI: https://jachymspilka.com
Author: Jachym Spilka
Description: Custom one-off theme for jachymspilka.com, a golf coaching site. Deep green / ivory / brass palette, Fraunces + Work Sans. Fully responsive: phone, tablet, laptop, large desktop.
Version: 1.1
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: jachym-golf
*/

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px; /* offset for the sticky header when jumping to #anchors */
}

body {
  margin: 0;
  font-family: 'Work Sans', sans-serif;
  background: #F7F4EC;
  color: #1A1F1B;
  overflow-x: hidden; /* safety net against any accidental horizontal scroll on narrow phones */
}

body.menu-open { overflow: hidden; } /* lock background scroll while the mobile menu is open */

h1, h2, h3, .display { font-family: 'Fraunces', serif; margin: 0; }

a { text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* ---------- Fluid type scale (scales smoothly between phone and desktop, no jumps) ---------- */
.h1 { font-size: clamp(30px, 4.6vw, 56px); line-height: 1.1; font-weight: 600; }
.h2 { font-size: clamp(25px, 3vw, 36px); line-height: 1.2; font-weight: 600; }
.h3 { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.3; font-weight: 600; }
.lead { font-size: clamp(15px, 1.3vw, 18px); line-height: 1.6; }
.stat-num { font-family: 'Fraunces', serif; font-size: clamp(22px, 2.2vw, 28px); font-weight: 600; color: #1F3A2E; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

/* ---------- Sticky header + nav ---------- */
.site-header {
  background: #1F3A2E;
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(0,0,0,0.08);
}
.site-header .container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
@media (min-width: 640px) {
  .site-header .container { height: 84px; }
}
.site-logo {
  font-family: 'Fraunces', serif;
  font-size: clamp(17px, 1.6vw, 21px);
  font-weight: 600;
  color: #F7F4EC;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.primary-nav-wrap { display: flex; align-items: center; gap: 32px; }
.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.4vw, 40px);
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary-nav li { display: inline-block; }
.nav-link {
  color: #E7E2D2;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: border-color .15s ease;
}
.nav-link:hover, .nav-link:focus-visible { border-bottom-color: #B08D57; }

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- Buttons (44px min touch target throughout) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 2px;
  font-family: 'Work Sans', sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  min-height: 44px;
}
.btn-primary { background: #B08D57; color: #1A1F1B; }
.btn-primary:hover { background: #C29D68; }
.btn-ghost { background: transparent; color: #F7F4EC; border-color: rgba(247,244,236,0.4); }
.btn-ghost:hover { border-color: #F7F4EC; }
.btn-dark { background: #1F3A2E; color: #F7F4EC; }
.btn-dark:hover { background: #16291F; }
.btn:focus-visible { outline: 2px solid #B08D57; outline-offset: 2px; }

/* ---------- Cards / misc ---------- */
.card {
  background: #FFFFFF;
  border: 1px solid #E4DFCE;
  border-radius: 4px;
  transition: box-shadow .18s ease, transform .18s ease;
  padding: clamp(24px, 2.4vw, 36px) clamp(20px, 2vw, 30px);
}
.card:hover { box-shadow: 0 18px 40px rgba(26,31,27,0.08); transform: translateY(-2px); }

.pill {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid #B08D57;
  color: #6E4F27;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: 999px;
}

.eyebrow {
  color: #6E4F27;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-link { color: #C9CFC6; font-size: 14px; }
.footer-link:hover { color: #FFFFFF; }

/* ---------- Layout helpers ---------- */
.stack { display: flex; gap: clamp(32px, 5vw, 64px); align-items: flex-start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 32px; }
.section { width: 100%; padding: clamp(56px, 8vw, 96px) 0; }
.section-dark { background: #16291F; color: #F7F4EC; }
.section-tint { background: #EFEADA; }

/* ---------- Hero ---------- */
.hero { background: #1F3A2E; padding: clamp(40px, 6vw, 88px) 0 0 0; }
.hero .container {
  display: flex;
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}
.hero-copy { flex: 1 1 360px; min-width: 300px; padding-bottom: clamp(48px, 8vw, 96px); }
.hero-copy h1 { color: #F7F4EC; margin: 20px 0 0 0; }
.hero-copy p { color: #C9CFC6; margin: 20px 0 0 0; max-width: 460px; }
.hero-media { flex: 1 1 320px; min-width: 280px; align-self: flex-end; max-width: 480px; }
.hero-photo {
  width: 100%;
  aspect-ratio: 4/5;
  background: linear-gradient(160deg, #2C4A3B, #16291F);
  border-radius: 4px 4px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(247,244,236,0.35);
  font-size: 13px;
  text-align: center;
  padding: 24px;
}

/* ---------- Credentials bar ---------- */
.credentials { background: #16291F; }
.credentials .container {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: clamp(16px, 2vw, 32px);
  padding: 24px clamp(20px, 4vw, 48px);
}
.credentials-item { display: flex; align-items: center; gap: 12px; color: #E7E2D2; font-size: 14px; }
.credentials-item svg { flex-shrink: 0; }

/* ---------- Pricing ---------- */
.price-card { border-radius: 4px; padding: clamp(28px, 3vw, 36px) clamp(22px, 2.4vw, 30px); display: flex; flex-direction: column; }
.price-card-default { background: #1F3A2E; border: 1px solid rgba(247,244,236,0.12); }
.price-card-featured { background: #2C4A3B; border: 1px solid #B08D57; position: relative; margin-top: 14px; }
.price-title { font-size: 15px; font-weight: 600; color: #E7E2D2; }
.price-amount { font-family: 'Fraunces', serif; font-size: clamp(30px, 3vw, 38px); font-weight: 600; color: #F7F4EC; margin: 16px 0 4px 0; }
.price-period { font-size: 13px; color: #9DA595; margin-bottom: 24px; }
.price-divider { height: 1px; background: rgba(247,244,236,0.12); margin-bottom: 24px; }
.price-features { font-size: 14px; color: #C9CFC6; line-height: 2; flex-grow: 1; }
.price-badge { position: absolute; top: -14px; left: 30px; background: #B08D57; border-color: #B08D57; color: #16291F; }

/* ---------- Footer ---------- */
.site-footer { width: 100%; background: #16291F; padding: 48px 0 32px 0; }
.site-footer .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-nav { display: flex; gap: 28px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.footer-nav li { display: inline-block; }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid #E4DFCE; padding: 22px 0; }
.faq-item h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.faq-item p { font-size: 15px; line-height: 1.6; color: #4A4F44; margin: 0; }

/* ---------- Contact box ---------- */
.contact-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(24px, 4vw, 48px);
  background: #FFFFFF;
  border: 1px solid #E4DFCE;
  border-radius: 4px;
  padding: clamp(32px, 5vw, 56px);
  flex-wrap: wrap;
}

/* =========================================================
   RESPONSIVE BREAKPOINTS
   Desktop:  1025px and up   (default styles above)
   Tablet:   641px – 1024px
   Phone:    max 640px
   Small phone fine-tuning: max 380px
   ========================================================= */

/* ---- Tablet ---- */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .credentials .container { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hero .container { flex-wrap: wrap; }
  .hero-media { order: -1; max-width: 360px; margin: 0 auto; }
  .hero-copy { text-align: center; margin: 0 auto; }
  .hero-copy p { margin-left: auto; margin-right: auto; }
}

/* ---- Phone: collapsed nav + single columns ---- */
@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; }
  .primary-nav-wrap {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1F3A2E;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px clamp(20px, 4vw, 48px) 24px;
    box-shadow: 0 16px 28px rgba(0,0,0,0.2);
  }
  .primary-nav-wrap.is-open { display: flex; }
  .primary-nav-wrap .primary-nav { flex-direction: column; align-items: stretch; gap: 0; width: 100%; }
  .primary-nav-wrap .primary-nav li { width: 100%; }
  .primary-nav-wrap .nav-link {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid rgba(247,244,236,0.1);
    min-height: 44px;
  }
  .primary-nav-wrap .btn-primary { width: 100%; margin-top: 14px; }

  .stack, .contact-box { flex-direction: column; align-items: stretch; }
  .contact-box .btn { width: 100%; }
  .site-footer .container { flex-direction: column; align-items: flex-start; text-align: left; }
  .footer-nav { gap: 20px; }
}

/* ---- Small phone ---- */
@media (max-width: 640px) {
  .grid-3 { grid-template-columns: 1fr; }
  .credentials .container { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px 20px; padding: 20px clamp(20px, 5vw, 32px); }
  .price-card-featured { margin-top: 0; order: -1; } /* show the featured pricing tier first on phones */
  .hero-copy > div { flex-direction: column; align-items: stretch; }
  .hero-copy .btn { width: 100%; }
  .section { padding: 48px 0; }
}

/* ---- Very small phone ---- */
@media (max-width: 380px) {
  .credentials .container { grid-template-columns: 1fr; }
  .site-logo { font-size: 16px; }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .btn { transition: none; }
}
