/* =========================================================
   8ma.space - shared stylesheet
   White background • soft warm accent • calm, editorial feel
   ========================================================= */

:root {
  --bg: #ffffff;
  --bg-soft: #faf7f2;
  --text: #1f1d1a;
  --text-soft: #2c2926;
  --muted: #6b6660;
  --accent: #c89b6a;
  --accent-dark: #a87b4a;
  --line: #ece7e0;

  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --maxw: 1100px;
  --maxw-narrow: 760px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: 1.4rem; }
p  { margin: 0 0 1em; color: var(--text-soft); }

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 12px; }
.container.narrow { max-width: var(--maxw-narrow); }

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.78rem;
  color: var(--accent-dark);
  margin-bottom: 20px;
}

/* ---------- HEADER / NAV ---------- */
header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 12px;
  max-width: var(--maxw);
  margin: 0 auto;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}
.brand:hover { text-decoration: none; color: var(--accent-dark); }
.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(31, 29, 26, 0.08);
}
.brand-logo-lg {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 16px;
  box-shadow: 0 6px 18px rgba(31, 29, 26, 0.1);
}
footer .brand { justify-content: center; color: #fff; }
footer .brand-logo { box-shadow: none; }
.nav-links { display: flex; gap: 22px; align-items: center; flex-wrap: nowrap; }
.nav-links a {
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.nav-links a:hover { color: var(--accent-dark); text-decoration: none; }
.nav-links a.active { color: var(--accent-dark); }
.nav-cta {
  background: var(--text);
  color: #fff !important;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  transition: background 0.2s ease;
}
.nav-cta:hover { background: var(--accent-dark); text-decoration: none; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  font-size: 1.5rem;
  color: var(--text);
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    inset: 70px 0 auto 0;
    flex-direction: column;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 24px;
    gap: 20px;
    transform: translateY(-150%);
    transition: transform 0.25s ease;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-cta { align-self: flex-start; }
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-block;
  background: var(--text);
  color: #fff;
  padding: 16px 32px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  font-family: var(--sans);
}
.btn:hover {
  background: var(--accent-dark);
  text-decoration: none;
  color: #fff;
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--text);
}
.btn-outline:hover { background: var(--text); color: #fff; }

/* ---------- SECTIONS ---------- */
section { padding: 80px 0; }
.section-soft { background: var(--bg-soft); }
.section-head {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 50px;
}

/* ---------- HERO ---------- */
.hero { padding: 90px 0 70px; text-align: center; }
.hero h1 { max-width: 820px; margin-left: auto; margin-right: auto; }
.hero-sub {
  max-width: 640px;
  margin: 24px auto 36px;
  font-size: 1.15rem;
  color: var(--muted);
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Hero with image */
.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 80px 0;
}
.hero-split .hero-text { text-align: left; }
.hero-split .hero-text h1 { margin-left: 0; margin-right: 0; }
.hero-split .hero-text .hero-sub { margin-left: 0; margin-right: 0; }
.hero-split .hero-actions { justify-content: flex-start; }
@media (max-width: 820px) {
  .hero-split { grid-template-columns: 1fr; gap: 40px; padding: 60px 0; }
}

/* ---------- IMAGE BOX (placeholder-friendly) ---------- */
/* If you drop a photo at the matching path, the <img> covers the
   placeholder text automatically. If no photo exists, the <img>
   removes itself via onerror and you see the soft placeholder. */
.imgbox {
  position: relative;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, #f1ebe2, #e7dccb);
  aspect-ratio: 4/5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1rem;
  text-align: center;
  padding: 20px;
}
.imgbox img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
}
.imgbox .placeholder-text {
  position: relative;
  z-index: 1;
}
.imgbox.square { aspect-ratio: 1/1; }
.imgbox.wide   { aspect-ratio: 16/10; }
.imgbox.profile {
  aspect-ratio: 1/1;
  border-radius: 50%;
  max-width: 380px;
  margin: 0 auto;
  box-shadow: 0 18px 40px rgba(31, 29, 26, 0.12);
}

/* ---------- TWO-COLUMN ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.two-col.reverse > :first-child { order: 2; }
@media (max-width: 760px) {
  .two-col { grid-template-columns: 1fr; gap: 40px; }
  .two-col.reverse > :first-child { order: 0; }
}

/* ---------- CARDS ---------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 40px 32px;
  box-shadow: 0 8px 30px rgba(31,29,26,0.04);
}
.card.center { text-align: center; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 820px) {
  .card-grid { grid-template-columns: 1fr; }
}

/* Day list (challenge) */
.day-list {
  text-align: left;
  max-width: 520px;
  margin: 0 auto 28px;
  padding-left: 0;
  list-style: none;
}
.day-list li {
  padding: 14px 0 14px 32px;
  position: relative;
  border-bottom: 1px solid var(--line);
}
.day-list li:last-child { border-bottom: none; }
.day-list li::before {
  content: "✦";
  position: absolute;
  left: 0;
  top: 14px;
  color: var(--accent);
}
.day-list strong { color: var(--text); font-weight: 500; }

/* ---------- FORMS ---------- */
.signup-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 480px;
  margin: 24px auto 0;
}
.signup-form.left { margin-left: 0; margin-right: 0; }
.signup-form input[type="text"],
.signup-form input[type="email"] {
  flex: 1;
  min-width: 200px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.95rem;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}
