/* ===== Design tokens ===== */
:root {
  --ink: #14211d;
  --ink-soft: #44574f;
  --bg: #fbf9f4;
  --surface: #ffffff;
  --line: #e6e1d6;
  --brand: #0f7a5a;
  --brand-deep: #0a5b43;
  --accent: #e8923a;
  --shadow: 0 14px 40px -18px rgba(20, 33, 29, 0.35);
  --radius: 18px;
  --maxw: 1140px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: "Fraunces", Georgia, serif; line-height: 1.12; margin: 0; font-weight: 600; }
p { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.visually-hidden, .skip-link {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed; top: 12px; left: 12px;
  width: auto; height: auto; clip: auto; z-index: 200;
  background: var(--ink); color: #fff;
  padding: 10px 16px; border-radius: 10px;
}

/* ===== Buttons ===== */
.btn {
  --pad: 14px 26px;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: var(--pad);
  font-weight: 600; font-size: 0.97rem;
  border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; transition: transform 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease), color 0.25s;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.btn--primary { background: var(--brand); color: #fff; box-shadow: var(--shadow); }
.btn--primary:hover { background: var(--brand-deep); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn--small { --pad: 10px 18px; font-size: 0.9rem; }
.btn--block { width: 100%; }

/* ===== Nav ===== */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251, 249, 244, 0.8);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}
.nav.is-scrolled { border-color: var(--line); box-shadow: 0 6px 24px -18px rgba(0,0,0,0.4); }
.nav__inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 14px 22px;
  display: flex; align-items: center; gap: 22px;
}
.nav__brand { font-family: "Fraunces", serif; font-weight: 600; font-size: 1.3rem; display: flex; align-items: center; gap: 8px; }
.nav__logo { font-size: 1.2rem; }
.nav__links { margin-left: auto; display: flex; gap: 26px; }
.nav__links a { font-weight: 500; color: var(--ink-soft); position: relative; padding: 4px 0; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 2px; background: var(--brand); transition: width 0.28s var(--ease);
}
.nav__links a:hover, .nav__links a:focus-visible { color: var(--ink); }
.nav__links a:hover::after, .nav__links a:focus-visible::after { width: 100%; }
.nav__cta { flex-shrink: 0; }
.nav__toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 6px;
}
.nav__toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Hero ===== */
.hero {
  position: relative; overflow: hidden;
  min-height: 92vh; display: grid; align-items: center;
  padding: 80px 22px;
}
.hero__bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(15,122,90,0.18), transparent 60%),
    radial-gradient(900px 500px at 0% 110%, rgba(232,146,58,0.16), transparent 60%),
    linear-gradient(180deg, #f4f1e8, var(--bg));
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: url("https://images.unsplash.com/photo-1488646953014-85cb44e25828?auto=format&fit=crop&w=1400&q=60");
  background-size: cover; background-position: center;
  opacity: 0.14; mix-blend-mode: multiply;
}
.hero__content { max-width: 760px; margin: 0 auto; text-align: center; }
.hero__eyebrow {
  text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.78rem;
  font-weight: 600; color: var(--brand-deep); margin-bottom: 18px;
}
.hero__title { font-size: clamp(2.6rem, 7vw, 5rem); letter-spacing: -0.02em; }
.hero__title em { font-style: italic; color: var(--brand); }
.hero__sub { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--ink-soft); margin: 22px auto 34px; max-width: 580px; }
.hero__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero__stats {
  display: flex; gap: 40px; justify-content: center; flex-wrap: wrap;
  margin: 54px 0 0; padding-top: 30px; border-top: 1px solid var(--line);
}
.hero__stats div { text-align: center; }
.hero__stats dt { font-family: "Fraunces", serif; font-size: 2rem; font-weight: 600; color: var(--ink); }
.hero__stats dd { margin: 2px 0 0; font-size: 0.85rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.08em; }

