/*
  style.css  ::  warm, organic, rounded landing page
  ===================================================
  Visual layer only. HTML structure, config system and conversion JS stay intact.

  Direction (from the client inspiration)
  - Warm off white page, one strong brand color, deep brand color bands for the
    hero, the call to action, and the footer.
  - Curves are on: rounded cards, pill buttons, circular product images and
    avatars.
  - Image rich, friendly and confident. Generous whitespace, 8px spacing scale.
  - Type: rounded geometric headings (Poppins by default), body 17px at 1.6.

  Brand variables (--bg, --text, --accent, --brand-dark, --font-heading, and so
  on) are set at runtime by script.js from config.js. Static design tokens are
  here.

  Structure:
  1. Variables
  2. Base and reset
  3. Primitives (container, eyebrow, buttons, section title)
  4. Section blocks, in page order
  5. Responsive
*/

/* 1. VARIABLES ----------------------------------------------------------- */
:root {
  /* Brand colors (overridden from config.colors) */
  --bg: #f8f6f0;
  --surface: #ffffff;
  --accent-soft: #e8f1e9;
  --text: #16271c;
  --muted: #5e6b62;
  --border: #e6e2d6;
  --accent: #2f7a44;
  --accent-text: #ffffff;
  --brand-dark: #14281c;
  --footer-bg: #14281c;
  --footer-text: #dfe7df;

  /* Fonts (overridden from config.fonts) */
  --font-heading: system-ui, sans-serif;
  --font-body: system-ui, sans-serif;

  /* Shape */
  --radius: 14px;        /* base card / input radius (from config) */
  --radius-pill: 999px;  /* buttons and chips */

  /* Layout */
  --maxw: 1120px;
  --section-y: 96px;

  /* 8px spacing scale */
  --s-1: 8px;
  --s-2: 16px;
  --s-3: 24px;
  --s-4: 32px;
  --s-5: 40px;
  --s-6: 48px;
  --s-8: 64px;
  --s-10: 80px;
  --s-12: 96px;

  /* Type scale */
  --fs-hero: clamp(2.5rem, 5.5vw, 3.25rem);  /* up to 52px */
  --fs-h2: clamp(1.9rem, 4vw, 2.25rem);      /* 30 to 36px */
  --fs-h3: 1.3125rem;                        /* 21px */
  --fs-body: 1.0625rem;                      /* 17px */
  --fs-body-lg: 1.125rem;                    /* 18px */
  --fs-small: 0.875rem;                      /* 14px */
  --fs-eyebrow: 0.8125rem;                   /* 13px */
}

/* 2. BASE AND RESET ------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1,
h2,
h3 {
  font-family: var(--font-heading);
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

[hidden] {
  display: none !important;
}

/* 3. PRIMITIVES ---------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--s-3);
}

.eyebrow,
.package-badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.section-title {
  font-size: var(--fs-h2);
  font-weight: 700;
  max-width: 24ch;
  margin: 0 0 var(--s-6);
}

/* Buttons: pill shaped, solid accent by default */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  padding: 16px 32px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--accent-text);
  transition: filter 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  filter: brightness(0.93);
}

.btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.btn-block {
  display: block;
  width: 100%;
}

/* Light button, used on the dark brand bands */
.btn-light {
  background: #ffffff;
  color: var(--brand-dark);
  border-color: #ffffff;
}

/* 4. SECTION BLOCKS ------------------------------------------------------ */

/* SECTION: hero (deep brand band, two columns) */
.hero {
  background: var(--brand-dark);
  color: #ffffff;
  padding: var(--s-10) 0 var(--s-12);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-8);
  align-items: center;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: var(--s-1);
  margin-bottom: var(--s-5);
}

.hero-logo {
  height: 30px;
  width: auto;
}

.hero-business {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: #ffffff;
}

.hero-headline {
  font-size: var(--fs-hero);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 18ch;
  margin: 0 0 var(--s-3);
}

.hero-subheadline {
  font-size: var(--fs-body-lg);
  color: rgba(255, 255, 255, 0.78);
  max-width: 52ch;
  margin: 0 0 var(--s-5);
}

/* Hero CTA reads as a light pill on the dark band */
.hero-cta {
  background: #ffffff;
  color: var(--brand-dark);
  border-color: #ffffff;
}

.hero-media {
  justify-self: stretch;
}

.hero-image {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

/* SECTION: trust strip (warm row, left aligned) */
.trust {
  padding: var(--s-5) 0;
  border-bottom: 1px solid var(--border);
}

.trust-list {
  list-style: none;
  margin: 0;
  padding: 0;
  /* Two columns so the short items pair up instead of one per line */
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-2) var(--s-4);
}

.trust-list li {
  position: relative;
  padding-left: var(--s-3);
  color: var(--muted);
  font-size: var(--fs-small);
}

