/* Diary Badger website. One stylesheet for every page. */

/* ---- Colours ----------------------------------------------------------------------------------------------------
   Badger Ink #16181B, White, Ribbon Red #F24A33. Ribbon Red is for the logo and large shapes; buttons and links use
   deeper reds so white text on them (and red text on white) stays readable. Dark mode follows the visitor's device. */
:root {
  color-scheme: light dark;
  --background: #ffffff;
  --text: #16181b;
  --muted: #5f636b;
  --surface: #f6f5f2;
  --card: #ffffff;
  --line: #e7e5e0;
  --ribbon: #f24a33;
  --accent: #d9361d;
  --accent-hover: #bf2d17;
  --accent-text: #c2301a;
  --accent-soft: #fdebe7;
  --ink: #16181b;
  --shadow: 0 1px 2px rgb(22 24 27 / 0.04), 0 8px 24px rgb(22 24 27 / 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #16181b;
    --text: #ffffff;
    --muted: #a3a7ae;
    --surface: #1d2024;
    --card: #22252a;
    --line: #30343a;
    --accent-text: #f4705e;
    --accent-soft: #3a211d;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3);
  }
}

/* ---- Font ---------------------------------------------------------------------------------------------------------
   Plus Jakarta Sans (SIL Open Font Licence, fonts/LICENSE.txt): one file with every weight, Latin letters only. */
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/fonts/plus-jakarta-sans.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

/* Until the font arrives, Arial stands in, resized to Plus Jakarta Sans's measurements so text doesn't jump when it
   swaps. Regular Arial up to weight 500, bold from 600. */
@font-face {
  font-family: "Jakarta Fallback";
  src: local("Arial"), local("ArialMT");
  font-weight: 100 500;
  size-adjust: 105.07%;
  ascent-override: 98.79%;
  descent-override: 21.13%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Jakarta Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT");
  font-weight: 600 900;
  size-adjust: 101.05%;
  ascent-override: 102.72%;
  descent-override: 21.97%;
  line-gap-override: 0%;
}

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

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
  font-family: "Plus Jakarta Sans", "Jakarta Fallback", ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

h1,
h2,
h3 {
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1,
h2 {
  font-weight: 800;
}

h2 {
  font-size: 1.875rem;
  line-height: 1.2;
}

h3 {
  font-size: 1rem;
  font-weight: 700;
}

a {
  color: inherit;
}

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

/* Sides only, so a container can also have its own space above and below (the footer, the red bar). */
.container {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.container-narrow {
  max-width: 48rem;
}

.muted {
  color: var(--muted);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.75rem;
  z-index: 50;
  border-radius: 999px;
  background: var(--text);
  color: var(--background);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 700;
}

.skip-link:focus {
  left: 0.75rem;
}

/* ---- Buttons ------------------------------------------------------------------------------------------------------ */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.5rem;
  padding: 0 1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.15s;
}

.button-large {
  height: 3rem;
  padding: 0 1.5rem;
  font-size: 1rem;
}

.button-primary {
  background: var(--accent);
  color: #ffffff;
}

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

.button-secondary {
  border-color: var(--line);
  background: var(--card);
  color: var(--text);
}

.button-secondary:hover {
  background: var(--surface);
}

.button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---- Header ------------------------------------------------------------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 4rem;
}

.logo {
  height: 28px;
  width: auto;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.nav-link {
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
}

.nav-link:hover {
  color: var(--text);
}

/* Not enough room for Pricing next to the logo on most phones: it's in the footer and on the home page. */
.nav-pricing {
  display: none;
}

/* ---- Bar on each kind-of-business page: which page this is, and a way back to the list of every kind ------------ */
.tradebar {
  background: var(--accent);
  color: #ffffff;
  font-size: 0.875rem;
}

.tradebar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  min-height: 3rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.tradebar-title {
  font-weight: 700;
}

.tradebar-switch {
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  padding: 0.25rem 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.tradebar-switch::after {
  content: " →";
}

.tradebar-switch:hover {
  background: #f6f5f2;
}

/* ---- Opening section ---------------------------------------------------------------------------------------------- */
.hero {
  padding: 3rem 0 5rem;
}

/* Kind-of-business pages are tinted, so they read as a different page from home. */
.hero-tinted {
  background: var(--accent-soft);
}

.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.hero-tinted .badge {
  background: var(--card);
}

/* The red square: the dot on the i in the logo, a booked day on the calendar. */
.badge::before,
.feature h3::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  background: var(--ribbon);
}

.hero h1 {
  margin-top: 1.25rem;
  font-size: 2.25rem;
  line-height: 1.05;
}

.hero-text {
  max-width: 48rem;
}

.lead {
  margin-top: 1.25rem;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.125rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.small-print {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.875rem;
}

/* What a client sees on a booking page (decoration: hidden from screen readers). */
.preview {
  width: 100%;
  max-width: 24rem;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.preview-step {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.preview-title {
  margin-top: 0.125rem;
  font-size: 1.25rem;
  font-weight: 800;
}

.preview ul {
  display: grid;
  gap: 0.625rem;
  margin-top: 1rem;
  padding: 0;
  list-style: none;
}

.preview li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.875rem;
}

.preview li.selected {
  border-color: var(--ribbon);
  background: var(--accent-soft);
}

.preview small {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.preview-note {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
}

/* ---- Sections ----------------------------------------------------------------------------------------------------- */
.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--surface);
}

.section-intro {
  margin-top: 0.75rem;
  max-width: 42rem;
  color: var(--muted);
}

.card {
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: var(--card);
  box-shadow: var(--shadow);
}

/* Home page features: a red square before each title. */
.features {
  display: grid;
  gap: 2rem 2.5rem;
  margin-top: 2.5rem;
}

.feature h3 {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
}

/* Level with the first line when a title wraps. */
.feature h3::before {
  flex: none;
  margin-top: 0.5rem;
}

.feature p {
  margin-top: 0.375rem;
  color: var(--muted);
  font-size: 0.875rem;
}

/* Lists with a tick in a circle (what you get on each kind-of-business page). */
.ticks-grid {
  display: grid;
  gap: 1.75rem 2.5rem;
  margin-top: 2rem;
  padding: 0;
  list-style: none;
}

.ticks-grid li {
  position: relative;
  padding-left: 2.5rem;
}

.ticks-grid li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 0.875rem;
  font-weight: 800;
}

.ticks-grid p {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.875rem;
}

/* How it works. */
.steps {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
  padding: 0;
  list-style: none;
}

.steps li {
  padding: 1.5rem;
}

.step-label {
  color: var(--accent-text);
  font-size: 0.875rem;
  font-weight: 700;
}

.steps h3 {
  margin-top: 0.5rem;
  font-size: 1.125rem;
}

.steps p {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.875rem;
}

/* Each kind of business, as round buttons. */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-top: 2rem;
  padding: 0;
  list-style: none;
}