/* ===== Section shell ===== */
.section { max-width: var(--maxw); margin: 0 auto; padding: 96px 22px; }
.section__head { text-align: center; max-width: 620px; margin: 0 auto 48px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.76rem; font-weight: 700; color: var(--brand); margin-bottom: 12px; }
.section__head h2 { font-size: clamp(2rem, 4vw, 2.9rem); letter-spacing: -0.02em; }
.section__lead { color: var(--ink-soft); margin-top: 14px; font-size: 1.05rem; }

/* ===== Filters ===== */
.filters { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 38px; }
.filter {
  padding: 9px 20px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface);
  font-weight: 600; font-size: 0.9rem; color: var(--ink-soft);
  transition: all 0.25s var(--ease);
}
.filter:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.filter.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.filter:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ===== Cards ===== */
.cards {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 26px;
}
.card {
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), opacity 0.4s, scale 0.4s;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 22px 50px -22px rgba(20,33,29,0.45); }
.card.is-hidden { display: none; }
.card__media {
  height: 210px;
  background-image: var(--img); background-size: cover; background-position: center;
  transition: transform 0.6s var(--ease);
}
.card:hover .card__media { transform: scale(1.06); }
.card__body { padding: 20px 22px 24px; }
.tag {
  display: inline-block; font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--brand-deep); background: rgba(15,122,90,0.1);
  padding: 4px 10px; border-radius: 999px; margin-bottom: 12px;
}
.card__body h3 { font-size: 1.35rem; margin-bottom: 6px; }
.card__body p { color: var(--ink-soft); font-size: 0.95rem; }
.card__price { margin-top: 14px !important; color: var(--ink) !important; }
.card__price strong { font-size: 1.1rem; color: var(--brand-deep); }
.cards__empty { text-align: center; color: var(--ink-soft); margin-top: 30px; }

/* ===== Testimonials slider ===== */
.slider { position: relative; max-width: 760px; margin: 0 auto; }
.slider__viewport { overflow: hidden; border-radius: var(--radius); }
.slider__track { list-style: none; margin: 0; padding: 0; display: flex; transition: transform 0.55s var(--ease); }
.slide {
  flex: 0 0 100%; padding: 48px 56px; text-align: center;
  background: var(--surface); border: 1px solid var(--line);
}
.slide blockquote { margin: 0; font-family: "Fraunces", serif; font-size: clamp(1.25rem, 3vw, 1.7rem); line-height: 1.4; }
.slide__by { margin-top: 22px; color: var(--ink-soft); }
.slide__by strong { color: var(--ink); }
.slider__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--surface); border: 1.5px solid var(--line);
  font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--ink);
  display: grid; place-items: center; transition: all 0.25s var(--ease); z-index: 2;
}
.slider__nav:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.slider__nav:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.slider__nav--prev { left: -10px; }
.slider__nav--next { right: -10px; }
.slider__dots { display: flex; gap: 10px; justify-content: center; margin-top: 26px; }
.slider__dots button {
  width: 10px; height: 10px; border-radius: 50%; padding: 0;
  border: 0; background: var(--line); cursor: pointer; transition: all 0.25s var(--ease);
}
.slider__dots button.is-active { background: var(--brand); transform: scale(1.4); }
.slider__dots button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ===== Pricing ===== */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 26px; align-items: start; }
.plan {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 34px 28px;
  box-shadow: var(--shadow); position: relative;
  transition: transform 0.3s var(--ease);
}
.plan:hover { transform: translateY(-6px); }
.plan--featured { border-color: var(--brand); border-width: 2px; }
.plan__badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; padding: 6px 14px; border-radius: 999px;
}
.plan__name { font-size: 1.5rem; }
.plan__price { font-family: "Fraunces", serif; font-size: 2.8rem; font-weight: 600; margin: 12px 0 4px; }
.plan__price span { font-size: 1.4rem; vertical-align: super; }
.plan__price small { font-size: 0.95rem; font-family: "Inter", sans-serif; color: var(--ink-soft); font-weight: 400; }
.plan__tag { color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 22px; }
.plan__feats { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 12px; }
.plan__feats li { position: relative; padding-left: 28px; font-size: 0.95rem; }
.plan__feats li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--brand); font-weight: 700;
}

