/* Coco Monki Markets - site styles
   Palette: lime #A8C256, charcoal #1F2326, cream #F5EFDF (+ white).
   Fonts: Archivo Black (headings), Space Grotesk (body). */

:root {
  --ink: #1F2326;
  --cream: #F5EFDF;
  --lime: #A8C256;
  --white: #FFFFFF;
  --muted: #5C6366;
  --error: #B3261E;
  --header-h: 80px;
  --pad: clamp(20px, 5vw, 64px);
  --font-head: "Archivo Black", "Arial Black", Impact, sans-serif;
  --font-body: "Space Grotesk", "Segoe UI", Helvetica, Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  font-synthesis: none;
  overflow-x: hidden;
}

body.menu-open { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

[id] { scroll-margin-top: var(--header-h); }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.on-dark :focus-visible { outline-color: var(--lime); }
.bg-lime :focus-visible { outline-color: var(--ink); }

.skip-link {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  background: var(--ink); color: var(--cream);
  padding: 12px 18px; border-radius: 10px; text-decoration: none; font-weight: 700;
}
.skip-link:focus { top: 12px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.container { max-width: 1280px; margin: 0 auto; padding: 0 var(--pad); }

/* ---------- Backgrounds ---------- */
.bg-ink { background: var(--ink); color: var(--cream); }
.bg-cream { background: var(--cream); color: var(--ink); }
.bg-lime { background: var(--lime); color: var(--ink); }
.bg-white { background: var(--white); color: var(--ink); }

.section { padding: clamp(56px, 8vw, 88px) 0; }

/* ---------- Type ---------- */
h1, h2, h3, .eyebrow, .brand-name { font-family: var(--font-head); font-weight: 400; }
h1 { font-size: clamp(2.4rem, 6.2vw, 3.75rem); line-height: 1.02; text-transform: uppercase; }
h2 { font-size: clamp(1.7rem, 4.2vw, 2.375rem); line-height: 1.1; }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.5rem); line-height: 1.15; }
.lead { font-size: clamp(1.05rem, 1.8vw, 1.375rem); line-height: 1.5; }

.eyebrow {
  font-size: 0.9rem; letter-spacing: 0.3em; text-transform: uppercase; margin-bottom: 10px;
}
.eyebrow-lime { color: var(--lime); font-size: clamp(0.8rem, 1.6vw, 1.1rem); letter-spacing: 0.3em; margin-bottom: 0; }
.accent { color: var(--lime); }
.section-head { margin-bottom: clamp(28px, 4vw, 44px); }
.section-head.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 14px 32px;
  border: 2px solid transparent; border-radius: 999px;
  font: 700 1.125rem/1.2 var(--font-body); text-decoration: none; text-align: center;
  cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 rgba(0, 0, 0, 0.18); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn-lime { background: var(--lime); color: var(--ink); }
.btn-ink { background: var(--ink); color: var(--cream); }
.btn-ink:hover { background: #2d3438; }
.btn-lime:hover { background: #b6cf62; }
.btn[disabled] { opacity: 0.7; cursor: progress; transform: none; box-shadow: none; }
.btn-sm { min-height: 44px; padding: 10px 22px; font-size: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--cream); border-bottom: 2px solid var(--ink);
  transition: box-shadow 0.2s ease;
}
.site-header.is-scrolled { box-shadow: 0 6px 18px rgba(31, 35, 38, 0.14); }

.header-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 var(--pad);
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}

.brand {
  display: flex; align-items: center; gap: 12px; min-width: 0;
  text-decoration: none; color: var(--ink);
}
.brand svg { width: 52px; height: 52px; flex: none; }
.brand-name {
  font-size: clamp(0.9rem, 2.4vw, 1.75rem); letter-spacing: 0.04em; white-space: nowrap;
}

.nav { display: flex; align-items: center; }
.nav-list { display: flex; align-items: center; gap: 32px; }
.nav-list a:not(.btn) {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; font-size: 1.0625rem; text-decoration: none;
  background-image: linear-gradient(var(--ink), var(--ink));
  background-repeat: no-repeat; background-position: 0 85%; background-size: 0 2px;
  transition: background-size 0.2s ease;
}
.nav-list a:not(.btn):hover,
.nav-list a.is-active { background-size: 100% 2px; }

.tag {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  background: var(--lime); color: var(--ink); font-size: 0.8125rem; font-weight: 700;
}

.nav-toggle {
  display: none; width: 48px; height: 48px; padding: 0;
  background: transparent; border: 2px solid var(--ink); border-radius: 12px;
  cursor: pointer; position: relative; flex: none;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 50%; width: 22px; height: 2px;
  background: var(--ink); border-radius: 2px; transform: translateX(-50%);
  transition: transform 0.2s ease, opacity 0.2s ease, top 0.2s ease;
}
.nav-toggle span { top: 50%; margin-top: -1px; }
.nav-toggle span::before { top: -7px; left: 0; transform: none; }
.nav-toggle span::after { top: 7px; left: 0; transform: none; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 7vw, 96px) 0; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center; gap: clamp(32px, 5vw, 64px);
}
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.hero-copy .lead { color: var(--cream); max-width: 34rem; }
.hero-media {
  position: relative; width: 100%;
  height: clamp(300px, 42vw, 520px);
}
.photo { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); border-radius: 20px; }

