/* =========================================================================
   Market Académie — Design System
   Premium, clean, corporate. White + black with subtle gold accents.
   No external fonts (privacy + speed). Fully responsive & accessible.
   ========================================================================= */

/* ----- Design tokens ---------------------------------------------------- */
:root {
  /* Palette */
  --bg:          #ffffff;
  --bg-alt:      #f8f7f4;   /* warm off-white for alternating sections */
  --bg-dark:     #101010;   /* footer */
  --ink:         #141414;   /* headings / strong text */
  --ink-soft:    #44444a;   /* body text */
  --muted:       #6c6c72;   /* secondary text */
  --line:        #e8e6e0;   /* hairlines */
  --line-strong: #d9d6cd;

  /* Gold: decorative vs. text (text gold is darker for AA contrast) */
  --gold:        #c0a062;   /* decorative: rules, markers, borders */
  --gold-soft:   #efe7d4;   /* very light gold wash */
  --gold-ink:    #7c6320;   /* gold used as TEXT (AA on white) */

  /* Footer text */
  --on-dark:        #e7e5e0;
  --on-dark-muted:  #a3a099;

  /* Typography */
  --font: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto,
          "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  /* Rhythm */
  --container: 1160px;
  --pad-x: clamp(1.25rem, 4vw, 2rem);
  --section-y: clamp(3.75rem, 8vw, 6.5rem);
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20,20,20,.04), 0 8px 24px rgba(20,20,20,.05);
  --ring: 0 0 0 3px rgba(124, 99, 32, .35);

  --header-h: 72px;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 .6em;
  font-weight: 700;
  letter-spacing: -.012em;
}

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

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--gold-ink); }

strong { color: var(--ink); font-weight: 650; }

ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: 4px;
}

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

.section {
  padding-block: var(--section-y);
  border-top: 1px solid var(--line);
}
.section--alt { background: var(--bg-alt); }
.section--plain { border-top: 0; }

section[id], .section[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

.section-head { max-width: 760px; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-title {
  font-size: clamp(1.7rem, 3.2vw, 2.35rem);
}
.section-intro {
  font-size: 1.075rem;
  color: var(--ink-soft);
  margin-top: .25rem;
}
.section-outro {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  max-width: 780px;
  color: var(--muted);
}

/* Eyebrow label (small uppercase, gold) */
.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 650;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-ink);
  margin-bottom: .9rem;
}
.eyebrow::after {
  content: "";
  display: inline-block;
  width: 26px;
  height: 1px;
  background: var(--gold);
  vertical-align: middle;
  margin-left: .65rem;
}

.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

/* Accessibility utilities */
.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;
}
.skip-link {
  position: absolute;
  left: 1rem; top: -3rem;
  z-index: 1000;
  background: var(--ink);
  color: #fff;
  padding: .6rem 1rem;
  border-radius: 8px;
  transition: top .2s ease;
}
.skip-link:focus { top: 1rem; color: #fff; }

/* ----- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  font-family: inherit;
  font-size: .98rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .005em;
  padding: .92rem 1.5rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease,
              color .2s ease, border-color .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.btn-primary:hover { background: #000; color: #fff; box-shadow: var(--shadow); }

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-secondary:hover {
  color: var(--ink);
  border-color: var(--gold);
  background: var(--gold-soft);
}

.btn-gold {
  background: var(--gold);
  color: #1c1606;
  border-color: var(--gold);
}
.btn-gold:hover { background: #b3924f; color: #1c1606; box-shadow: var(--shadow); }

.btn-sm { padding: .62rem 1.1rem; font-size: .9rem; }

/* ----- Header / nav ----------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 1px 16px rgba(20,20,20,.05);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -.01em;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--gold);
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0;
  flex: none;
}
.brand-logo {
  width: 34px; height: 34px;
  object-fit: contain;
  flex: none;
}

.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav-list {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}
.nav-link {
  font-size: .94rem;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding: .25rem 0;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--gold);
  transition: width .2s ease;
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after { width: 100%; }

.menu-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
}
.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  display: block;
  width: 18px; height: 2px;
  background: var(--ink);
  position: relative;
  transition: transform .2s ease, opacity .2s ease;
}
.menu-toggle span::before { position: absolute; top: -6px; }
.menu-toggle span::after  { position: absolute; top: 6px; }
.menu-toggle[aria-expanded="true"] span { background: transparent; }
.menu-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span::after  { transform: translateY(-6px) rotate(-45deg); }

/* ----- Hero ------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(3.5rem, 9vw, 7rem) clamp(3rem, 7vw, 5.5rem);
  background:
    radial-gradient(1200px 420px at 85% -10%, var(--gold-soft) 0%, transparent 60%),
    var(--bg);
  overflow: hidden;
}
.hero-inner { max-width: var(--container); }
.hero-title {
  font-size: clamp(2.25rem, 5.2vw, 3.5rem);
  letter-spacing: -.022em;
  line-height: 1.07;
  margin-bottom: 1.1rem;
}
.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--ink-soft);
  font-weight: 450;
  margin-bottom: 1.1rem;
  max-width: 720px;
}
.hero-text {
  color: var(--muted);
  max-width: 680px;
  margin-bottom: 2rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
}
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.4rem;
  margin-top: 2.5rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  font-size: .88rem;
  color: var(--muted);
}
.hero-facts span { display: inline-flex; align-items: center; gap: .5rem; }
.hero-facts span::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  flex: none;
}

/* ----- Grids & cards ---------------------------------------------------- */
.grid { display: grid; gap: 1.1rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.55rem;
  transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease;
}
.section--alt .card { background: #fff; }
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--line-strong);
}
.card-icon {
  width: 38px; height: 38px;
  border-radius: 9px;
  background: var(--gold-soft);
  color: var(--gold-ink);
  display: grid; place-items: center;
  font-weight: 700;
  margin-bottom: .9rem;
}
.card-title { font-size: 1.08rem; margin-bottom: .4rem; }
.card-text { color: var(--muted); font-size: .96rem; margin: 0; }

