:root {
  --bg: #f4ede4; /* warm beige */
  --card: #fffdf9; /* off-white */
  --text: #2b1e18; /* dark brown */
  --muted: #6b5b53; /* muted brown */
  --accent: #8b5e3c; /* cacao */
  --accent-contrast: #fff; /* button text */
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
    Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.5;
  overflow-x: hidden;
}

.wrap {
  display: grid;
  min-height: calc(100dvh - 120px);
  place-items: center;
  padding: clamp(12px, 3vw, 40px);
  width: 100%;
  max-width: 100vw;
}

.card {
  width: min(100%, 980px);
  background: var(--card);
  border-radius: clamp(16px, 4vw, 28px);
  box-shadow: 0 10px 30px rgba(43, 30, 24, 0.12);
  padding: clamp(16px, 4vw, 56px);
  display: grid;
  gap: clamp(16px, 4vw, 32px);
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  margin: 0 auto;
  max-width: calc(100vw - 24px);
}

.content {
  position: relative;
}

/* Mobile image - shown only on mobile */
.mobile-image {
  display: none;
  margin: clamp(16px, 4vw, 24px) 0;
  text-align: center;
}

/* Desktop image - shown only on desktop */
.desktop-image {
  display: block;
}

@media (max-width: 768px) {
  .card {
    grid-template-columns: 1fr;
    gap: clamp(20px, 6vw, 32px);
  }

  .wrap {
    padding: clamp(8px, 2vw, 20px);
  }

  /* Show mobile image, hide desktop image */
  .mobile-image {
    display: block;
  }

  .desktop-image {
    display: none;
  }
}

h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  letter-spacing: 0.2px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.05;
  margin: 0 0 8px 0;
}

.sub {
  font-size: clamp(18px, 2.2vw, 24px);
  color: var(--muted);
  margin: 0 0 16px 0;
}

.lead {
  font-size: clamp(16px, 1.6vw, 18px);
  margin: 0 0 20px 0;
  max-width: 60ch;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  background: var(--accent);
  color: var(--accent-contrast);
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(139, 94, 60, 0.22);
  cursor: pointer;
}

.cta:focus {
  outline: 3px solid #d9c7b9;
  outline-offset: 3px;
}

.cta:hover {
  transform: translateY(-1px);
}

.cta:active {
  transform: translateY(0);
}

/* ScrollToForm button - only visible on mobile */
#scrollToForm {
  display: none;
}

@media (max-width: 768px) {
  #scrollToForm {
    display: inline-flex;
  }
}

form {
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: 520px;
  margin-top: 6px;
}

.field {
  display: flex;
  gap: 10px;
}

@media (max-width: 480px) {
  .field {
    flex-direction: column;
    gap: 12px;
  }

  .field .cta {
    width: 100%;
  }
}

.input {
  flex: 1;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1.5px solid #e5d8cd;
  background: #fff;
  font-size: 16px;
  color: var(--text);
  min-width: 0;
}

.input:focus {
  outline: none;
  border-color: #d9c7b9;
  box-shadow: 0 0 0 4px rgba(217, 199, 185, 0.35);
}

.consent {
  font-size: 14px;
  color: var(--muted);
}

.legal {
  font-size: 12px;
  color: var(--muted);
}

.hero {
  position: relative;
  aspect-ratio: 4/3;
  width: 100%;
  background: radial-gradient(
    120% 100% at 70% 30%,
    #f8f0e8 0,
    #f0e6dc 35%,
    #e6d8cb 100%
  );
  border-radius: 24px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.choco {
  width: min(420px, 80%);
  filter: drop-shadow(0 20px 40px rgba(43, 30, 24, 0.25));
  height: auto;
  max-width: 100%;
}

/* Mobile image styling */
.mobile-image .choco {
  width: min(300px, 70%);
  filter: drop-shadow(0 15px 30px rgba(43, 30, 24, 0.2));
}

/* Desktop image styling */
.desktop-image .choco {
  width: min(420px, 80%);
  filter: drop-shadow(0 20px 40px rgba(43, 30, 24, 0.25));
}

.badge {
  position: absolute;
  top: 18px;
  left: 18px;
  background: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
}

.note {
  font-size: 13px;
  color: var(--muted);
}

.success {
  display: none;
  padding: 14px 16px;
  border-radius: 14px;
  background: #e7f6ec;
  color: #1b5e20;
  border: 1px solid #cdead5;
  font-weight: 600;
}

.error {
  display: none;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fdecea;
  color: #b00020;
  border: 1px solid #f5c6cb;
  font-weight: 600;
}

.visually-hidden {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* Legal pages styles */
.legal-main {
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(16px, 4vw, 24px);
  width: 100%;
  max-width: calc(100vw - 24px);
}

.legal-main h1 {
  margin-bottom: 16px;
  font-size: clamp(28px, 5vw, 48px);
}

.legal-main h2 {
  margin-top: 28px;
  margin-bottom: 8px;
  font-size: clamp(18px, 3vw, 20px);
}

.section {
  background: var(--card);
  border-radius: clamp(12px, 3vw, 16px);
  padding: clamp(14px, 4vw, 20px);
  box-shadow: 0 6px 20px rgba(43, 30, 24, 0.08);
  margin-bottom: 16px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

@media (max-width: 768px) {
  .legal-main {
    padding: clamp(12px, 3vw, 20px);
  }

  .section {
    padding: clamp(12px, 3vw, 16px);
  }
}

.list {
  margin: 0;
  padding-left: 18px;
}

.back {
  display: inline-block;
  margin: 12px 0 24px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.back:hover {
  text-decoration: underline;
}

address {
  font-style: normal;
}

/* Site footer */
.site-footer {
  margin-top: 40px;
  padding: 20px;
  text-align: center;
  border-top: 1px solid #eee0d6;
}

.site-footer nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.site-footer a:hover {
  color: var(--accent);
  background: rgba(139, 94, 60, 0.08);
}

.site-footer a[aria-current="page"] {
  color: var(--accent);
  font-weight: 600;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  background: var(--card);
  color: var(--text);
  border-top: 1px solid #eee0d6;
  box-shadow: 0 -8px 24px rgba(43, 30, 24, 0.08);
}
.cookie-banner__inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  gap: 16px;
  align-items: center;
}
.cookie-banner__text {
  flex: 1;
  font-size: 14px;
  color: var(--muted);
}
.cookie-banner__actions {
  display: inline-flex;
  gap: 10px;
}
.cookie-btn {
  background: var(--accent);
  color: var(--accent-contrast);
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
}
.cookie-btn.secondary {
  background: #e9ded5;
  color: var(--text);
}

/* Referral Section */
.referral-section {
  margin: 12px 0;
  padding: 12px;
  background: #f8f4f0;
  border-radius: 12px;
  border: 1px solid #e5d8cd;
}

.referral-label {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 500;
}

/* Progressive Enhancement: Hide referral section by default, show with JS */
/* .referral-section {
  display: none;
} */

/* Show referral section when JS is enabled */
.js-enabled .referral-section {
  display: block;
}

/* Make referral input same width as main email input */
.referral-section .field {
  display: flex;
  gap: 8px;
  align-items: center;
}

.referral-section .input {
  flex: 1;
  box-sizing: border-box;
  width: 100%;
}
