/* =========================================================================
   Rudy Rahman — personal trainer site
   Plain CSS, no build step. Mobile-first. Peter Attia–style: clean,
   authoritative, person-focused. Trust over hype.
   ========================================================================= */

:root {
  --bg:        #ffffff;
  --bg-alt:    #f4f2ee;   /* warm off-white for alternating sections */
  --ink:       #1a1a1a;   /* near-black text */
  --ink-soft:  #45433f;   /* secondary text */
  --line:      #e2ddd4;   /* hairline borders */
  --gold:      #b5882f;   /* restrained accent */
  --gold-dark: #8f6a20;
  --max:       1120px;
  --pad:       clamp(1.25rem, 5vw, 2.5rem);
  --radius:    10px;
  --serif:     Georgia, "Times New Roman", serif;
  --sans:      -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--gold-dark); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ink); }

h1, h2, h3 { font-family: var(--serif); line-height: 1.2; color: var(--ink); font-weight: 600; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); margin: 0 0 1.25rem; }
h3 { font-size: 1.2rem; margin: 0 0 .5rem; }
p { margin: 0 0 1rem; }

/* ---- Accessibility helpers ---- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: .75rem 1rem; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
input.visually-hidden { position: absolute !important; left: -9999px; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---- Layout ---- */
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }
.container--narrow { max-width: 760px; }

.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section--alt { background: var(--bg-alt); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--gold-dark);
  margin: 0 0 .6rem;
  font-family: var(--sans);
}

/* ---- Header / nav ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  max-width: var(--max); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .85rem var(--pad);
}
.nav__brand { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.nav__links { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; margin: 0; padding: 0; }
.nav__links a { color: var(--ink-soft); text-decoration: none; font-size: .95rem; }
.nav__links a:hover { color: var(--ink); }
.nav__cta {
  background: var(--ink); color: #fff !important; padding: .5rem .9rem; border-radius: var(--radius);
}
.nav__cta:hover { background: var(--gold-dark); }
.nav__toggle { display: none; background: none; border: 0; cursor: pointer; color: var(--ink); padding: .35rem; line-height: 0; border-radius: 6px; }
.nav__toggle svg { width: 26px; height: 26px; }
.nav__icon-open { display: block; }
.nav__icon-close { display: none; }
.nav__toggle[aria-expanded="true"] .nav__icon-open { display: none; }
.nav__toggle[aria-expanded="true"] .nav__icon-close { display: block; }

/* Small screens: brand + hamburger; links become a dropdown panel toggled by JS */
@media (max-width: 720px) {
  .nav { position: relative; }
  .nav__toggle { display: inline-flex; align-items: center; }
  .nav__links {
    display: none;
    position: absolute; top: calc(100% + 1px); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: .25rem var(--pad) .9rem;
    box-shadow: 0 16px 28px -14px rgba(0,0,0,.3);
  }
  .nav__links.is-open { display: flex; }
  .nav__links li { width: 100%; border-top: 1px solid var(--line); }
  .nav__links li:first-child { border-top: 0; }
  .nav__links a { display: block; padding: .85rem .25rem; font-size: 1rem; }
  .nav__links .nav__cta { display: block; text-align: center; margin: .8rem 0 .25rem; padding: .7rem 1rem; }
  .nav__links li:has(.nav__cta) { border-top: 0; }
}

/* ---- Buttons ---- */
.btn {
  display: inline-block; font-family: var(--sans); font-weight: 600; font-size: 1rem;
  padding: .8rem 1.5rem; border-radius: var(--radius); text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: background .15s, color .15s, border-color .15s;
}
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: var(--gold-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }

/* ---- Hero ---- */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem); background: var(--bg-alt); }
.hero__inner {
  max-width: var(--max); margin-inline: auto; padding-inline: var(--pad);
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); margin: 0 0 1rem; letter-spacing: -.01em; }
.hero__subhead { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--ink-soft); max-width: 38ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; margin: 1.75rem 0 1.5rem; }
.hero__philosophy { font-family: var(--serif); font-style: italic; color: var(--ink-soft); margin: 0; }
.hero__figure { margin: 0; }
.hero__figure img {
  width: 100%; border-radius: var(--radius); object-fit: cover;
  box-shadow: 0 18px 40px -18px rgba(0,0,0,.45);
}
.hero__caption {
  margin: .9rem auto 0; max-width: 42ch; text-align: center;
  font-size: .88rem; line-height: 1.5; color: var(--ink-soft);
}