/* ----- Check list (gold marker) ---------------------------------------- */
.check-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: .55rem 2rem;
}
.check-list li {
  position: relative;
  padding-left: 1.9rem;
  padding-block: .25rem;
  color: var(--ink-soft);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: .62em;
  width: 11px; height: 6px;
  border-left: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: translateY(-50%) rotate(-45deg);
}

.card-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.25rem);
}
.section--alt .card-panel { background: #fff; }

/* ----- Media / imagery -------------------------------------------------- */
.media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #fff;
}
.media img { width: 100%; height: auto; }
.media--hero  { margin-top: clamp(1.75rem, 3.5vw, 2.5rem); }
.media--intro { margin-bottom: clamp(1.75rem, 3.5vw, 2.5rem); }
.media--outro { margin-top: clamp(1.75rem, 3.5vw, 2.5rem); }

/* ----- Steps ------------------------------------------------------------ */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
  counter-reset: step;
}
.step { position: relative; }
.step-num {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  color: var(--gold-ink);
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 1rem;
}
.step-title { font-size: 1.08rem; margin-bottom: .35rem; }
.step-text { color: var(--muted); font-size: .96rem; margin: 0; }

/* ----- Founders --------------------------------------------------------- */
.founders {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.founder {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}
.founder-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  object-position: center;
  display: block;
  border-bottom: 3px solid var(--gold);
}
.founder-body { padding: 1.6rem 1.6rem 1.7rem; }
.founder-name { font-size: 1.15rem; margin-bottom: .15rem; }
.founder-role {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--gold-ink);
  font-weight: 650;
  margin-bottom: .85rem;
}
.founder-bio { color: var(--muted); font-size: .97rem; margin: 0 0 .9rem; }
.founder-bio:last-child { margin-bottom: 0; }

