/*
  BusyCal Bookings: the marketing page at the site root (templates/landing.html).

  The page stands alone and shares no styles with the booking pages. It uses system fonts, has
  no scripts and loads nothing from other sites. The Content Security Policy allows only this
  site's stylesheets and images, so every style lives here and the illustration is an SVG file
  drawn to suit both appearances. Colors follow the visitor's light or dark setting.

  Breakpoints: the hero becomes one column below 880 px, the three points stack below 760 px,
  phones below 480 px get narrower gutters and stacked buttons, and the header tightens below
  380 px.
*/

/* ---------- Tokens ---------- */

/*
  Text colors keep WCAG AA contrast on the page background in both appearances: body text is
  7.8:1 in light and 9.9:1 in dark, and the quietest text is 5.7:1 and 7.2:1. The button takes
  BusyCal blue's deeper step from style.css, so its white label is 5.6:1 in light and 5.4:1 in
  dark. The amber, blue and coral tones repeat the illustration's colors.
*/
:root {
  color-scheme: light dark;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI",
    system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --page: 1160px;
  --gutter: 24px;

  --bg: #f8f7f4;
  --hover: #eeece6;
  --line: #e3e1da;
  --ink: #131829;
  --text: #1d2233;
  --text-2: #474d61;
  --text-3: #5b6174;
  --accent-fill: #2b66bf;
  --accent-fill-hover: #1754ab;
  --accent-ink: #1e5ab1;
  --focus: #1e5ab1;
  --badge-bg: #fcefd2;
  --badge-ink: #7f5200;
  --button-shadow: 0 1px 2px rgb(16 24 40 / 0.08), 0 10px 24px -10px rgb(43 102 191 / 0.55);

  --amber-soft: #fcefd2;
  --amber-ink: #8f5c00;
  --blue-soft: #e5edfb;
  --blue-ink: #2b66bf;
  --coral-soft: #fce5de;
  --coral-ink: #b2462d;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101219;
    --hover: #1c1f29;
    --line: #262a36;
    --ink: #f4f5f8;
    --text: #e6e8ee;
    --text-2: #b7bdca;
    --text-3: #9ba1af;
    --accent-fill: #2e69c2;
    --accent-fill-hover: #1b57ae;
    --accent-ink: #85bfff;
    --focus: #85bfff;
    --badge-bg: #2d2513;
    --badge-ink: #f2c46b;
    --button-shadow: 0 10px 24px -12px rgb(0 0 0 / 0.7);

    --amber-soft: #2e2615;
    --amber-ink: #f2c46b;
    --blue-soft: #1b2638;
    --blue-ink: #85bfff;
    --coral-soft: #33201c;
    --coral-ink: #ff9d86;
  }
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.5 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1;
}

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

a {
  color: var(--accent-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

/* Inline icons from icons.html draw with the text color. */
.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: absolute;
  z-index: 10;
  left: 12px;
  top: -200px;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 0 0 1px var(--line), 0 12px 32px -12px rgb(16 24 40 / 0.3);
}

.skip-link:focus {
  top: 12px;
}

/* The header, hero, points and footer share one centered column. */
.masthead,
.hero,
.highlights,
.site-footer {
  width: 100%;
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Header ---------- */

/* At very large text sizes Sign In wraps below the name instead of covering it. */
.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-block: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-mark {
  width: 32px;
  height: 32px;
}

.badge {
  padding: 1px 9px;
  border-radius: 999px;
  background: var(--badge-bg);
  color: var(--badge-ink);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

/* A quiet way in for hosts who already use Bookings. */
.sign-in {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.sign-in:hover {
  background: var(--hover);
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 32px clamp(32px, 5vw, 72px);
  padding-block: clamp(16px, 4vw, 48px) clamp(40px, 6vw, 72px);
}

.hero h1 {
  margin: 0 0 20px;
  color: var(--ink);
  font-size: clamp(2.375rem, 1.5rem + 3.2vw, 3.75rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.lead {
  max-width: 34em;
  margin: 0 0 32px;
  color: var(--text-2);
  font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);
  line-height: 1.55;
  text-wrap: pretty;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 8px;
  margin: 0 0 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
}

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

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

.button-quiet {
  padding: 0 16px;
  color: var(--accent-ink);
}

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

.button-quiet .icon {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.note {
  max-width: 34em;
  margin: 0;
  color: var(--text-3);
  font-size: 0.9375rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.hero-art img {
  display: block;
  width: 100%;
  max-width: 640px;
  margin-inline: auto;
}

/* ---------- Three points ---------- */

.highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-block: 0;
  list-style: none;
}

/* Each point draws its own top rule, so the rules join into one line inside the gutters. */
.highlight {
  padding: 28px 32px 4px;
  border-top: 1px solid var(--line);
}

.highlight:first-child {
  padding-left: 0;
}

.highlight:last-child {
  padding-right: 0;
}

.highlight + .highlight {
  border-left: 1px solid var(--line);
}

.highlight--amber {
  --chip-bg: var(--amber-soft);
  --chip-ink: var(--amber-ink);
}

.highlight--blue {
  --chip-bg: var(--blue-soft);
  --chip-ink: var(--blue-ink);
}

.highlight--coral {
  --chip-bg: var(--coral-soft);
  --chip-ink: var(--coral-ink);
}

.highlight-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: var(--chip-bg);
  color: var(--chip-ink);
}

.highlight-icon .icon {
  width: 22px;
  height: 22px;
}

.highlight h2 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.highlight p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.9375rem;
  line-height: 1.55;
}

/* ---------- Footer ---------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 24px;
  padding-block: 48px 40px;
  font-size: 0.875rem;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--text-3);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* ---------- Narrower windows ---------- */

@media (max-width: 879px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-copy {
    max-width: 640px;
  }

  .hero-art img {
    max-width: 560px;
  }
}

/* The points stack, each with its icon beside the title and text. */
@media (max-width: 759px) {
  .highlights {
    grid-template-columns: minmax(0, 1fr);
  }

  .highlight,
  .highlight:first-child,
  .highlight:last-child {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 16px;
    padding: 20px 0;
  }

  .highlight + .highlight {
    border-left: 0;
  }

  .highlight-icon {
    grid-row: span 2;
    margin: 0;
  }
}

/* Phones: the button takes the full width with Learn More centered below it. */
@media (max-width: 479px) {
  :root {
    --gutter: 16px;
  }

  .masthead {
    padding-block: 14px;
  }

  .brand {
    gap: 8px;
    font-size: 1rem;
  }

  .brand-mark {
    width: 28px;
    height: 28px;
  }

  .sign-in {
    min-height: 36px;
    padding: 0 14px;
  }

  .hero {
    padding-bottom: 16px;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
}

/* The narrowest phones drop the Sign In outline so the name, badge and link share one row. */
@media (max-width: 379px) {
  .masthead {
    column-gap: 8px;
  }

  .brand {
    gap: 6px;
    font-size: 0.9375rem;
  }

  .brand-mark {
    width: 26px;
    height: 26px;
  }

  .sign-in {
    padding: 0 8px;
    border-color: transparent;
  }
}

/* ---------- Motion and system settings ---------- */

/* Color changes on hover fade in only for visitors who allow motion. */
@media (prefers-reduced-motion: no-preference) {
  .button,
  .sign-in,
  .site-footer a {
    transition: background-color 0.15s ease, color 0.15s ease;
  }
}

/* High-contrast modes drop backgrounds, so pills and chips keep an outline. */
@media (forced-colors: active) {
  .button,
  .sign-in,
  .badge,
  .highlight-icon {
    border: 1px solid;
  }
}