.signup-form input:focus { border-color: var(--accent-dark); }
.signup-form button { white-space: nowrap; }
.form-note {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 14px;
  text-align: center;
}
.signup-form.left + .form-note { text-align: left; }
.form-success {
  display: none;
  padding: 16px 20px;
  margin-top: 16px;
  background: #f1ebe2;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95rem;
  max-width: 480px;
}
.form-success.visible { display: block; }
.form-error {
  display: none;
  padding: 12px 16px;
  margin-top: 12px;
  background: #fbeae5;
  border-radius: 6px;
  color: #8a3324;
  font-size: 0.9rem;
  max-width: 480px;
}
.form-error.visible { display: block; }

/* Contact form */
.contact-form {
  display: grid;
  gap: 16px;
  max-width: 540px;
  margin: 0 auto;
}
.contact-form input,
.contact-form textarea {
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 0.95rem;
  background: #fff;
  color: var(--text);
  outline: none;
}
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--accent-dark); }
.contact-form button { justify-self: center; }

/* ---------- TESTIMONIALS ---------- */
.quotes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}
.quote {
  background: #fff;
  border: 1px solid var(--line);
  padding: 32px;
  border-radius: 8px;
}
.quote p {
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--text);
  font-style: italic;
}
.quote .author {
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 16px;
}
@media (max-width: 720px) {
  .quotes { grid-template-columns: 1fr; }
}

/* ---------- DARK FEATURE BLOCK ---------- */
.feature-dark {
  aspect-ratio: 1/1;
  border-radius: 8px;
  background: linear-gradient(135deg, #1f1d1a, #3a352e);
  color: #f5efe3;
  padding: 50px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.feature-dark .label {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.78rem;
  color: var(--accent);
}
.feature-dark h3 { font-size: 2rem; color: #fff; margin: 0; }
.feature-dark .meta { font-size: 0.9rem; opacity: 0.7; }

/* ---------- FOOTER ---------- */
footer {
  background: var(--text);
  color: #d8d2c8;
  padding: 60px 0 30px;
  text-align: center;
  font-size: 0.9rem;
}
footer .brand { color: #fff; display: inline-flex; align-items: center; gap: 10px; justify-content: center; }
footer .footer-links { margin: 22px 0 18px; display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; }
footer .footer-links a { color: #d8d2c8; text-decoration: none; }
footer .footer-links a:hover { color: #fff; }
footer small { display: block; margin-top: 14px; opacity: 0.7; }

/* ---------- SOCIALS ---------- */
.socials {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
  margin: 18px 0 6px;
}
.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #d8d2c8;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.socials a:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  transform: translateY(-1px);
}
.socials svg { width: 20px; height: 20px; fill: currentColor; }

/* Light backgrounds (e.g., contact "Or follow along" section) */
.socials.on-light a {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text);
}
.socials.on-light a:hover {
  background: rgba(0, 0, 0, 0.12);
  color: #000;
}