/* ----- FAQ (native details/summary) ------------------------------------ */
.faq { max-width: 860px; }
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-item:first-of-type { border-top: 1px solid var(--line); }
.faq-q {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 0;
  font-weight: 600;
  font-size: 1.06rem;
  color: var(--ink);
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after {
  content: "";
  flex: none;
  width: 13px; height: 13px;
  position: relative;
  background:
    linear-gradient(var(--gold-ink), var(--gold-ink)) center/13px 2px no-repeat,
    linear-gradient(var(--gold-ink), var(--gold-ink)) center/2px 13px no-repeat;
  transition: transform .2s ease;
}
.faq-item[open] .faq-q::after { transform: rotate(45deg); }
.faq-a {
  padding: 0 0 1.3rem;
  color: var(--ink-soft);
  max-width: 760px;
}
.faq-a p:last-child { margin-bottom: 0; }

/* ----- Contact ---------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
.contact-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.6rem, 3vw, 2.25rem);
}
.contact-card--solo { max-width: 560px; }
.contact-card--solo address { margin-top: .15rem; }
.contact-row { padding-block: .55rem; border-bottom: 1px solid var(--line); }
.contact-row:last-child { border-bottom: 0; }
.contact-label {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin-bottom: .15rem;
}
.contact-value { color: var(--ink); font-weight: 500; }
.contact-value a { color: var(--gold-ink); font-weight: 600; }
address { font-style: normal; line-height: 1.6; }

/* ----- Footer ----------------------------------------------------------- */
.site-footer {
  background: var(--bg-dark);
  color: var(--on-dark-muted);
  border-top: 3px solid var(--gold);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
  font-size: .92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.3fr;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  padding-bottom: 2.25rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand-name {
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: 1rem;
}
.footer-brand-name .brand-mark { width: 28px; height: 28px; font-size: .92rem; }
.footer-logo {
  width: 34px; height: 34px;
  object-fit: contain;
  flex: none;
  background: #fff;
  border-radius: 50%;
  padding: 3px;
}
.footer-disc { max-width: 52ch; margin-bottom: 1rem; }
.footer-disc strong { color: var(--on-dark); }
.footer-col h3 {
  color: #fff;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 1rem;
}
.footer-col a { color: var(--on-dark); }
.footer-col a:hover { color: var(--gold); }
.footer-links { display: grid; gap: .55rem; }
.footer-contact a { color: var(--gold); font-weight: 600; }
.footer-contact address { color: var(--on-dark-muted); margin-top: .9rem; }

.footer-business h3 { margin-bottom: 1rem; }
.footer-biz { display: grid; gap: .7rem; }
.footer-biz li { display: flex; flex-direction: column; color: var(--on-dark); }
.footer-biz li span {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--on-dark-muted);
  margin-bottom: .12rem;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.75rem;
  font-size: .85rem;
  color: var(--on-dark-muted);
}
.footer-legal { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; }
.footer-legal a { color: var(--on-dark-muted); }
.footer-legal a:hover { color: var(--gold); }

.footer-credit {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, .08);
  text-align: center;
  font-size: .8rem;
  color: var(--on-dark-muted);
}
.footer-credit a { color: var(--on-dark-muted); font-weight: 600; }
.footer-credit a:hover { color: var(--gold); }

/* ----- Legal pages ------------------------------------------------------ */
.legal-hero {
  padding-block: clamp(2.75rem, 6vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem);
  background:
    radial-gradient(900px 320px at 90% -20%, var(--gold-soft) 0%, transparent 60%),
    var(--bg);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .9rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}
.back-link:hover { color: var(--gold-ink); }
.legal-title { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: .5rem; }
.legal-updated { color: var(--muted); font-size: .92rem; margin: 0; }

.legal-body {
  max-width: 820px;
  padding-block: clamp(2rem, 4vw, 3.25rem) var(--section-y);
}
.legal-body h2 {
  font-size: 1.3rem;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}
.legal-body h2:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.legal-body h3 { font-size: 1.05rem; margin-top: 1.6rem; }
.legal-body p, .legal-body li { color: var(--ink-soft); }
.legal-body ul { margin: 0 0 1.1rem; }
.legal-body ul li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: .45rem;
}
.legal-body ul li::before {
  content: "";
  position: absolute;
  left: 0; top: .62em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
}
.legal-note {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.25rem;
  margin: 1.5rem 0;
  color: var(--ink-soft);
  font-size: .96rem;
}
.legal-contact {
  margin-top: 2.5rem;
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.legal-contact a { color: var(--gold-ink); font-weight: 600; }

/* ----- Responsive ------------------------------------------------------- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .menu-toggle { display: inline-flex; }
  .nav { gap: 0; }
  .nav-list {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 28px rgba(20,20,20,.08);
    padding: .5rem var(--pad-x) 1rem;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .nav-list.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }
  .nav-link {
    padding: .85rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 1rem;
  }
  .nav-link::after { display: none; }
  .nav-list .btn { margin-top: .85rem; width: 100%; }
}

@media (max-width: 520px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ----- Motion / print --------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

@media print {
  .site-header, .site-footer, .menu-toggle, .hero-actions, .back-link { display: none !important; }
  body { color: #000; }
  a { color: #000; text-decoration: underline; }
  .section, .legal-body { border: 0; }
}
