/* Redditi meistriklass – müügileht
 * Värvid ja fondid järgivad marevahtre.ee brändi. Muuda neid ainult siin.
 */
:root {
  --bg: #f1ece9;          /* kreemjas taust */
  --surface: #ffffff;
  --tint: #ebe4e1;        /* vahelduvate sektsioonide taust */
  --text: #181612;        /* põhitekst */
  --muted: #5e5a58;
  --line: rgba(24, 22, 18, 0.12);
  --maroon: #8a2e18;      /* soe tumepunane rõhuvärv */
  --accent: #d21f3c;      /* punane, kasutada säästlikult */
  --dark: #181612;        /* tumedad sektsioonid */
  --on-dark: #f1ece9;
  --on-dark-muted: rgba(241, 236, 233, 0.72);
  --error: #b3122e;
  --radius: 10px;
  --shadow: 0 10px 26px rgba(24, 22, 18, 0.07);
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
/* Hidden elements stay hidden even when a class sets display */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.65;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }
h1, h2, h3 { margin: 0; line-height: 1.1; text-wrap: balance; }
h1, h2 { font-family: var(--serif); font-weight: 800; }
h2 { font-size: clamp(1.9rem, 4.5vw, 3rem); margin-bottom: 1rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.6rem; }

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

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 50;
  padding: 0.6rem 1rem; background: var(--text); color: var(--bg); border-radius: 6px;
}
.skip-link:focus { top: 1rem; }

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(760px, 100% - 2.5rem); }