/* Small accent dot marker */
.trust-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* SECTION: about (image plus text) */
.about {
  padding: var(--section-y) 0 var(--s-4); /* reduced bottom padding (32px) */
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-6);
  align-items: center;
}

.about-image {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.about-text .section-title {
  margin-top: var(--s-2);
  margin-bottom: var(--s-3);
}

.about-body p {
  color: var(--muted);
  font-size: var(--fs-body);
  margin: 0 0 var(--s-2);
}

.about-body p:last-child {
  margin-bottom: 0;
}

/* SECTION: packages (rounded cards, circular product images, centered) */
.packages {
  padding: var(--section-y) 0;
}

.packages .section-title {
  text-align: center;
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}

.packages-grid {
  display: grid;
  gap: var(--s-5);
  grid-template-columns: 1fr;
}

.package {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s-5) var(--s-4) var(--s-4);
}

.package.is-popular {
  border-color: var(--accent);
  border-width: 2px;
}

.package-media {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--accent-soft);
  margin-bottom: var(--s-3);
}

.package-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.package.is-selected .package-media {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.package-badge {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  margin-bottom: var(--s-2);
}

.package-name {
  font-size: var(--fs-h3);
  font-weight: 600;
  margin: 0 0 var(--s-1);
}

.package-price {
  font-family: var(--font-heading);
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 var(--s-1);
}

.package-desc {
  color: var(--muted);
  font-size: var(--fs-body);
  margin: 0 0 var(--s-3);
  flex-grow: 1;
}

.package .btn {
  margin-top: auto;
  width: 100%;
}

/* SECTION: benefits (cards with circular icon badges) */
.benefits {
  padding: var(--section-y) 0;
  background: var(--accent-soft);
}

.benefits-grid {
  display: grid;
  gap: var(--s-4);
  grid-template-columns: 1fr;
}

.benefit {
  background: var(--surface);
  border-radius: var(--radius);
  padding: var(--s-4);
}

/* Circular accent badge with a check mark (no emoji, inline SVG via data URI) */
.benefit::before {
  content: "";
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--accent);
  margin-bottom: var(--s-3);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 22px 22px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

.benefit-title {
  font-size: var(--fs-h3);
  font-weight: 600;
  margin: 0 0 var(--s-1);
}

.benefit-text {
  color: var(--muted);
  font-size: var(--fs-body);
  margin: 0;
}

/* SECTION: how it works (circular accent numbers) */
.steps {
  padding: var(--section-y) 0;
}

.steps-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s-5);
  grid-template-columns: 1fr;
  counter-reset: step;
}

/* Each step is a two column row: number on the left, content on the right */
.step {
  counter-increment: step;
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
}

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
}

.step-body {
  padding-top: 4px;
}

.step-num::before {
  content: counter(step, decimal-leading-zero);
}

.step-title {
  font-size: var(--fs-h3);
  font-weight: 600;
  margin: 0 0 var(--s-1);
}

.step-text {
  color: var(--muted);
  font-size: var(--fs-body);
  margin: 0;
}

/* SECTION: testimonials (rounded cards with circular avatars) */
.testimonials {
  padding: var(--section-y) 0;
  background: var(--accent-soft);
}

.testimonials-grid {
  display: grid;
  gap: var(--s-4);
  grid-template-columns: 1fr;
}

.testimonial {
  margin: 0;
  background: var(--surface);
  border-radius: var(--radius);
  padding: var(--s-4);
}

.testimonial-quote {
  font-family: var(--font-heading);
  font-size: 1.1875rem;
  font-weight: 500;
  line-height: 1.45;
  margin: 0 0 var(--s-3);
}

.testimonial-foot {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.testimonial-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.0625rem;
}

.testimonial-meta {
  color: var(--muted);
  font-size: var(--fs-small);
  margin: 0;
}

/* SECTION: call to action band (deep brand band, centered) */
.cta-band {
  background: var(--brand-dark);
  color: #ffffff;
  padding: var(--section-y) 0;
}

.cta-inner {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.cta-heading {
  font-size: var(--fs-h2);
  font-weight: 700;
  margin: 0 0 var(--s-2);
}

.cta-text {
  color: rgba(255, 255, 255, 0.78);
  font-size: var(--fs-body-lg);
  margin: 0 0 var(--s-5);
}

/* SECTION: form (rounded card, centered column) */
.order {
  padding: var(--section-y) 0;
}

.order-inner {
  max-width: 560px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s-6);
}

.order .section-title {
  margin-bottom: var(--s-2);
}

.order-sub {
  color: var(--muted);
  font-size: var(--fs-body);
  margin: 0 0 var(--s-5);
}

.field {
  margin-bottom: var(--s-3);
}

.field label {
  display: block;
  font-size: var(--fs-small);
  font-weight: 600;
  margin-bottom: var(--s-1);
}

.field input,
.field select {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.field input::placeholder {
  color: #9aa39a;
}

.field input:focus,
.field select:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: var(--accent);
}