@media (max-width: 820px) {
  .hero__inner { grid-template-columns: 1fr; }
  /* Copy leads; image sits below, centered and filling the column (capped so it isn't huge on tablets) */
  .hero__figure { max-width: 480px; margin-inline: auto; }
}

/* ---- About ---- */
.about {
  display: grid; grid-template-columns: .7fr 1.3fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: start;
}
/* Image sits left to alternate against the right-aligned hero image */
.about__figure { margin: 0; order: -1; position: sticky; top: 6rem; }
.about__figure img { border-radius: var(--radius); box-shadow: 0 14px 34px -18px rgba(0,0,0,.4); }
@media (max-width: 820px) {
  .about { grid-template-columns: 1fr; }
  /* Image after the text (order:0 overrides the desktop left-column order:-1) so it doesn't sit back-to-back with the hero image */
  .about__figure { position: static; order: 0; max-width: 420px; margin-inline: auto; }
}

/* ---- Cards (Who I help / Services) ---- */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.cards--4 { grid-template-columns: repeat(4, 1fr); }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; height: 100%;
}
.section--alt .card { background: #fff; }
.card p { margin: 0; color: var(--ink-soft); }
.card__icon {
  display: inline-grid; place-items: center; width: 48px; height: 48px;
  border-radius: 12px; background: rgba(181,136,47,.12); color: var(--gold-dark);
  margin-bottom: 1rem;
}
.card__icon svg { width: 26px; height: 26px; }
.card__tag {
  display: inline-block; font-family: var(--sans); font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: var(--gold-dark);
  background: rgba(181,136,47,.12); padding: .15rem .5rem; border-radius: 999px; vertical-align: middle;
  margin-left: .4rem;
}
.card--service .ticks { margin: .75rem 0 0; padding: 0; list-style: none; }
.ticks li { position: relative; padding-left: 1.5rem; margin-bottom: .4rem; color: var(--ink-soft); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: .55rem; height: .3rem; border-left: 2px solid var(--gold-dark); border-bottom: 2px solid var(--gold-dark);
  transform: rotate(-45deg);
}

@media (max-width: 900px) { .cards--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .cards--3 { grid-template-columns: 1fr; } }
@media (max-width: 540px) { .cards--4 { grid-template-columns: 1fr; } }

/* ---- Why (reasons) ---- */
.reasons {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem;
}
.reasons li {
  padding: 1.1rem 1.25rem; background: #fff; border: 1px solid var(--line);
  border-left: 4px solid var(--gold); border-radius: var(--radius); color: var(--ink-soft);
}
.reasons strong { color: var(--ink); }
@media (max-width: 640px) {
  .reasons { grid-template-columns: 1fr; }
}

/* ---- Credentials ---- */
/* Single column with a readable measure — uneven group lengths look cleaner
   stacked than in a ragged 2-col grid. */
.creds { display: grid; gap: 1.75rem; max-width: 920px; margin-top: 2rem; }
.creds__group h3 { display: inline-block; color: var(--ink); border-bottom: 1px solid var(--line); padding-bottom: .4rem; }
.creds__group ul { margin: .4rem 0 0; padding-left: 1.1rem; color: var(--ink-soft); }
.creds__group li { margin-bottom: .35rem; }
.creds__note { color: var(--ink-soft); font-size: .95rem; margin: 0 0 .4rem; }

/* ---- Testimonials ---- */
.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.testimonial {
  margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.75rem; display: flex; flex-direction: column;
}
.testimonial p { font-family: var(--serif); font-size: 1.05rem; color: var(--ink); }
.stars { color: var(--gold); font-size: 1.05rem; letter-spacing: .12em; margin: 0 0 1rem; line-height: 1; }
.testimonial__author { display: flex; align-items: center; gap: .8rem; margin-top: auto; padding-top: 1.25rem; }
.avatar {
  flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(181,136,47,.15); color: var(--gold-dark);
  font-family: var(--sans); font-weight: 700; font-size: .9rem; letter-spacing: .03em;
}
.testimonial__who { display: flex; flex-direction: column; }
.testimonial__name { font-weight: 600; color: var(--ink); font-size: .95rem; }
.testimonial__role { font-weight: 400; color: var(--ink-soft); font-size: .85rem; }
@media (max-width: 860px) { .testimonials { grid-template-columns: 1fr; } }

/* ---- FAQ ---- */
.faqs { display: grid; gap: .9rem; }
.faqs details {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); padding: 0 1.1rem;
}
.faqs summary {
  cursor: pointer; font-weight: 600; padding: 1rem 0; list-style: none; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faqs summary::-webkit-details-marker { display: none; }
.faqs summary::after { content: "+"; font-size: 1.4rem; color: var(--gold-dark); line-height: 1; }
.faqs details[open] summary::after { content: "–"; }
.faqs details p { margin: 0 0 1rem; color: var(--ink-soft); }

/* ---- Contact form ---- */
.contact__intro { color: var(--ink-soft); max-width: 60ch; }
.contact__alt { margin: 1.75rem 0 .9rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: .95rem; }
.contact__actions { margin: 0 0 .6rem; }
.contact__direct { color: var(--ink-soft); font-size: .95rem; }
.contact__direct a { font-weight: 600; }
.btn--whatsapp { display: inline-flex; align-items: center; gap: .5rem; background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--whatsapp:hover { background: var(--ink); color: #fff; }
.btn--whatsapp svg { width: 20px; height: 20px; }
.contact-form { display: grid; gap: 1.1rem; margin-top: 1.5rem; }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 600; font-size: .95rem; }
.field__optional { font-weight: 400; color: var(--ink-soft); }
.field input, .field textarea {
  font: inherit; color: var(--ink); width: 100%;
  padding: .7rem .85rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; transition: border-color .15s;
}
.field input:focus, .field textarea:focus { border-color: var(--gold); }
.contact-form .btn { justify-self: start; }

/* ---- Footer ---- */
.site-footer { background: var(--ink); color: #cfcbc3; padding-block: 2.5rem; }
.site-footer__inner { text-align: center; }
.site-footer__name { font-family: var(--serif); font-size: 1.25rem; color: #fff; margin: 0 0 .3rem; }
.site-footer__sub { color: #cfcbc3; font-weight: 400; }
.site-footer__meta { margin: 0 0 .5rem; font-size: .95rem; }
.site-footer__contact { margin: 0 0 .75rem; font-size: .92rem; }
.site-footer a { color: #e7e3da; }
.site-footer a:hover { color: #fff; }
.site-footer__copy { margin: 0; font-size: .85rem; color: #8d897f; }

/* ---- Thank-you page ---- */
.thankyou { min-height: 75vh; display: grid; place-items: center; text-align: center; }
.thankyou h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 1rem; }
.thankyou p { color: var(--ink-soft); margin: 0 0 1.25rem; }

/* ---- Floating WhatsApp widget (pure <details>, no JS) ---- */
.wa-widget { position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 60; }
.wa-widget__toggle {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--ink); color: #fff; cursor: pointer;
  display: grid; place-items: center; list-style: none;
  box-shadow: 0 8px 24px -6px rgba(0,0,0,.45);
  transition: background .15s;
}
.wa-widget__toggle::-webkit-details-marker { display: none; }
.wa-widget__toggle svg { width: 30px; height: 30px; }
.wa-widget__toggle:hover,
.wa-widget[open] .wa-widget__toggle { background: var(--gold-dark); }
.wa-widget__card {
  position: absolute; bottom: calc(100% + .75rem); right: 0;
  width: min(300px, 78vw);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 18px 44px -16px rgba(0,0,0,.45);
  padding: 1.1rem;
}
.wa-widget__msg { margin: 0 0 1rem; font-size: .92rem; line-height: 1.5; color: var(--ink-soft); }
.wa-widget__card .btn { width: 100%; justify-content: center; }

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
