/* Leash public website. Plain CSS, no build step. Colors and fonts match the app (src/constants/theme.ts). */

@font-face {
  font-family: 'Fredoka';
  src: url('fonts/Fredoka_600SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito Sans';
  src: url('fonts/NunitoSans_600SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito Sans';
  src: url('fonts/NunitoSans_700Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito Sans';
  src: url('fonts/NunitoSans_800ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --sky: #8fd3e8;
  --navy: #16324f;
  --navy-pressed: #0b1e31;
  --green: #1f7a4d;
  --green-dark: #17603c;
  --green-pale: #e3f3ea;
  --link: #2b6f8e;
  --white: #ffffff;
  --tint: #eaf7fb;
  --surface: #f3fafc;
  --pale-sky: #ddf1f8;
  --border: #d5e6ee;
  --line: #e6eef2;
  --text-muted: #3a4d60;
  --label-muted: #4a5d70;
  --amber: #b4610e;
  --amber-pale: #fff1dc;
  --amber-text: #6b3b07;
  --display: 'Fredoka', 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif;
  --body: 'Nunito Sans', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  --radius: 18px;
  --wrap: 1080px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--tint);
  color: var(--navy);
  font-family: var(--body);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.55;
}

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

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  color: var(--navy);
}
h1 {
  font-size: clamp(2.1rem, 6vw, 3.4rem);
}
h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
}
h3,
h2.small {
  font-size: 1.25rem;
}
p {
  margin: 0;
}
a {
  color: var(--link);
  font-weight: 800;
}
a:hover {
  color: var(--navy);
}
strong {
  font-weight: 800;
}

/* anything that can be focused shows it clearly, for people using a keyboard */
:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
  border-radius: 6px;
}
/* on the dark blue parts the ring is white, so it can still be seen */
.foot :focus-visible,
.card.navy :focus-visible {
  outline-color: var(--white);
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

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

/* ------------------------------------------------------------------ top */

.top {
  background: var(--sky);
}
.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
  flex-wrap: wrap;
  padding-top: 10px;
  padding-bottom: 10px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 1.7rem;
  color: var(--navy);
  text-decoration: none;
  min-height: 44px;
}
.brand svg {
  width: 34px;
  height: 34px;
}
.beta {
  font-family: var(--body);
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  background: var(--navy);
  color: var(--white);
  border-radius: 999px;
  padding: 3px 9px;
}
.menu-button {
  display: none;
  font: inherit;
  font-weight: 800;
  color: var(--navy);
  background: var(--white);
  border: 0;
  border-radius: 12px;
  min-height: 44px;
  padding: 0 16px;
  cursor: pointer;
}
.menu {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.menu a {
  color: var(--navy);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 12px;
}
.menu a:hover {
  background: rgba(255, 255, 255, 0.5);
}
.menu a:not(.button)[aria-current='page'] {
  background: var(--white);
}
.menu a.button[aria-current='page'] {
  background: var(--green-dark);
  border-color: var(--green-dark);
}

@media (max-width: 640px) {
  /* the Menu button only shows when the small script is running; without it the links stay open */
  .js .menu-button {
    display: inline-flex;
    align-items: center;
  }
  /* without the small script the links simply stay open, so nothing is ever out of reach */
  .js .menu {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .js .menu.open {
    display: flex;
  }
  .menu a {
    padding: 12px;
  }
}

/* -------------------------------------------------------------- buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 16px;
  background: var(--green);
  color: var(--white);
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
  border: 2px solid var(--green);
}
.button:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: var(--white);
}
.button.outline {
  background: var(--white);
  color: var(--navy);
  border-color: var(--navy);
}
.button.outline:hover {
  background: var(--pale-sky);
  color: var(--navy);
}
.menu a.button {
  min-height: 44px;
  padding: 0 16px;
  font-size: 1rem;
  color: var(--white);
}
.menu a.button:hover {
  background: var(--green-dark);
}
.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ----------------------------------------------------------------- hero */

.hero {
  background: var(--sky);
  padding: 36px 0 56px;
}
.hero .wrap {
  display: grid;
  gap: 18px;
  max-width: 820px;
}
.hero p.lead {
  font-size: 1.2rem;
  color: var(--navy);
  max-width: 40em;
}
.page-head {
  background: var(--sky);
  padding: 28px 0 40px;
}
.page-head .wrap {
  display: grid;
  gap: 10px;
  max-width: 820px;
}

/* ------------------------------------------------------------- sections */

.section {
  padding: 44px 0;
}
.section + .section {
  padding-top: 8px;
}
.section > .wrap {
  display: grid;
  gap: 20px;
}
.section.narrow > .wrap {
  max-width: 820px;
}
.kicker {
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--label-muted);
}
/* on the sky blue top the small label needs the darker color to be readable */
.hero .kicker {
  color: var(--navy);
}
.muted {
  color: var(--text-muted);
}

.cards {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  display: grid;
  gap: 8px;
  align-content: start;
}
.card p {
  color: var(--text-muted);
}
.card.wide {
  padding: 24px;
  gap: 14px;
}
.card.navy {
  background: var(--navy);
}
.card.navy h2,
.card.navy h3,
.card.navy p,
.card.navy a:not(.button) {
  color: var(--white);
}

/* ---------------------------------------------------------------- table */

.table-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 8px 20px;
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  text-align: left;
  padding: 14px 8px 14px 0;
  border-bottom: 1.5px solid var(--line);
  vertical-align: top;
}
tr:last-child td {
  border-bottom: 0;
}
th {
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--label-muted);
}
td.amount,
th.amount {
  text-align: right;
  padding-right: 0;
  font-weight: 800;
}