/* Custom select chevron so it matches inputs across browsers */
.field select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 44px;
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23161616' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='2 4 6 8 10 4'/%3E%3C/svg%3E");
}

/* Greyed out look while the placeholder option is selected */
.field select:invalid {
  color: #9aa39a;
}

/* Order summary card: inner card showing the chosen package + qty + total.
   Sits inside the form, just above the submit button. Hard to miss. */
.order-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "info qty"
    "total total";
  align-items: center;
  gap: var(--s-2) var(--s-3);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: var(--s-3);
  margin: var(--s-1) 0 var(--s-3);
}

.order-summary-info {
  grid-area: info;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.order-summary-label {
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2px;
}

.order-summary-name {
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.order-summary-price {
  font-size: var(--fs-small);
  color: var(--muted);
  margin-top: 2px;
}

.order-summary-total {
  grid-area: total;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: var(--s-2);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.order-summary-total-label {
  font-size: var(--fs-small);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.order-summary-total-value {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

/* Quantity selector: minus, number, plus, all in one rounded pill */
.qty {
  grid-area: qty;
  display: inline-flex;
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
  height: 40px;
}

.qty-btn {
  width: 36px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.15s ease;
}

.qty-btn:hover {
  background: var(--accent-soft);
}

.qty-input {
  width: 44px;
  border: 0;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: transparent;
  text-align: center;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--text);
  padding: 0;
  -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qty-input:focus {
  outline: none;
}

.form-error {
  color: #b3261e;
  font-size: var(--fs-small);
  margin: 0 0 var(--s-2);
}

/* SECTION: gallery (additional product images, two per row) */
.gallery {
  padding: var(--section-y) 0;
  border-top: 1px solid var(--border);
}

.gallery-title {
  text-align: center;
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}

.gallery-grid {
  display: grid;
  gap: var(--s-3);
  /* Mobile: one image per row, full width */
  grid-template-columns: 1fr;
}

.gallery-item {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
}

/* Full width to the column; natural aspect ratio preserved.
   Portrait stays portrait, landscape stays landscape, no cropping. */
.gallery-image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-image {
  transform: scale(1.03);
}

/* SECTION: footer (deep brand band) */
.footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: var(--s-8) 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-3);
}

.footer-business {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.125rem;
}

.footer-social {
  display: flex;
  gap: var(--s-3);
}

.footer-social 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: var(--footer-text);
  opacity: 0.85;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}

.footer-social a:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.16);
}

/* Social icons are monochrome, inheriting currentColor, not platform colors */
.footer-social svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.footer-copy {
  color: var(--footer-text);
  opacity: 0.6;
  font-size: var(--fs-small);
}

.footer-phone {
  color: var(--footer-text);
  text-decoration: none;
  opacity: 0.85;
  font-size: var(--fs-small);
  transition: opacity 0.15s ease;
}

.footer-phone:hover {
  opacity: 1;
}

/* 5. RESPONSIVE ---------------------------------------------------------- */
@media (max-width: 699px) {
  :root {
    --section-y: 64px;
  }

  .order-inner {
    padding: var(--s-4);
  }
}

@media (min-width: 760px) {
  .hero-inner {
    grid-template-columns: 1.1fr 0.9fr;
  }

  /* Wider screens: all four items in a single row */
  .trust-list {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--s-2) var(--s-6);
  }

  .about-inner {
    grid-template-columns: 0.9fr 1.1fr;
    gap: var(--s-8);
  }

  .benefits-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* How it works: two columns of number plus content rows */
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--s-5) var(--s-8);
  }

  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Gallery: layout adapts to image count, like packages */
  .gallery-grid[data-count="1"] {
    grid-template-columns: minmax(0, 520px);
    justify-content: center;
  }
  .gallery-grid[data-count="2"] {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-grid[data-count="3"] {
    grid-template-columns: repeat(3, 1fr);
  }
  .gallery-grid[data-count="4"] {
    grid-template-columns: repeat(2, 1fr);
  }

  .packages-grid[data-count="1"] {
    grid-template-columns: minmax(0, 380px);
    justify-content: center;
  }

  .packages-grid[data-count="2"] {
    grid-template-columns: repeat(2, 1fr);
  }

  .packages-grid[data-count="3"] {
    grid-template-columns: repeat(3, 1fr);
  }

  .packages-grid[data-count="4"] {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 1000px) {
  .packages-grid[data-count="4"] {
    grid-template-columns: repeat(4, 1fr);
  }
  .gallery-grid[data-count="4"] {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* 6. ANIMATIONS ---------------------------------------------------------- */
/* The "reveal" class is added by script.js, so content stays visible if JS is
   off. Elements fade and rise in as they scroll into view. */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}

.reveal.reveal-in {
  opacity: 1;
  transform: none;
}

/* Gentle lift on interactive cards */
.package {
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.package:hover {
  transform: translateY(-4px);
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .reveal.reveal-in,
  .package {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
