/*
Theme Name:  Miguel Aragoncillo
Theme URI:   https://miguelaragoncillo.com
Author:      Miguel Aragoncillo
Description: Personal theme for Miguel Aragoncillo — Strength Coach, Movement Scientist, Licensed Massage Therapist.
Version:     1.1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License:     Private
Text Domain: miguel-aragoncillo
*/

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --black:   #0a0a0a;
  --white:   #f5f2ec;
  --cream:   #ede9e0;
  --accent:  #c8401e;
  --muted:   #6b6456;
  --border:  #d4cfc5;
  --card:    #ffffff;

  /* Font stacks — web font loads from Google Fonts (enqueued in
     functions.php). Fallbacks are tight so layout barely shifts. */
  --f-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --f-body:    'DM Sans', 'Helvetica Neue', Arial, sans-serif;
  --f-mono:    'DM Mono', 'Courier New', Courier, monospace;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--white);
  color: var(--black);
  font-family: var(--f-body);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}

/* Force fonts on elements WordPress themes commonly override */
body, p, a, li, span, td, th, blockquote,
.entry-content, .widget, .comment-content {
  font-family: var(--f-body);
}

h1, h2, h3, h4, h5, h6,
.entry-title, .site-title,
.ma-post-title, .ma-service-title,
.wp-block-heading {
  font-family: var(--f-display) !important;
  font-weight: 700;
  line-height: 1.1;
}

/* ============================================================
   ADMIN BAR OFFSET — prevents fixed nav overlapping WP toolbar
   ============================================================ */
.admin-bar .ma-nav          { top: 32px; }
.admin-bar .ma-mobile-menu  { top: calc(32px + 58px); }
.admin-bar .ma-hero         { padding-top: calc(65px + 32px); }

@media screen and (max-width: 782px) {
  .admin-bar .ma-nav         { top: 46px; }
  .admin-bar .ma-mobile-menu { top: calc(46px + 58px); }
  .admin-bar .ma-hero        { padding-top: calc(65px + 46px); }
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.ma-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 3rem;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.ma-nav-logo {
  font-family: var(--f-mono) !important;
  font-size: .78rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--black);
  text-decoration: none;
}

/* WordPress injects a <ul> for nav menus — target it */
.ma-nav-menu,
.ma-nav-menu ul {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0; padding: 0;
}

.ma-nav-menu a {
  font-family: var(--f-mono) !important;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s;
}

.ma-nav-menu a:hover,
.ma-nav-menu .current-menu-item > a { color: var(--accent); }

/* Hide WP sub-menus in top nav */
.ma-nav-menu ul { display: none; }

.ma-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.ma-hamburger span {
  width: 22px; height: 1.5px;
  background: var(--black);
  display: block;
}

/* ============================================================
   MOBILE MENU
   ============================================================ */
.ma-mobile-menu {
  display: none;
  position: fixed;
  top: 58px; left: 0; right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 2rem;
  z-index: 899;
}

.ma-mobile-menu.is-open { display: block; }

.ma-mobile-menu ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.ma-mobile-menu a {
  font-family: var(--f-mono) !important;
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--black);
  text-decoration: none;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.ma-btn {
  font-family: var(--f-mono) !important;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .85rem 1.8rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background .22s, color .22s, border-color .22s;
  -webkit-appearance: none;
}

.ma-btn-primary {
  background: var(--black) !important;
  color: var(--white) !important;
  border: 1.5px solid var(--black) !important;
}
.ma-btn-primary:hover,
.ma-btn-primary:focus {
  background: var(--black) !important;
  color: var(--white) !important;
  border-color: var(--black) !important;
  opacity: .82;
}

.ma-btn-secondary {
  background: transparent !important;
  color: var(--black) !important;
  border: 1.5px solid var(--black) !important;
}
.ma-btn-secondary:hover,
.ma-btn-secondary:focus {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  background: transparent !important;
}

.ma-btn-ghost {
  background: transparent !important;
  color: rgba(255,255,255,.75) !important;
  border: 1.5px solid rgba(255,255,255,.25) !important;
}
.ma-btn-ghost:hover,
.ma-btn-ghost:focus {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}

/* ============================================================
   HERO
   ============================================================ */
.ma-hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding-top: 65px;
}

.ma-hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5rem 4rem 5rem 5rem;
}

.ma-eyebrow {
  font-family: var(--f-mono) !important;
  font-size: .7rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 1.8rem;
}

.ma-hero h1 {
  font-size: clamp(3rem, 5vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -.02em;
  margin-bottom: 1.8rem;
}

.ma-hero h1 em {
  font-style: italic;
  color: var(--accent);
}

.ma-hero-sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 420px;
  margin-bottom: 2.8rem;
}

.ma-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Hero right panel */
.ma-hero-panel {
  background: var(--cream);
  position: relative;
  overflow: hidden;
}