/* ---------------------------------------------------- questions (help) */

details {
  background: var(--white);
  border-radius: var(--radius);
  padding: 0 20px;
}
details + details {
  margin-top: 10px;
}
summary {
  cursor: pointer;
  font-weight: 800;
  padding: 18px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
summary::-webkit-details-marker {
  display: none;
}
summary::after {
  content: '+';
  font-family: var(--display);
  font-size: 1.4rem;
  line-height: 1;
  color: var(--link);
}
details[open] summary::after {
  content: '\2212';
}
details > div {
  padding: 0 0 18px;
  color: var(--text-muted);
  display: grid;
  gap: 10px;
}

/* -------------------------------------------------------------- notices */

/* a part of a page that is not final yet. The build can refuse to go live while any of these remain. */
.todo {
  border: 2px dashed var(--amber);
  background: var(--amber-pale);
  color: var(--amber-text);
  border-radius: 14px;
  padding: 14px 16px;
  font-weight: 700;
}
.todo::before {
  content: 'Not final: ';
  font-weight: 800;
}
.notice {
  background: var(--amber-pale);
  color: var(--amber-text);
  border-radius: 14px;
  padding: 14px 16px;
  font-weight: 700;
}
.good {
  background: var(--green-pale);
  color: var(--green-dark);
  border-radius: 14px;
  padding: 14px 16px;
  font-weight: 800;
}

/* -------------------------------------------------------- long reading */

.prose {
  display: grid;
  gap: 14px;
}
.prose h2 {
  font-size: 1.45rem;
  margin-top: 14px;
}
.prose h3 {
  font-size: 1.1rem;
  margin-top: 6px;
}
.prose ul,
.prose ol {
  margin: 0;
  padding-left: 1.3em;
  display: grid;
  gap: 6px;
  color: var(--text-muted);
}
.prose p {
  color: var(--text-muted);
}
/* a link standing on its own line gets a taller area to tap */
.prose li > a:only-child,
.prose p > a:only-child,
details p > a:only-child {
  display: inline-block;
  padding: 6px 0;
}

/* ----------------------------------------------------------------- foot */

.foot {
  background: var(--navy);
  color: var(--white);
  padding: 32px 0 40px;
  margin-top: 24px;
}
.foot .wrap {
  display: grid;
  gap: 18px;
}
.foot a {
  color: var(--white);
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
}
/* tall enough to tap comfortably on a phone */
.foot nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.foot small {
  color: #bfd9e6;
  font-size: 0.9rem;
}

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

@media print {
  .top,
  .foot,
  .buttons {
    display: none;
  }
  body {
    background: #fff;
  }
}