/* ---------- Strip ---------- */
.strip { padding: 28px 0; }
.strip-list {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 24px;
  text-align: center; font-family: var(--font-head); font-size: clamp(1rem, 1.6vw, 1.125rem);
}

/* ---------- Services ---------- */
.card-grid { display: grid; gap: 20px; }
.services-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.service-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--white); border: 2px solid var(--ink); border-radius: 22px;
}
.service-card .photo { height: 200px; border-radius: 0; }
.service-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 8px; }
.service-body p { font-size: 1rem; line-height: 1.45; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 48px); }
.step { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.step h3 { margin-top: 6px; }
.step p { max-width: 20rem; }

.icon-badge {
  width: 80px; height: 80px; border-radius: 50%; background: var(--lime);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.icon-badge.sm { width: 60px; height: 60px; }
.icon-badge svg {
  width: 34px; height: 34px; fill: none; stroke: var(--ink);
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Why it works (dark cards) ---------- */
.why-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.why-card {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--cream); color: var(--ink); border-radius: 24px; padding: 32px;
}
.why-card h3 { margin-top: 6px; }
.why-card .photo { margin-top: auto; height: 230px; border-radius: 16px; }
.why-card p { margin-bottom: 12px; }

/* ---------- Benefits ---------- */
.benefits-grid {
  display: grid; grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
  align-items: center; gap: clamp(32px, 5vw, 64px);
}
.benefits-media { height: clamp(260px, 36vw, 400px); }
.benefits-copy { display: flex; flex-direction: column; gap: 22px; }
.checklist { display: flex; flex-direction: column; gap: 16px; }
.checklist li { display: flex; align-items: center; gap: 16px; font-size: clamp(1.05rem, 1.8vw, 1.375rem); }
.check {
  width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--lime);
  display: flex; align-items: center; justify-content: center;
}
.check svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Forms ---------- */
.form-section-grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center; gap: clamp(32px, 5vw, 64px);
}
.form-intro { display: flex; flex-direction: column; gap: 18px; }
.form-intro h2 { font-size: clamp(1.8rem, 4.4vw, 2.75rem); line-height: 1.08; }
.form-intro p { font-size: clamp(1.05rem, 1.8vw, 1.25rem); line-height: 1.5; }

.form-card {
  background: var(--cream); color: var(--ink); border-radius: 24px; padding: clamp(22px, 4vw, 32px);
  width: 100%;
}
.form-card h3 { font-size: clamp(1.3rem, 2.6vw, 1.625rem); margin-bottom: 16px; }

.form { display: flex; flex-direction: column; gap: 14px; }
.form[hidden], .form-success[hidden] { display: none; }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 0.875rem; font-weight: 700; }
.req { color: var(--ink); }

.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 16px;
  font: 400 1rem/1.4 var(--font-body); color: var(--ink);
  background: var(--white); border: 2px solid var(--ink); border-radius: 10px;
  appearance: none; -webkit-appearance: none;
}
.field textarea { min-height: 110px; resize: vertical; }
.field select {
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F2326' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; box-shadow: 0 0 0 4px var(--lime);
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--error); }
.field-error { color: var(--error); font-size: 0.875rem; font-weight: 700; min-height: 0; }
.field-error:empty { display: none; }

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

.form-status { font-size: 0.9375rem; font-weight: 700; }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--error); }
.form-status a { color: inherit; }

.form .btn { width: 100%; letter-spacing: 0.12em; }

.form-success {
  display: flex; flex-direction: column; gap: 14px; align-items: flex-start; padding: 8px 0;
}
.form-success h3 { margin: 0; }
.form-success:focus { outline: none; }

/* ---------- Referral banner ---------- */
.refer-banner-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 32px 48px;
}
.refer-banner h2 { font-size: clamp(1.8rem, 4.4vw, 2.75rem); line-height: 1.08; margin-bottom: 12px; }
.refer-banner p { max-width: 44rem; font-size: clamp(1rem, 1.8vw, 1.1875rem); }
.refer-banner .btn { flex: none; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid rgba(245, 239, 223, 0.2); padding: 32px 0; }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap;
}
.site-footer .brand { color: var(--cream); }
.site-footer .brand svg { width: 48px; height: 48px; }
.site-footer .brand-name { font-size: 1.5rem; }
.footer-meta { font-size: 0.9375rem; display: flex; gap: 6px 18px; flex-wrap: wrap; }
.footer-meta a { text-underline-offset: 3px; }

