/* =========================================================
   ADN Pilates — Theme CSS
   ========================================================= */

/* ----- Variables ---------------------------------------- */
:root {
  /* Brand palette — derived from logo */
  --color-gold:       #c4a96a;   /* logo gold — primary brand colour */
  --color-gold-dk:    #a8904f;   /* darker gold for hover */
  --color-dark:       #0d0d0d;   /* logo black */

  /* Complementary palette */
  --color-sage:       #5a6b4c;   /* deep sage green — pairs with gold */
  --color-sage-dk:    #404e36;
  --color-bg:         #faf8f4;   /* warm cream */
  --color-surface:    #ffffff;
  --color-text:       #1e1e1e;
  --color-text-muted: #7a7a7a;
  --color-border:     #e8e4db;

  /* Aliases kept for template compatibility */
  --color-primary:    var(--color-sage);
  --color-primary-dk: var(--color-sage-dk);
  --color-accent:     var(--color-gold);

  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --radius:    4px;
  --shadow-sm: 0 1px 4px rgba(0,0,0,.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,.1);

  --container-w: 1160px;
  --container-narrow-w: 720px;

  --header-h: 72px;
}

/* ----- Reset -------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-dk); }

/* ----- Typography --------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
p + p { margin-top: .875rem; }

/* ----- Layout ------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: 1.5rem;
}
.container--narrow { max-width: var(--container-narrow-w); }
.text-center { text-align: center; }
.section { padding-block: 5rem; }
.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

/* ----- Buttons ------------------------------------------ */
.btn {
  display: inline-block;
  padding: .65rem 1.6rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .03em;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
  border: 1.5px solid transparent;
}
.btn--primary {
  background: var(--color-gold);
  color: var(--color-dark);
  border-color: var(--color-gold);
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.btn--primary:hover {
  background: var(--color-gold-dk);
  border-color: var(--color-gold-dk);
  color: #fff;
}
.btn--ghost {
  background: transparent;
  color: var(--color-gold);
  border-color: var(--color-gold);
  letter-spacing: .04em;
}
.btn--ghost:hover {
  background: var(--color-gold);
  color: var(--color-dark);
}

/* ----- Header ------------------------------------------- */
:root {
  --color-header-bg:   #0d0d0d;
  --color-gold:        #c4a96a;   /* matches logo gold */
  --color-gold-dk:     #a8904f;
}

.site-header {
  height: var(--header-h);
  background: var(--color-header-bg);
  border-bottom: 1px solid rgba(196,169,106,.15);
  z-index: 100;
  position: sticky;
  top: 0;
  transition: box-shadow .3s;
}
.site-header.scrolled {
  box-shadow: 0 2px 24px rgba(0,0,0,.5);
}
.site-header.sticky { position: sticky; top: 0; }
.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

/* Logo image */
.logo img {
  height: 72px;
  width: 72px;
  object-fit: contain;
  display: block;
}
/* Logo text fallback (shown when no image) */
.logo-text {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 300;
  color: #fff;
  letter-spacing: .06em;
}
.logo-text em {
  font-style: italic;
  color: var(--color-gold);
}

/* Nav */
.main-nav {
  display: flex;
  align-items: center;
}
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  align-items: center;
}
.main-nav a {
  font-size: .85rem;
  font-weight: 400;
  color: rgba(255,255,255,.75);
  letter-spacing: .06em;
  text-transform: uppercase;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color .2s, color .2s;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--color-gold);
  border-bottom-color: var(--color-gold);
}

/* Language switcher */
.nav-lang {
  display: flex;
  gap: .5rem;
  margin-left: 2rem;
}
.lang-switch {
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .1em;
  color: rgba(255,255,255,.5);
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid rgba(255,255,255,.2);
  transition: all .2s;
}
.lang-switch.active,
.lang-switch:hover {
  color: var(--color-gold);
  border-color: var(--color-gold);
  background: transparent;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: rgba(255,255,255,.8);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}