.chips a {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.chips a:hover {
  border-color: var(--ribbon);
}

/* ---- Plans -------------------------------------------------------------------------------------------------------- */
.plans {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
}

.plan {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

.plan-pro {
  border: 2px solid var(--ribbon);
}

.plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.plan-head h2,
.plan-head h3 {
  font-size: 1.25rem;
  font-weight: 800;
}

.tag {
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.price {
  margin-top: 0.75rem;
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.price span {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0;
}

.plan-blurb {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.ticks {
  display: grid;
  gap: 0.75rem;
  flex: 1;
  align-content: start;
  margin-top: 1.5rem;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
}

.ticks li {
  position: relative;
  padding-left: 1.75rem;
}

.ticks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent-text);
  font-weight: 800;
}

.plan .button {
  margin-top: 2rem;
}

.note {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.note a,
.cta-link a {
  color: var(--text);
  font-weight: 600;
  text-underline-offset: 4px;
}

/* ---- Questions ---------------------------------------------------------------------------------------------------- */
.faq {
  margin-top: 2rem;
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: var(--card);
}

.faq details {
  padding: 1.25rem;
}

.faq details + details {
  border-top: 1px solid var(--line);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  color: var(--muted);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "−";
}

.faq details p {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.875rem;
}

/* ---- Closing call to action, 404 ---------------------------------------------------------------------------------- */
.cta {
  padding: 5rem 0;
  text-align: center;
}

.cta .mark {
  height: 64px;
  width: auto;
  margin: 0 auto 1.5rem;
}

.cta p {
  margin-top: 0.75rem;
  color: var(--muted);
}

.cta .button {
  margin-top: 2rem;
}

.cta-link {
  font-size: 0.875rem;
}

.cta p.cta-link {
  margin-top: 2rem;
}

/* ---- Footer ------------------------------------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.875rem;
}

.footer-grid {
  display: grid;
  gap: 2.5rem;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.footer-grid .mark {
  height: 40px;
  width: auto;
}

.footer-about p {
  max-width: 20rem;
  margin-top: 0.75rem;
  color: var(--muted);
}

.footer-about address {
  margin-top: 0.75rem;
  font-style: normal;
}

.footer-about address a {
  font-weight: 500;
  text-underline-offset: 4px;
}

.footer-links {
  display: grid;
  gap: 2rem;
}

.footer-links h2 {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0;
}

.footer-links ul {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0;
  list-style: none;
}

.footer-links .two-columns {
  grid-template-columns: 1fr 1fr;
  column-gap: 1rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text);
}

/* ---- Wider screens ------------------------------------------------------------------------------------------------ */
@media (min-width: 440px) {
  .nav-pricing {
    display: inline-block;
  }
}

@media (min-width: 640px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .logo {
    height: 32px;
  }

  .header-nav {
    gap: 0.75rem;
  }

  h2 {
    font-size: 2.25rem;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero-home h1 {
    font-size: 3.75rem;
  }

  .features,
  .ticks-grid {
    grid-template-columns: 1fr 1fr;
  }

  .plan {
    padding: 2rem;
  }

  .faq details {
    padding: 1.5rem;
  }

  .footer-links {
    grid-template-columns: 2fr 1fr;
  }
}

@media (min-width: 768px) {
  .hero {
    padding-top: 5rem;
  }

  .hero-tinted {
    padding-top: 4rem;
  }

  .hero-grid {
    grid-template-columns: 1.15fr 1fr;
  }

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

  .plans {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 2fr;
  }
}

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

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