/* ─── Base — resets, type, layout, shared UI (buttons, taglines, photo
   placeholder, cards, ticks, reveal). Mobile-first; breakpoints
   480 / 640 / 768 / 992 / 1200. ───────────────────────────────────────────── */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  /* Themed page scrollbar (docs/styling.md) */
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--primary-color) 60%, var(--bg-color)) var(--bg-color);
}

@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
  }
  ::-webkit-scrollbar-track {
    background: var(--bg-color);
  }
  ::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--primary-color) 60%, var(--bg-color));
    border: 2px solid var(--bg-color);
    border-radius: var(--pill);

    &:hover {
      background: var(--primary-color);
    }
  }
}

body {
  min-width: 320px;
  font-family: var(--font-text);
  background: var(--sand);
  color: var(--cocoa);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: none;
  border: 0;
}

input,
textarea,
select {
  font: inherit;
}

ul,
ol {
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ─── Type ─────────────────────────────────────────────────────────────── */
h1,
h2,
h3,
h4 {
  font-family: var(--font-title);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: inherit;

  & em {
    font-style: italic;
    color: var(--clay);
  }
}

h2 {
  font-size: clamp(2.4rem, 5vw, 4rem);
}

h3 {
  font-size: 1.6rem;
}

.lead {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 560px;
}

.tagline,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage-d);
  text-decoration: none;
}

.tagline::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--clay);
}

/* ─── Layout ───────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.main {
  display: block;
}

section {
  position: relative;
}

.tone-sand,
.tone-cream {
  padding: var(--section-y) 0;
}

.tone-cream {
  background: var(--cream);
}

/* Two sections on the same tone read as one band: the second drops its
   top padding. This also gives the design's boxed joins (how → finder,
   plans → newsletter → banner) in every homepage layout. */
.tone-sand + .tone-sand,
.tone-cream + .tone-cream {
  padding-top: 0;
}

.sec-head {
  margin-bottom: 56px;

  & h2 {
    margin-top: 14px;
  }

  & .lead {
    margin-top: 16px;
  }
}

.sec-head--center {
  text-align: center;

  & .lead {
    margin-left: auto;
    margin-right: auto;
  }
}

/* ─── Accessibility utilities ──────────────────────────────────────────── */
.screen-reader-text,
.screen-reader-response {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 300;
  background: var(--cocoa);
  color: var(--cream);
  padding: 10px 16px;
  border-radius: var(--pill);
  text-decoration: none;

  &:focus {
    top: 12px;
  }
}

/* ─── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: var(--pill);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  border: 1.5px solid transparent;
  transition: transform 0.3s var(--ease), background-color 0.25s, color 0.25s, border-color 0.25s, box-shadow 0.3s;
}

.btn--clay {
  background: var(--clay);
  color: var(--white);
  box-shadow: var(--shadow-clay);

  &:hover {
    background: var(--clay-d);
    transform: translateY(-2px);
  }
}

.btn--dark {
  background: var(--cocoa);
  color: var(--cream);

  &:hover {
    background: var(--cocoa-deep);
    transform: translateY(-2px);
  }
}

.btn--outline {
  border-color: var(--cocoa);
  color: var(--cocoa);

  &:hover {
    background: var(--cocoa);
    color: var(--cream);
  }
}

.btn--cream {
  background: var(--cream);
  color: var(--cocoa);

  &:hover {
    transform: translateY(-2px);
  }
}

.btn--ghost {
  border-color: color-mix(in srgb, var(--surface-color) 60%, transparent);
  color: var(--cream);

  &:hover {
    background: var(--cream);
    color: var(--cocoa);
  }
}

.btn[aria-disabled="true"] {
  opacity: 0.4;
  pointer-events: none;
}

/* ─── Photo slot — soft sand/clay/sage gradient placeholder; the real
   image (when set in the Customizer) covers it. ─────────────────────── */
.photo {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(70% 60% at 30% 25%, color-mix(in srgb, var(--clay-soft) 95%, transparent), transparent 70%),
    radial-gradient(60% 60% at 80% 80%, color-mix(in srgb, var(--sage) 70%, transparent), transparent 70%),
    linear-gradient(160deg, color-mix(in srgb, var(--border-color) 80%, var(--primary-color) 6%), color-mix(in srgb, var(--border-color) 60%, var(--text-color) 22%));

  & img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

.arch {
  border-radius: var(--pill) var(--pill) var(--r) var(--r);
}

/* ─── Card ─────────────────────────────────────────────────────────────── */
.card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px;
  box-shadow: var(--shadow-card);
}

/* ─── Tick list ────────────────────────────────────────────────────────── */
.ticks {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px 20px;
  margin: 26px 0;

  & li {
    position: relative;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-weight: 600;
    font-size: 0.94rem;
  }

  & li::before {
    content: "";
    flex: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    margin-top: 1px;
    background: var(--sage-soft);
  }

  /* the check mark, drawn with borders so it follows the theme colors */
  & li::after {
    content: "";
    position: absolute;
    left: 8px;
    top: 6px;
    width: 6px;
    height: 10px;
    border: solid var(--sage-d);
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
  }
}

@media (min-width: 640px) {
  .ticks--2 {
    grid-template-columns: 1fr 1fr;
  }
}

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

/* ─── Reveal on scroll (assets/js/script.js) ───────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .js .rv {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s var(--ease), transform 1s var(--ease);
  }

  .js .rv.in {
    opacity: 1;
    transform: none;
  }

  .rv.d1 {
    transition-delay: 0.1s;
  }

  .rv.d2 {
    transition-delay: 0.2s;
  }

  .rv.d3 {
    transition-delay: 0.3s;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
