/* The foundations: colours, fonts, spacing, text and buttons.
   The colours are the same ones the app uses (web/src/styles/theme.css),
   so the website and the app feel like one product. Change a colour here and every page follows. */

:root {
  /* text */
  --ink: #1b1a33;
  --ink-soft: #2d2b4a;
  --muted: #66607f;

  /* the page: soft lilac at the top, warm peach at the bottom, like the app */
  --cream: #f7f1fb;
  --page: linear-gradient(180deg, #f7f1fb 0%, #ede4f7 45%, #fbede6 100%);

  /* cards */
  --white: #ffffff;
  --glass: rgba(255, 255, 255, 0.82);
  --line: #e8dfee;

  /* the main action colour: warm coral, always with dark ink text so it's easy to read */
  --accent: #ff7a59;
  --accent-2: #f59e42;
  --accent-text: #a7391e;

  /* softer colours for small labels and backgrounds */
  --lilac-soft: #ede4f7;
  --coral-soft: #ffe4dc;
  --mint: #4eba88;
  --mint-soft: #eaf7f1;
  --mint-text: #1f6b48;
  --sun-soft: #fef3dc;
  --sky: #735bf2;

  --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-display: "Newsreader", Georgia, serif;

  --shadow: 0 8px 30px rgba(100, 70, 140, 0.06), 0 2px 6px rgba(100, 70, 140, 0.03);
  --shadow-accent: 0 8px 20px rgba(255, 122, 89, 0.28), 0 2px 4px rgba(255, 122, 89, 0.12);
  --radius-card: 28px;
  --radius-small: 16px;

  /* spacing, small to big */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;

  --page-width: 1120px;

  color-scheme: light;
}

/* every browser starts from the same place */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* the page colour shows behind the gradient while it loads */
  background: var(--cream);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}

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

/* headings use the calm serif, the same as the app */
h1,
h2 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.12;
  margin: 0 0 var(--space-2);
}

h1 {
  font-size: clamp(2.5rem, 7vw, 4.25rem);
}

h2 {
  font-size: clamp(2rem, 4.5vw, 2.9rem);
}

h3 {
  font-size: 1.15rem;
  line-height: 1.3;
  margin: 0 0 var(--space-1);
}

/* the soft italic word inside some headings, like "fits" */
h1 em,
h2 em {
  font-style: italic;
  color: var(--accent-text);
}

p {
  margin: 0 0 var(--space-2);
}

a {
  color: var(--ink);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-text);
}

/* a clear ring for people using a keyboard, so they never get lost */
:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
  border-radius: 6px;
}

/* small grey text, like notes under a picture */
.muted {
  color: var(--muted);
}

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

/* text only screen readers hear */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* buttons: round ends, like the app */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: scale(0.98);
}

/* coral: the main action on a page, with dark text so it reads clearly */
.button-main {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: var(--ink);
  box-shadow: var(--shadow-accent);
}

.button-main:hover {
  color: var(--ink);
  filter: brightness(1.04);
}

/* frosted lilac: the second choice */
.button-soft {
  background: var(--lilac-soft);
  border-color: var(--line);
  color: var(--ink);
}

.button-soft:hover {
  color: var(--ink);
  background: #e4d8f2;
}

/* deep ink: strong, used on light coloured bands */
.button-dark {
  background: var(--ink);
  color: var(--white);
}

.button-dark:hover {
  color: var(--white);
  background: var(--ink-soft);
}

.button-small {
  min-height: 42px;
  padding: 0 18px;
  font-size: 0.95rem;
}

/* for people who turn off movement in their phone settings */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button {
    transition: none;
  }

  .button:hover,
  .button:active {
    transform: none;
  }
}