/* ---------- Referral page ---------- */
.refer-hero { overflow-x: clip; }
.refer-media { height: clamp(260px, 38vw, 340px); max-width: 500px; margin-left: auto; width: 100%; position: relative; }
.refer-media .photo { height: 100%; }
.reward-badge {
  position: absolute; left: -36px; bottom: -32px;
  width: 150px; height: 150px; border-radius: 50%;
  background: var(--lime); color: var(--ink); border: 4px solid var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
}
.reward-badge strong { font-family: var(--font-head); font-weight: 400; font-size: 2.6rem; line-height: 1; }
.reward-badge span { margin-top: 4px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.16em; }

.narrow { max-width: 880px; margin: 0 auto; }
.narrow-form { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 32px; }
.text-block { display: flex; flex-direction: column; gap: 12px; }
.text-block h2 { font-size: clamp(1.8rem, 4.4vw, 2.75rem); line-height: 1.08; }
.text-block p { font-size: 1.125rem; line-height: 1.6; }
.text-block a, .narrow a { font-weight: 700; text-underline-offset: 3px; }

.template-card {
  margin-top: 32px; padding: clamp(22px, 4vw, 36px) clamp(20px, 5vw, 44px);
  background: var(--cream); border: 2px solid var(--ink); border-radius: 20px;
  display: flex; flex-direction: column; gap: 18px;
  overflow-wrap: anywhere;
}
.template-card p { font-size: 1.125rem; line-height: 1.6; }
.template-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 20px; }
.tip { font-style: italic; margin-top: 20px; font-size: 1.125rem; }
.tip strong { font-weight: 700; }
.copy-note { font-size: 0.9375rem; font-weight: 700; min-height: 1.4em; }

.bullets { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.bullets li { display: flex; gap: 14px; align-items: flex-start; font-size: 1.125rem; line-height: 1.55; }
.bullets li::before {
  content: ""; flex: none; width: 10px; height: 10px; margin-top: 9px; border-radius: 50%;
  background: var(--lime); border: 2px solid var(--ink);
}

.faq-title { text-align: center; margin: 48px 0 24px; font-size: clamp(1.6rem, 3.6vw, 2.375rem); }
.faq-box { background: var(--white); border: 2px solid var(--ink); border-radius: 16px; overflow: hidden; }
.faq-item { padding: 22px 28px; border-bottom: 2px solid var(--ink); display: flex; flex-direction: column; gap: 6px; }
.faq-item:last-child { border-bottom: 0; }
.faq-item h3 { font-family: var(--font-body); font-weight: 700; font-size: 1.1875rem; line-height: 1.35; }
.faq-item p { font-size: 1.0625rem; line-height: 1.55; }

/* ---------- Simple pages (thanks / 404) ---------- */
.simple-page { min-height: calc(100vh - var(--header-h) - 130px); display: flex; align-items: center; }
.simple-page .container { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.simple-page h1 { font-size: clamp(2rem, 6vw, 3.25rem); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--cream); border-bottom: 2px solid var(--ink);
    padding: 8px var(--pad) 24px; display: none;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .nav.is-open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list li { border-bottom: 1px solid rgba(31, 35, 38, 0.18); }
  .nav-list li:last-child { border-bottom: 0; padding-top: 16px; }
  .nav-list a:not(.btn) { width: 100%; min-height: 56px; font-size: 1.1875rem; background-image: none; }
  .nav-list .btn { width: 100%; }
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .hero-grid, .benefits-grid, .form-section-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-media { height: clamp(260px, 62vw, 420px); }
  .benefits-media { order: -1; }
  .why-grid { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin: 0 auto; }
  .why-card .photo { height: 240px; }
  .refer-media { margin-left: 0; }
  .reward-badge { left: 12px; bottom: -28px; width: 128px; height: 128px; }
  .reward-badge strong { font-size: 2.2rem; }
  .refer-banner-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 800px) {
  .steps { grid-template-columns: minmax(0, 1fr); }
  .strip-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  :root { --header-h: 72px; }
  .brand svg { width: 42px; height: 42px; }
  .brand { gap: 10px; }
  .services-grid { grid-template-columns: minmax(0, 1fr); }
  .service-card .photo { height: 220px; }
  .row { grid-template-columns: minmax(0, 1fr); }
  .btn { width: 100%; }
  .hero-copy .btn, .refer-banner .btn { width: 100%; }
  .why-card { padding: 24px; }
  .faq-item { padding: 18px 20px; }
  .template-actions .btn { width: 100%; }
  .site-footer .brand-name { font-size: 1.1rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .simple-page .btn { width: auto; }
}

@media (max-width: 380px) {
  .brand-name { font-size: 0.82rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Sections receive programmatic focus after smooth scrolling; no visible ring needed */
[tabindex="-1"]:focus { outline: none; }

.footer-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ma-affiliate {
    display: flex;
    align-items: center;
    gap: 24px;
    text-decoration: none;
    color: inherit;
    opacity: 0.85;
    transition: opacity 0.2s ease;
     margin-right: 105px;
}

.ma-affiliate:hover {
    opacity: 1;
}

.ma-affiliate img {
    height: 24px;
    width: auto;
}

.ma-affiliate span {
    font-size: 0.85rem;
}

