/*
Theme Name: PXY Reformer Pilates
Theme URI: https://pxyreformerpilates.com/
Author: WWeb Design
Author URI: https://wwebdesign.co.uk/
Description: Lightweight, code-registered ACF-blocks theme for PXY Reformer Pilates. Bright, warm, multi-studio ready. No page builder, no build step.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.1
License: GPL-2.0-or-later
Text Domain: pxy
*/

/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
  /* Surfaces — warm cream base; only inner cards use white. Never fill a
     section background with plain #fff. */
  --pxy-bg:           #F5EFE6; /* warm cream — page background */
  --pxy-bg-alt:       #EFE6D7; /* deeper cream — alternating sections */
  --pxy-bg-sage:      #E8ECE1; /* pale sage tint — soft section */
  --pxy-card-bg:      #FFFFFF; /* discrete card surface */

  /* Ink */
  --pxy-text:         #2B2926; /* off-black body/heading */
  --pxy-muted:        #6E675C; /* warm grey secondary text */
  --pxy-on-dark:      #FBF8F2; /* text on sage/terracotta fills */

  /* Brand accents */
  --pxy-sage:         #7C8B6B; /* primary accent */
  --pxy-sage-dark:    #5F6D50; /* hover / headings on sage */
  --pxy-terracotta:      #C37A67; /* CTA / action */
  --pxy-terracotta-dark: #A85E4B; /* CTA hover */

  /* Lines */
  --pxy-border:       #E3D8C6; /* soft warm border */
  --pxy-border-strong:#D6C7AE;

  /* Layout */
  --pxy-content-max:    1200px;
  --pxy-content-narrow: 780px;
  --pxy-gutter:         clamp(20px, 5vw, 48px);
  --pxy-header-height:  80px;
  --pxy-radius:         12px;
  --pxy-radius-lg:      20px;
  --pxy-section-y:      clamp(56px, 8vw, 112px);

  /* Type */
  --pxy-font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --pxy-font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --pxy-shadow-sm: 0 2px 10px rgba(43, 41, 38, 0.06);
  --pxy-shadow:    0 12px 40px rgba(43, 41, 38, 0.10);
}

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

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

body {
  margin: 0;
  background-color: var(--pxy-bg);
  color: var(--pxy-text);
  font-family: var(--pxy-font-body);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
  overflow-x: hidden;
}

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

a { color: var(--pxy-terracotta-dark); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--pxy-terracotta); }

h1, h2, h3, h4, h5 {
  font-family: var(--pxy-font-head);
  font-weight: 500;
  font-optical-sizing: auto;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--pxy-text);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); }
h4 { font-size: 1.2rem; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1.1em; padding-left: 1.2em; }

hr { border: 0; border-top: 1px solid var(--pxy-border); margin: 2.5rem 0; }

::selection { background: var(--pxy-sage); color: var(--pxy-on-dark); }

:focus-visible { outline: 2px solid var(--pxy-sage-dark); outline-offset: 3px; }

/* ==========================================================================
   Layout helpers (shared across blocks)
   ========================================================================== */
.pxy-container {
  width: 100%;
  max-width: var(--pxy-content-max);
  margin-inline: auto;
  padding-inline: var(--pxy-gutter);
}
.pxy-container--narrow { max-width: var(--pxy-content-narrow); }

.pxy-section { padding-block: var(--pxy-section-y); }
.pxy-section--alt   { background-color: var(--pxy-bg-alt); }
.pxy-section--sage  { background-color: var(--pxy-bg-sage); }

.pxy-eyebrow {
  display: inline-block;
  font-family: var(--pxy-font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pxy-sage-dark);
  margin-bottom: 0.9rem;
}

.pxy-lead { font-size: 1.18rem; color: var(--pxy-muted); }

.pxy-section__head { max-width: 640px; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.pxy-section__head--center { margin-inline: auto; text-align: center; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.pxy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--pxy-font-body);
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1;
  padding: 0.95em 1.7em;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
  text-align: center;
}
.pxy-btn:hover { transform: translateY(-2px); }

.pxy-btn--primary { background: var(--pxy-terracotta); color: var(--pxy-on-dark); }
.pxy-btn--primary:hover { background: var(--pxy-terracotta-dark); color: var(--pxy-on-dark); }

.pxy-btn--sage { background: var(--pxy-sage); color: var(--pxy-on-dark); }
.pxy-btn--sage:hover { background: var(--pxy-sage-dark); color: var(--pxy-on-dark); }

.pxy-btn--outline { background: transparent; color: var(--pxy-text); border-color: var(--pxy-border-strong); }
.pxy-btn--outline:hover { border-color: var(--pxy-text); color: var(--pxy-text); background: transparent; }

.pxy-btn--ghost { background: transparent; color: var(--pxy-text); padding-inline: 0.2em; }
.pxy-btn--ghost:hover { color: var(--pxy-terracotta-dark); }

.pxy-btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* On dark (sage/terracotta) fills, flip the button palette */
.pxy-on-dark .pxy-btn--primary { background: var(--pxy-on-dark); color: var(--pxy-terracotta-dark); }
.pxy-on-dark .pxy-btn--primary:hover { background: #fff; color: var(--pxy-terracotta-dark); }
.pxy-on-dark .pxy-btn--outline { border-color: rgba(255,255,255,.55); color: var(--pxy-on-dark); }
.pxy-on-dark .pxy-btn--outline:hover { border-color: #fff; color: #fff; }

/* ==========================================================================
   Accessibility
   ========================================================================== */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.pxy-skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--pxy-text); color: #fff; padding: 12px 20px; border-radius: 0 0 8px 0;
}
.pxy-skip-link:focus { left: 0; color: #fff; }

/* ==========================================================================
   Simple page header + prose (legal / generic pages)
   ========================================================================== */
.pxy-page-header { padding-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.pxy-page-header__title { margin: 0.2em 0 0; }

.pxy-prose { font-size: 1.05rem; color: var(--pxy-text); }
.pxy-prose h2 { margin-top: 2rem; font-size: clamp(1.5rem, 2.6vw, 2rem); }
.pxy-prose h3 { margin-top: 1.6rem; }
.pxy-prose a { text-decoration: underline; text-underline-offset: 3px; }
.pxy-prose ul, .pxy-prose ol { margin-left: 0.2em; }
.pxy-prose li { margin-bottom: 0.4em; }
.pxy-prose img { border-radius: var(--pxy-radius); margin-block: 1.5rem; }
.pxy-prose blockquote {
  margin: 1.5rem 0;
  padding: 0.5rem 0 0.5rem 1.4rem;
  border-left: 3px solid var(--pxy-sage);
  color: var(--pxy-muted);
  font-style: italic;
}

/* WordPress core alignment helpers for block content */
.alignfull { margin-inline: calc(50% - 50vw); max-width: 100vw; }
.alignwide { margin-inline: auto; max-width: min(1320px, 92vw); }