/* ----- Hero --------------------------------------------- */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background: var(--color-dark);
  overflow: hidden;
}
.hero__video {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  filter: blur(0.6px) brightness(0.92);
  transform: scale(1.02); /* prevents blur edge bleed */
}
.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(0,0,0,.70) 0%,
    rgba(0,0,0,.45) 55%,
    rgba(0,0,0,.18) 100%
  );
}
.hero__content {
  position: relative;
  color: #fff;
  max-width: 600px;
}
.hero__eyebrow {
  font-size: .78rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  opacity: .75;
  display: flex;
  align-items: center;
  gap: .75rem;
}
.hero__eyebrow::before {
  content: '';
  display: inline-block;
  width: 32px;
  height: 1px;
  background: rgba(255,255,255,.6);
}
.hero__content h1 {
  color: #fff;
  margin-bottom: 1.25rem;
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  line-height: 1.1;
}
.hero__subtitle {
  font-size: 1.1rem;
  opacity: .85;
  margin-bottom: 2.5rem;
  max-width: 480px;
  line-height: 1.65;
}
.hero .btn--hero {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  background: transparent;
  color: var(--color-gold);
  border: 1.5px solid var(--color-gold);
  border-radius: 100px;
  padding: .8rem 2rem;
  font-size: .85rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: background .25s, border-color .25s, color .25s;
}
.hero .btn--hero:hover {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: var(--color-dark);
}
.hero .btn--hero svg { transition: transform .25s; }
.hero .btn--hero:hover svg { transform: translateX(4px); }

/* ----- Stats bar ---------------------------------------- */
.stats-bar {
  background: var(--color-dark);
  color: rgba(255,255,255,.65);
  padding-block: 1.1rem;
  border-top: 1px solid rgba(196,169,106,.25);
}
.stats-bar__inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}
.stats-bar__item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding-inline: 2.5rem;
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.stats-bar__item + .stats-bar__item {
  border-left: 1px solid rgba(255,255,255,.15);
}
.stats-bar__item strong {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--color-gold);
  color: #fff;
  letter-spacing: .02em;
}

/* ----- Page hero (inner pages) -------------------------- */
.page-hero {
  background: var(--color-primary);
  color: #fff;
  padding-block: 3.5rem 3rem;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 80% 50%, rgba(255,255,255,.06) 0%, transparent 60%),
    linear-gradient(135deg, rgba(0,0,0,.15) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent), transparent);
}
.page-hero .container { position: relative; }
.page-hero__eyebrow {
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  opacity: .6;
  margin-bottom: .75rem;
}
.page-hero h1 {
  color: #fff;
  margin-bottom: 0;
}
.page-hero__desc {
  margin-top: .75rem;
  font-size: 1rem;
  opacity: .75;
  max-width: 520px;
}
.page-hero .blog-card__date { opacity: .7; }

/* ----- Markdown table ----------------------------------- */
.page-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
  margin-block: 2rem;
}
.page-content thead tr {
  border-bottom: 2px solid var(--color-primary);
}
.page-content th {
  text-align: left;
  font-weight: 500;
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: .6rem 1rem .6rem 0;
}
.page-content td {
  padding: .8rem 1rem .8rem 0;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}
.page-content tr:last-child td { border-bottom: none; }
.page-content tbody tr:hover td { background: var(--color-bg); }

/* ----- Empty state -------------------------------------- */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--color-text-muted);
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius);
}

/* ----- Intro split section ------------------------------ */
.intro { padding-block: 6rem; }
.intro__split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.intro__image {
  position: relative;
}
.intro__image img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 2px;
  display: block;
}
.intro__image::before {
  content: '';
  position: absolute;
  inset: -1rem 1rem 1rem -1rem;
  border: 1.5px solid var(--color-gold);
  border-radius: 2px;
  z-index: -1;
  opacity: .4;
}
.intro__text .eyebrow {
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 1rem;
  display: block;
}
.intro__text h2 {
  margin-bottom: 1.5rem;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}
.intro__text p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}
.intro__text .btn { margin-top: 1rem; }

/* ----- Testimonials ------------------------------------- */
.testimonials {
  background: var(--color-primary);
  color: #fff;
  padding-block: 5rem;
}
.testimonials .section-title { color: #fff; }
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.testimonial {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius);
  padding: 2rem;
}
.testimonial__quote {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  opacity: .95;
}
.testimonial__quote::before { content: '\201C'; }
.testimonial__quote::after  { content: '\201D'; }
.testimonial__author {
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .65;
}

/* ----- Cards (classes preview) -------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}
.card {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow .2s;
}
.card:hover { box-shadow: var(--shadow-md); }
.card__image img { width: 100%; height: 220px; object-fit: cover; }
.card__body { padding: 1.5rem; }
.card__body h3 { margin-bottom: .5rem; }
.card__body p { color: var(--color-text-muted); margin-bottom: 1.25rem; font-size: .95rem; }

/* ----- Blog --------------------------------------------- */
.blog-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}
.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}
.blog-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.blog-card__image {
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
}
.blog-card__image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.blog-card:hover .blog-card__image img { transform: scale(1.04); }
.blog-card__placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--color-sage) 0%, var(--color-sage-dk) 100%);
}
.blog-card__body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.blog-card__date {
  display: block;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: .6rem;
}
.blog-card__body h2 {
  font-size: 1.2rem;
  line-height: 1.3;
  margin-bottom: .75rem;
}
.blog-card__body h2 a { color: var(--color-text); text-decoration: none; }
.blog-card__body h2 a:hover { color: var(--color-gold); }
.blog-card__body p {
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
  font-size: .9rem;
  line-height: 1.6;
  flex: 1;
}