/* Labels above headings: thin vertical line, as on marevahtre.ee */
.eyebrow {
  display: inline-block;
  margin-bottom: 0.9rem;
  padding-left: 0.65rem;
  border-left: 2px solid var(--accent);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0.75rem 1.5rem;
  border: 2px solid var(--accent); border-radius: 999px;
  background: var(--accent); color: #fff;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { background: #b51a33; border-color: #b51a33; }
.btn-small { min-height: 40px; padding: 0.45rem 1.1rem; font-size: 0.92rem; }
.btn-large { min-height: 54px; padding: 0.9rem 2rem; }
.btn-outline { background: transparent; color: var(--text); border-color: var(--text); }
.btn-outline:hover { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn-ghost { font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
/* Locked until all consents are ticked: muted grey, no hover, not clickable */
.btn[disabled],
.btn[disabled]:hover { background: #d8d1ce; border-color: #d8d1ce; color: #5e5a58; cursor: not-allowed; }
.btn.is-sending,
.btn.is-sending:hover { background: var(--accent); border-color: var(--accent); color: #fff; opacity: 0.6; cursor: progress; }
.consent-hint { margin: 0.6rem 0 0; color: var(--muted); font-size: 0.9rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(241, 236, 233, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.7rem; }
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.brand-name { display: block; font-weight: 800; line-height: 1.2; }
.brand-role { display: block; color: var(--muted); font-size: 0.85rem; }

/* Hero */
.hero { padding-block: clamp(2.5rem, 7vw, 4.5rem) clamp(2rem, 5vw, 3.25rem); }
.hero h1 { font-size: clamp(2.8rem, 9vw, 5.6rem); margin-bottom: 1.2rem; color: var(--maroon); }
.hero-lead { max-width: 38rem; font-size: clamp(1.15rem, 2.4vw, 1.4rem); line-height: 1.5; }
.hero-facts {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem;
  margin: 1.5rem 0 2rem; padding: 0; list-style: none;
  color: var(--muted); font-weight: 500;
}
.hero-facts li { padding-left: 0.65rem; border-left: 2px solid var(--line); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.hero-note { margin: 1.5rem 0 0; font-weight: 700; }
.hero-dates { margin: 0.3rem 0 0; color: var(--muted); }

/* Sections */
.section { padding-block: clamp(2.25rem, 5vw, 3.75rem); scroll-margin-top: 4.5rem; }
.section-tint { background: var(--tint); }
.section-dark { background: var(--dark); color: var(--on-dark); }
.section-dark .eyebrow { color: var(--on-dark-muted); }
.section-dark p { color: var(--on-dark-muted); }
.section-dark h2, .section-dark h3 { color: var(--on-dark); }
.section-lead { color: var(--muted); font-size: 1.1rem; margin-bottom: 2rem; }

.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem clamp(2rem, 6vw, 4.5rem); }
.three-col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }

/* Outcomes */
.outcomes {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 2.5rem;
  margin: 1rem 0 0; padding: 0; list-style: none; counter-reset: outcome;
}
.outcomes li {
  counter-increment: outcome;
  padding: 1rem 0; border-top: 1px solid var(--line);
}
.outcomes li::before {
  content: counter(outcome, decimal-leading-zero);
  display: block; margin-bottom: 0.2rem;
  color: var(--accent); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em;
}

/* Fit lists */
.fit-box { padding: 1.5rem; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.fit-box-not { background: transparent; box-shadow: none; border: 1px solid var(--line); }
.check-list, .cross-list { margin: 0; padding: 0; list-style: none; }
.check-list li, .cross-list li { position: relative; padding: 0.35rem 0 0.35rem 1.8rem; }
.check-list li::before, .cross-list li::before {
  position: absolute; left: 0; top: 0.35rem;
  font-weight: 800; line-height: 1.65;
}
.check-list li::before { content: "✓"; color: var(--maroon); }
.cross-list li::before { content: "✕"; color: var(--muted); }

/* How it works */
.info-card { padding: 1.4rem; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.info-card p { color: var(--muted); }

.small-print { font-size: 0.9rem; }

/* Packages */
.packages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; align-items: stretch; }
.package {
  display: flex; flex-direction: column; gap: 1rem;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.package h3 { font-family: var(--serif); font-size: 1.9rem; margin: 0; }
.package .check-list { flex: 1; }
.package .btn { align-self: flex-start; }
.price { margin: 0; }
.price-amount { font-family: var(--serif); font-size: 2.6rem; font-weight: 800; }
.package-premium { background: var(--dark); color: var(--on-dark); border-color: var(--dark); }
.package-premium .package-note { color: var(--on-dark-muted); }
.package-premium .check-list li::before { color: #f08a6f; }
.package-tag {
  align-self: flex-start; margin: 0;
  padding: 0.25rem 0.7rem; border-radius: 999px;
  background: var(--maroon); color: #fff; font-size: 0.8rem; font-weight: 700;
}
.package-note { margin: 0; font-size: 0.92rem; }
.packages-footnote { margin-top: 1.5rem; color: var(--muted); font-size: 0.95rem; }

/* Instructor */
.instructor { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.instructor-photo { aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.instructor-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.instructor-photo.is-placeholder {
  display: grid; place-items: center;
  border: 2px dashed var(--line); color: var(--muted); font-weight: 700;
}

/* Join + form */
.join-steps { margin: 0 0 1.5rem; padding-left: 1.4rem; }
.join-steps li { margin-bottom: 0.6rem; padding-left: 0.3rem; }
.join-steps li::marker { color: var(--maroon); font-weight: 800; }
.join-note { font-weight: 700; margin-bottom: 2rem; }

.form { display: grid; gap: 1.25rem; padding: clamp(1.25rem, 4vw, 2rem); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.field { margin: 0; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { display: block; margin-bottom: 0.4rem; font-weight: 700; padding: 0; }
.optional { color: var(--muted); font-weight: 400; }
.field input[type="text"], .field input[type="email"] {
  width: 100%; min-height: 48px; padding: 0.7rem 0.85rem;
  border: 1px solid rgba(24, 22, 18, 0.35); border-radius: 8px;
  background: #fff; color: var(--text); font: inherit;
}
.field input:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.field-hint { margin: 0.4rem 0 0; color: var(--muted); font-size: 0.9rem; }
.field-error { margin: 0.35rem 0 0; color: var(--error); font-size: 0.92rem; font-weight: 700; }
.field-error:empty { display: none; }
.has-error input[type="text"], .has-error input[type="email"] { border-color: var(--error); border-width: 2px; }

.choice-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.choice {
  display: flex; align-items: center; gap: 0.6rem;
  min-height: 48px; padding: 0.6rem 1rem;
  border: 1px solid rgba(24, 22, 18, 0.35); border-radius: 8px; cursor: pointer;
  font-weight: 700;
}
.field .choice { display: flex; margin: 0; padding: 0.6rem 1.1rem 0.6rem 0.9rem; }
.choice small { display: block; color: var(--muted); font-weight: 400; line-height: 1.3; }
.choice span { line-height: 1.3; }
.choice:has(input:checked) { border: 2px solid var(--maroon); background: rgba(138, 46, 24, 0.06); }
.choice input, .check input { width: 1.2rem; height: 1.2rem; flex: 0 0 auto; accent-color: var(--maroon); }
.has-error .choice { border-color: var(--error); }

.subfields { display: grid; gap: 1.25rem; padding: 1.25rem; border-left: 3px solid var(--maroon); background: var(--bg); border-radius: 0 8px 8px 0; }

.consents { display: grid; gap: 0.75rem; }
.field-check .check { display: flex; align-items: flex-start; gap: 0.7rem; font-weight: 400; cursor: pointer; }
.check input { margin-top: 0.25rem; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.error-summary {
  margin-bottom: 1.25rem; padding: 1rem 1.25rem;
  border: 2px solid var(--error); border-radius: 8px; background: #fff;
}
.form-status:empty { display: none; }
.form-status { margin: 0; padding: 0.9rem 1rem; border-radius: 8px; font-weight: 700; }
.form-status.is-dev { background: #fff4d6; border: 1px dashed #a07800; color: #5c4500; }
.form-status.is-error { background: #fdecef; border: 1px solid var(--error); color: var(--error); }
.form-success { padding: 2rem; border-radius: 16px; background: var(--surface); border-left: 4px solid var(--maroon); box-shadow: var(--shadow); }
.form-success h3 { font-family: var(--serif); font-size: 1.6rem; }

/* Placeholders that still need real content */
.placeholder-text, .is-placeholder:not(.instructor-photo) { background: #fff4d6; outline: 1px dashed #a07800; }

/* Legal pages (terms, privacy) */
.legal { padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 6vw, 4.5rem); }
.legal h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); margin-bottom: 0.5rem; color: var(--maroon); }
.legal h2 { font-size: clamp(1.3rem, 3vw, 1.6rem); margin: 2.25rem 0 0.75rem; }
.legal h3 { font-size: 1.05rem; margin: 1.25rem 0 0.5rem; }
.legal ul { margin: 0 0 1rem; padding-left: 1.3rem; }
.legal li { margin-bottom: 0.35rem; }
.legal a { color: var(--maroon); text-underline-offset: 3px; }
.legal-meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.back-link { display: flex; width: fit-content; padding-block: 0.4rem; margin-bottom: 1.4rem; color: var(--muted); font-size: 0.9rem; font-weight: 700; text-decoration: none; }
.back-link:hover { color: var(--maroon); }
.table-scroll { overflow-x: auto; margin: 0.5rem 0 1.25rem; }
.legal-table { width: 100%; min-width: 540px; border-collapse: collapse; font-size: 0.93rem; background: var(--surface); }
.legal-table th, .legal-table td { padding: 0.65rem 0.8rem; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.legal-table th { background: var(--tint); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; }
.footer-links a[aria-current="page"] { text-decoration: none; opacity: 0.7; }

/* Hero headline is a full sentence */
.hero h1 { font-size: clamp(2.3rem, 6vw, 4.2rem); max-width: 20ch; }

/* Instructor results */
.instructor-results { margin: 1.25rem 0 0; padding: 0; list-style: none; display: grid; gap: 1rem; }
.instructor-results li { padding-left: 1rem; border-left: 2px solid var(--accent); color: var(--muted); line-height: 1.5; }
.instructor-figure { display: block; font-family: var(--serif); font-size: 1.9rem; font-weight: 800; line-height: 1.1; color: var(--maroon); }

/* Shown instead of the form outside the enrollment window */
.form-closed { padding: 1.25rem 1.5rem; border-radius: 12px; background: var(--surface); border-left: 4px solid var(--maroon); font-weight: 700; box-shadow: var(--shadow); }

/* Dark section: headings inside the two columns get breathing room */
.section-dark .two-col h3 + p { margin-top: 0; }
.section-dark .two-col p + h3 { margin-top: 1.5rem; }

/* Footer */
.site-footer { padding-block: 2.5rem; background: var(--dark); color: var(--on-dark-muted); font-size: 0.95rem; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 1rem 2rem; align-items: start; }
.footer-name { margin: 0 0 0.2rem; color: var(--on-dark); font-family: var(--serif); font-size: 1.3rem; font-weight: 800; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.footer-links a, .site-footer a { color: var(--on-dark); }
.footer-legal { grid-column: 1 / -1; margin: 0.5rem 0 0; padding-top: 1rem; border-top: 1px solid rgba(241, 236, 233, 0.15); font-size: 0.85rem; }

/* Tablet */
@media (max-width: 900px) {
  .outcomes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .three-col { grid-template-columns: 1fr; }
}

/* Mobile */
@media (max-width: 680px) {
  body { font-size: 1rem; }
  .two-col, .packages, .outcomes, .instructor, .footer-inner { grid-template-columns: 1fr; }
  .instructor-photo { max-width: 240px; }
  .package .btn, .form .btn-large { width: 100%; }
}