/* ===== FAQ ===== */
.accordion { max-width: 760px; margin: 0 auto; }
.acc__item { border-bottom: 1px solid var(--line); }
.acc__item h3 { margin: 0; }
.acc__trigger {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 24px 4px; font-family: "Fraunces", serif; font-size: 1.15rem; color: var(--ink);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.acc__trigger:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.acc__icon { position: relative; width: 16px; height: 16px; flex-shrink: 0; }
.acc__icon::before, .acc__icon::after {
  content: ""; position: absolute; background: var(--brand); border-radius: 2px;
  top: 50%; left: 50%; transition: transform 0.3s var(--ease);
}
.acc__icon::before { width: 16px; height: 2px; transform: translate(-50%, -50%); }
.acc__icon::after { width: 2px; height: 16px; transform: translate(-50%, -50%); }
.acc__trigger[aria-expanded="true"] .acc__icon::after { transform: translate(-50%, -50%) scaleY(0); }
.acc__panel {
  overflow: hidden; max-height: 0;
  transition: max-height 0.4s var(--ease), opacity 0.3s;
  opacity: 0;
}
.acc__panel p { padding: 0 4px 24px; color: var(--ink-soft); }
.acc__item.is-open .acc__panel { opacity: 1; }

/* ===== Newsletter ===== */
.newsletter { padding-top: 40px; }
.newsletter__card {
  background: linear-gradient(135deg, var(--brand-deep), var(--brand));
  color: #fff; border-radius: 28px; padding: 56px clamp(28px, 5vw, 64px);
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 36px; align-items: center;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.newsletter__card::after {
  content: ""; position: absolute; right: -60px; top: -60px;
  width: 240px; height: 240px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.newsletter__text h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.newsletter__text p { margin-top: 12px; color: rgba(255,255,255,0.85); }
.newsletter__form { display: flex; gap: 12px; flex-wrap: wrap; position: relative; }
.newsletter__form input {
  flex: 1 1 200px; padding: 14px 18px; border-radius: 999px; border: 0;
  font-size: 1rem; font-family: inherit; color: var(--ink);
}
.newsletter__form input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.newsletter__form .btn--primary { background: var(--accent); }
.newsletter__form .btn--primary:hover { background: #d27f2b; }
.newsletter__msg { flex-basis: 100%; margin: 4px 2px 0; min-height: 20px; font-size: 0.9rem; font-weight: 500; }
.newsletter__msg.is-error { color: #ffd9b3; }
.newsletter__msg.is-ok { color: #d6ffe9; }

/* ===== Footer ===== */
.footer { border-top: 1px solid var(--line); margin-top: 40px; }
.footer__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 36px 22px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.footer__brand { font-family: "Fraunces", serif; font-weight: 600; font-size: 1.2rem; }
.footer__copy { color: var(--ink-soft); font-size: 0.9rem; }
.footer__links { margin-left: auto; display: flex; gap: 22px; }
.footer__links a { color: var(--ink-soft); font-size: 0.9rem; transition: color 0.2s; }
.footer__links a:hover { color: var(--brand); }

/* ===== Back to top ===== */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--ink); color: #fff; border: 0; cursor: pointer;
  font-size: 1.2rem; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(12px); transition: opacity 0.3s, transform 0.3s;
}
.to-top.is-visible { opacity: 1; transform: translateY(0); }
.to-top:hover { background: var(--brand); }
.to-top:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ===== Reveal on scroll ===== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 820px) {
  .nav__links {
    position: fixed; inset: 64px 0 auto 0;
    flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px 22px 18px; margin: 0;
    transform: translateY(-130%); transition: transform 0.35s var(--ease); box-shadow: var(--shadow);
  }
  .nav__links.is-open { transform: translateY(0); }
  .nav__links a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav__cta { display: none; }
  .nav__toggle { display: flex; margin-left: auto; }
  .newsletter__card { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .hero__stats { gap: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  .btn:hover, .card:hover, .plan:hover { transform: none; }
  .slider__track { transition: none; }
}