/* Blog single */
.blog-post__featured-image { margin-block: 2rem; }
.blog-post__featured-image img { border-radius: var(--radius); width: 100%; max-height: 480px; object-fit: cover; }
.page-content { padding-block: 3rem; }
.page-content h2, .page-content h3 { margin-top: 2rem; margin-bottom: .75rem; font-family: var(--font-heading); }
.page-content ul, .page-content ol { padding-left: 1.5rem; margin-block: 1rem; }
.page-content li { margin-bottom: .4rem; line-height: 1.6; }
.page-content p { margin-bottom: 1.1rem; line-height: 1.8; }
/* Hide the first img in post body when a featured image is already shown above */
.blog-post__body > p:first-child > img:first-child { display: none; }
.blog-post__back { padding-bottom: 3rem; }

/* ----- Studio Videos ------------------------------------ */
.studio-videos { background: var(--color-dark); }
.studio-videos .section-title { color: #fff; }
.section-eyebrow {
  text-align: center;
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: .75rem;
}
.videos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.studio-video {
  border-radius: var(--radius);
  overflow: hidden;
  background: #111;
  aspect-ratio: 9/16;
}
.studio-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 900px) {
  .videos-grid { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; }
}

/* ----- Contact ------------------------------------------ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  padding-block: 3rem;
}
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: .7rem 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .95rem;
  background: var(--color-surface);
  transition: border-color .2s;
  margin-bottom: 1rem;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}
.contact-form textarea { min-height: 160px; resize: vertical; }
.contact-form label { display: block; font-size: .85rem; margin-bottom: .3rem; font-weight: 500; }

/* ----- Contact CTA (fallback when no form defined) ------ */
.contact-cta {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
}
.contact-cta h3 { margin-bottom: .5rem; }
.contact-cta p { color: var(--color-text-muted); margin-bottom: 1.5rem; }

/* ----- Photo grid / Instagram section ------------------- */
.instagram-section { background: var(--color-surface); }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
.photo-grid__item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  display: block;
}
.photo-grid__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.photo-grid__item:hover img {
  transform: scale(1.05);
}
.photo-grid__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.photo-grid__item:hover .photo-grid__overlay {
  opacity: 1;
}
@media (max-width: 900px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ----- Footer ------------------------------------------- */
.site-footer {
  background: var(--color-header-bg);
  color: rgba(255,255,255,.6);
  padding-block: 3.5rem 2rem;
  border-top: 1px solid rgba(196,169,106,.2);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}
.site-footer .logo-text { color: #fff; display: block; margin-bottom: .5rem; }
.site-footer .logo-text em { color: var(--color-gold); }
.site-footer .logo img { height: 44px; width: auto; margin-bottom: .5rem; }
.footer-brand p { font-size: .9rem; }
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.footer-nav a { color: rgba(255,255,255,.7); font-size: .9rem; transition: color .2s; }
.footer-nav a:hover { color: #fff; }
.footer-social a {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: rgba(255,255,255,.7);
  font-size: .9rem;
  transition: color .2s;
}
.footer-social a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1.5rem;
  font-size: .8rem;
  text-align: center;
}

/* ----- Responsive --------------------------------------- */
@media (max-width: 1024px) {
  .blog-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .blog-list { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .intro__split { grid-template-columns: 1fr; gap: 3rem; }
  .intro__image::before { display: none; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .stats-bar__item { padding-inline: 1.5rem; }

  .nav-toggle { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    background: var(--color-header-bg) !important;
    border-bottom: 1px solid rgba(196,169,106,.15);
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 1.5rem;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
  }
  .main-nav.is-open { display: flex; }
  .main-nav ul { flex-direction: column; gap: 1rem; }
  .nav-lang { margin-left: 0; }
}

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero { min-height: 60vh; }
  .stats-bar__item { padding-inline: 1rem; font-size: .7rem; }
  .stats-bar__item strong { font-size: 1.1rem; }
  .testimonials-grid { grid-template-columns: 1fr; }
}
