/*
 * Sweetener website. Brand palette and type from docs/BRAND.md: Ink text on
 * Cream or white, Raspberry for shapes, buttons and large type only,
 * Butterscotch sparingly for the "gift unlocked" moment.
 *
 * Fonts are served from this site, not Google's, so no visitor's IP address
 * goes to a third party. Both are SIL Open Font Licence.
 */

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --raspberry: #c23b5a;
  --raspberry-dark: #a32f4a;
  --ink: #1e2a2f;
  --ink-soft: #4a5559;
  --cream: #faf4ec;
  --cream-deep: #f3e9dc;
  --mint: #7db6a3;
  --mint-soft: #e3f0eb;
  --butterscotch: #e6a73a;
  --butterscotch-soft: #fbefd7;
  --white: #ffffff;
  --line: #e6dccf;

  --display: "Fraunces", Georgia, serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 14px;
  --width: 1120px;
  --gutter: 16px;
}

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

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
}

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

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-variation-settings: "SOFT" 100;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.3rem, 5.5vw, 3.6rem);
}

h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.5rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1em;
}

.wrap {
  max-width: var(--width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

@media (min-width: 720px) {
  :root {
    --gutter: 32px;
  }
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: var(--gutter);
  top: 12px;
  z-index: 10;
  background: var(--white);
  padding: 8px 12px;
  border-radius: 8px;
}

:focus-visible {
  outline: 3px solid var(--raspberry);
  outline-offset: 3px;
}

/* Buttons */

.button {
  display: inline-block;
  padding: 0.8em 1.4em;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  transition:
    background 0.15s,
    color 0.15s;
}

.button-primary {
  background: var(--raspberry);
  color: var(--white);
}

.button-primary:hover {
  background: var(--raspberry-dark);
}

.button-quiet {
  border-color: var(--ink);
  color: var(--ink);
}

.button-quiet:hover {
  background: var(--ink);
  color: var(--cream);
}

/* Header */

.site-header {
  padding: 18px 0;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--display);
  font-variation-settings: "SOFT" 100;
  font-weight: 650;
  font-size: 1.45rem;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-nav a:not(.button) {
  text-decoration: none;
  font-weight: 500;
  display: none;
}

.site-nav a:not(.button):hover {
  text-decoration: underline;
}

.site-nav .button {
  padding: 0.55em 1.1em;
  font-size: 0.95rem;
}

@media (min-width: 720px) {
  .site-nav a:not(.button) {
    display: inline;
  }
}

/* Hero */

.hero {
  padding: 40px 0 72px;
}

.hero .wrap {
  display: grid;
  gap: 48px;
  align-items: center;
}

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

.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--raspberry-dark);
  margin-bottom: 14px;
}

.lede {
  font-size: 1.2rem;
  color: var(--ink-soft);
  max-width: 34em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.note {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin-top: 16px;
}

/* The cart drawer in the hero: what a shopper sees. */

.cart {
  background: var(--white);
  border-radius: 20px;
  box-shadow:
    0 1px 2px rgba(30, 42, 47, 0.06),
    0 18px 40px rgba(30, 42, 47, 0.12);
  padding: 22px;
  max-width: 400px;
  width: 100%;
  justify-self: center;
  font-size: 0.95rem;
}

.cart-title {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.progress {
  margin: 16px 0 6px;
  font-size: 0.9rem;
}

.progress-bar {
  height: 8px;
  border-radius: 99px;
  background: var(--cream-deep);
  overflow: hidden;
  margin-top: 8px;
}

.progress-bar span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--mint);
}

.line {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: var(--cream-deep);
}

.thumb-gift {
  background: var(--butterscotch-soft);
  display: grid;
  place-items: center;
}

.line small {
  display: block;
  color: var(--ink-soft);
}

.tag {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--butterscotch-soft);
  color: #7a5211;
}

.price {
  font-weight: 600;
  text-align: right;
}

.price s {
  display: block;
  font-weight: 400;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  padding-top: 14px;
}

/* Sections */

section {
  padding: 72px 0;
}

.section-head {
  max-width: 40em;
  margin-bottom: 40px;
}

.section-head p {
  color: var(--ink-soft);
  font-size: 1.1rem;
}

.band {
  background: var(--white);
}

.grid {
  display: grid;
  gap: 20px;
}

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

@media (min-width: 960px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

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

.card {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 26px;
}

.band .card {
  background: var(--cream);
}

.card p {
  margin: 0;
  color: var(--ink-soft);
}

.card-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--mint-soft);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}

/* How it works */

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-top: 58px;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--raspberry);
  color: var(--white);
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.2rem;
  display: grid;
  place-items: center;
}

.steps p {
  color: var(--ink-soft);
  margin: 0;
}

/* Pricing */

.plan {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
}

.plan-featured {
  border: 2px solid var(--raspberry);
}

.plan h3 {
  margin-bottom: 4px;
}

.plan-for {
  color: var(--ink-soft);
  font-size: 0.95rem;
  min-height: 3em;
}

.amount {
  font-family: var(--display);
  font-variation-settings: "SOFT" 100;
  font-size: 2.3rem;
  font-weight: 600;
  line-height: 1;
  margin: 12px 0 4px;
}

.amount small {
  font-family: var(--body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.plan ul {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  border-top: 1px solid var(--line);
}

.plan li {
  padding: 10px 0 10px 26px;
  border-bottom: 1px solid var(--line);
  position: relative;
  font-size: 0.95rem;
}

.plan li:last-child {
  border-bottom: 0;
}

.plan li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 17px;
  width: 12px;
  height: 7px;
  border-left: 2.5px solid var(--mint);
  border-bottom: 2.5px solid var(--mint);
  transform: rotate(-45deg);
}

.pricing-notes {
  margin-top: 28px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  max-width: 48em;
}

/* Story */

.story {
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 900px) {
  .story {
    grid-template-columns: 0.8fr 1.2fr;
  }
}

.story blockquote {
  margin: 0;
  font-family: var(--display);
  font-variation-settings: "SOFT" 100;
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  line-height: 1.25;
  color: var(--raspberry-dark);
}

.signature {
  font-weight: 600;
  margin-top: 20px;
}

/* FAQ */

.faq {
  max-width: 48em;
}

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
}

.faq details p {
  margin: 12px 0 0;
  color: var(--ink-soft);
}

/* Closing call to action */

.closing {
  background: var(--ink);
  color: var(--cream);
  text-align: center;
}

.closing p {
  color: #d5dcde;
  max-width: 34em;
  margin-left: auto;
  margin-right: auto;
}

.closing .actions {
  justify-content: center;
}

/* Footer */

.site-footer {
  padding: 36px 0 48px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  justify-content: space-between;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

/* Legal and support pages */

.prose {
  max-width: 44em;
  padding: 24px 0 72px;
}

.prose h1 {
  font-size: clamp(2rem, 4.5vw, 2.8rem);
}

.prose h2 {
  font-size: 1.5rem;
  margin-top: 1.8em;
}

.prose li {
  margin-bottom: 0.4em;
}

.prose table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
  margin: 0 0 1em;
}

.prose th,
.prose td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--line);
}

.draft {
  background: var(--butterscotch-soft);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.95rem;
}