.ma-hero-panel-bg {
  position: absolute; inset: 0;
  background: linear-gradient(145deg, #e8e2d5 0%, #d4cdc0 100%);
}

.ma-hero-watermark {
  position: absolute;
  bottom: 3rem; left: 3rem;
  font-family: var(--f-display) !important;
  font-style: italic;
  font-size: 8rem;
  font-weight: 700;
  color: rgba(0,0,0,.06);
  line-height: 1;
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
}

.ma-hero-badge {
  position: absolute;
  top: 3rem; right: 3rem;
  width: 110px; height: 110px;
  border-radius: 50%;
  border: 1.5px solid var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.ma-hero-badge span {
  font-family: var(--f-mono) !important;
  font-size: .58rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  line-height: 1.5;
}

/* ============================================================
   ABOUT STRIP
   ============================================================ */
.ma-about {
  background: var(--black);
  color: var(--white);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  padding: 5rem;
}

.ma-about h2 {
  font-family: var(--f-display) !important;
  font-size: clamp(2rem, 3.5vw, 3rem);
  color: var(--white);
  margin-bottom: 1.2rem;
}

.ma-stats {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.ma-stat-num {
  font-family: var(--f-display) !important;
  font-size: 3rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1;
}

.ma-stat-lbl {
  font-family: var(--f-mono) !important;
  font-size: .63rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  margin-top: .3rem;
}

.ma-about-body {
  font-size: .98rem;
  color: rgba(255,255,255,.7);
  line-height: 1.8;
  margin-bottom: 1.2rem;
}

/* ============================================================
   SECTION WRAPPER
   ============================================================ */
.ma-section {
  padding: 6rem 5rem;
}

.ma-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 3.5rem;
}

.ma-section h2 {
  font-family: var(--f-display) !important;
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  font-weight: 700;
  margin-bottom: .5rem;
}

/* ============================================================
   BLOG GRID
   ============================================================ */
.ma-blog { background: var(--cream); }

.ma-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 1.5px;
  background: var(--border);
}

.ma-card {
  background: var(--card);
  padding: 2.5rem;
  position: relative;
  transition: background .2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.ma-card:hover { background: #faf9f6; }

.ma-card.is-featured {
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 480px;
  background: var(--black);
  color: var(--white);
  padding: 3rem;
}

.ma-card.is-featured:hover { background: #111; }

.ma-card-tag {
  font-family: var(--f-mono) !important;
  font-size: .62rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 1rem;
}

.ma-card h3 {
  font-family: var(--f-display) !important;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: .8rem;
}

.ma-card.is-featured h3 {
  font-size: 1.9rem;
  color: var(--white);
}

.ma-card-excerpt {
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ma-card.is-featured .ma-card-excerpt {
  color: rgba(255,255,255,.55);
  -webkit-line-clamp: 4;
}

.ma-card-meta {
  font-family: var(--f-mono) !important;
  font-size: .62rem;
  letter-spacing: .08em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: .8rem;
}

.ma-card.is-featured .ma-card-meta { color: rgba(255,255,255,.35); }

.ma-card-num {
  font-family: var(--f-display) !important;
  font-size: 5rem;
  font-weight: 900;
  color: rgba(0,0,0,.04);
  position: absolute;
  top: 1rem; right: 1.5rem;
  line-height: 1;
  user-select: none;
  pointer-events: none;
}

.ma-card.is-featured .ma-card-num { color: rgba(255,255,255,.04); }

.ma-card-arrow {
  position: absolute;
  bottom: 2.5rem; right: 2.5rem;
  font-size: 1.1rem;
  transition: transform .2s;
}

.ma-card:hover .ma-card-arrow { transform: translate(3px,-3px); }

/* ============================================================
   PAGINATION — overrides WP default pagination styles
   ============================================================ */
.ma-pagination,
.ma-pagination .page-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  list-style: none;
  margin: 3rem 0 0;
  padding: 0;
}

.ma-pagination .page-numbers a,
.ma-pagination .page-numbers span {
  font-family: var(--f-mono) !important;
  font-size: .68rem;
  letter-spacing: .1em;
  padding: .6rem 1.1rem;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--black);
  text-decoration: none;
  display: inline-block;
  transition: all .2s;
}

.ma-pagination .page-numbers a:hover,
.ma-pagination .page-numbers span.current {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

/* ============================================================
   SERVICES
   ============================================================ */
.ma-services-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  border: 1.5px solid var(--border);
  margin-top: 3.5rem;
}

.ma-svc {
  padding: 2.8rem;
  border-right: 1.5px solid var(--border);
  transition: background .2s;
}

.ma-svc:last-child { border-right: none; }
.ma-svc:hover { background: var(--cream); }

.ma-svc-num {
  font-family: var(--f-mono) !important;
  font-size: .65rem;
  letter-spacing: .2em;
  color: var(--accent);
  display: block;
  margin-bottom: 1.5rem;
}

.ma-svc h3 {
  font-family: var(--f-display) !important;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.ma-svc p {
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ============================================================
   PRESS STRIP
   ============================================================ */
.ma-press {
  padding: 3rem 5rem;
  background: var(--cream);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 4rem;
  flex-wrap: wrap;
}

.ma-press-lbl {
  font-family: var(--f-mono) !important;
  font-size: .63rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  flex-shrink: 0;
}

.ma-press-list {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  margin: 0; padding: 0;
}

.ma-press-list li {
  font-family: var(--f-display) !important;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--muted);
}

/* ============================================================
   CTA SECTION
   ============================================================ */
.ma-cta {
  background: var(--black);
  color: var(--white);
  padding: 8rem 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.ma-cta-watermark {
  position: absolute;
  font-family: var(--f-display) !important;
  font-size: 18rem;
  font-weight: 900;
  color: rgba(255,255,255,.03);
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
}

.ma-cta h2 {
  font-family: var(--f-display) !important;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  color: var(--white);
  position: relative;
  margin-bottom: 1.5rem;
}

.ma-cta p {
  color: rgba(255,255,255,.5);
  max-width: 480px;
  margin: 0 auto 2.5rem;
  position: relative;
}

/* ============================================================
   FOOTER
   ============================================================ */
.ma-footer {
  padding: 3.5rem 5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.ma-footer-brand {
  font-family: var(--f-display) !important;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--black);
}

/* WP nav menu in footer */
.ma-footer-nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0; padding: 0;
  flex-wrap: wrap;
}

.ma-footer-nav a {
  font-family: var(--f-mono) !important;
  font-size: .65rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s;
}

.ma-footer-nav a:hover { color: var(--accent); }

.ma-footer-copy {
  font-family: var(--f-mono) !important;
  font-size: .62rem;
  color: var(--muted);
}

/* ============================================================
   SINGLE POST
   ============================================================ */
.ma-post-hero {
  background: var(--black);
  color: var(--white);
  padding: 5rem;
  margin-top: 58px;
}

.ma-post-hero h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  color: var(--white);
  font-weight: 900;
  letter-spacing: -.02em;
  max-width: 800px;
  margin-top: 1rem;
}

.ma-post-content {
  max-width: 740px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
  font-size: 1.05rem;
  line-height: 1.85;
  color: #3d3730;
}

.ma-post-content h2,
.ma-post-content h3 {
  font-family: var(--f-display) !important;
  margin: 2rem 0 1rem;
}

.ma-post-content p { margin-bottom: 1.4rem; }

.ma-post-content a { color: var(--accent); text-decoration: underline; }

.ma-post-content img { max-width: 100%; height: auto; }

.ma-post-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

/* ============================================================
   PAGE TEMPLATE (About, Coaching, etc.)
   ============================================================ */
.ma-page-hero {
  background: var(--cream);
  padding: 5rem;
  margin-top: 58px;
  border-bottom: 1px solid var(--border);
}

.ma-page-hero h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 900;
  letter-spacing: -.02em;
}

.ma-page-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
  font-size: 1.05rem;
  line-height: 1.85;
  color: #3d3730;
}

.ma-page-content h2,
.ma-page-content h3 {
  font-family: var(--f-display) !important;
  margin: 2rem 0 1rem;
}

.ma-page-content p  { margin-bottom: 1.4rem; }
.ma-page-content ul,
.ma-page-content ol { margin: 0 0 1.4rem 1.5rem; }
.ma-page-content a  { color: var(--accent); text-decoration: underline; }
.ma-page-content img{ max-width: 100%; height: auto; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .ma-nav          { padding: 1rem 1.5rem; }
  .ma-nav-menu     { display: none; }
  .ma-hamburger    { display: flex; }

  .ma-hero           { grid-template-columns: 1fr; min-height: auto; }
  .ma-hero-text      { padding: 3rem 1.5rem 2.5rem; }
  .ma-hero-panel     { display: none; }

  .ma-about          { grid-template-columns: 1fr; gap: 2.5rem; padding: 3.5rem 1.5rem; }
  .ma-stats          { grid-template-columns: repeat(2,1fr); }

  .ma-section        { padding: 4rem 1.5rem; }
  .ma-section-head   { flex-direction: column; align-items: flex-start; gap: 1rem; }

  .ma-grid           { grid-template-columns: 1fr; }
  .ma-card.is-featured { grid-row: span 1; min-height: 320px; }

  .ma-services-grid  { grid-template-columns: 1fr; }
  .ma-svc            { border-right: none; border-bottom: 1.5px solid var(--border); }
  .ma-svc:last-child { border-bottom: none; }

  .ma-press          { padding: 2.5rem 1.5rem; flex-direction: column; align-items: flex-start; gap: 1.5rem; }

  .ma-cta            { padding: 5rem 1.5rem; }
  .ma-cta-watermark  { font-size: 8rem; }

  .ma-footer         { flex-direction: column; text-align: center; padding: 2.5rem 1.5rem; }
  .ma-footer-nav ul  { justify-content: center; }

  .ma-post-hero,
  .ma-page-hero      { padding: 3rem 1.5rem; }

  .ma-post-content,
  .ma-page-content   { padding: 2.5rem 1.5rem 4rem; }
}

@media (max-width: 480px) {
  .ma-ctas           { flex-direction: column; }
  .ma-stats          { grid-template-columns: 1fr; }
}
