/*
 * thinkingcedar.com layout. Every colour, font, size, radius and space is a
 * token from tokens.css; no literal of any of them belongs here. Mobile first:
 * the base rules are the phone layout, the one media query widens it.
 */

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

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

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

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: var(--weight-body);
  line-height: var(--leading-body);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: var(--weight-heading);
  line-height: var(--leading-heading);
  color: var(--color-primary);
  text-wrap: balance;
}

h1 {
  font-size: var(--text-h1);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--text-h2);
  letter-spacing: -0.01em;
}

p {
  margin: 0;
  text-wrap: pretty;
}

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

a {
  color: var(--color-primary);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: var(--focus-width);
  border-radius: var(--radius-small);
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: calc(-1 * var(--space-8));
  padding: var(--space-2) var(--space-4);
  background: var(--color-surface);
  color: var(--color-primary);
  font-weight: var(--weight-strong);
  border-radius: var(--radius-small);
  z-index: 1;
}

.skip-link:focus {
  top: var(--space-2);
}

/* --- Frame ------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--page-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--space-8);
}

.section--cream {
  background: var(--color-background);
}

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

.section > .wrap > * + * {
  margin-top: var(--space-5);
}

.eyebrow {
  font-size: var(--text-small);
  font-weight: var(--weight-strong);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-text);
}

.lead {
  font-size: var(--text-lead);
  max-width: var(--measure);
}

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

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

.site-header {
  background: var(--color-background);
  border-bottom: var(--border-width) solid var(--color-rule);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-5);
  padding-block: var(--space-4);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-weight: var(--weight-heading);
  font-size: var(--text-h3);
  letter-spacing: -0.01em;
}

.brand img {
  width: var(--logo-size);
  height: var(--logo-size);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  font-size: var(--text-small);
  font-weight: var(--weight-strong);
  text-decoration: none;
  color: var(--color-ink);
}

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

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

.hero {
  padding-block: var(--space-8) var(--space-9);
}

.hero h1 {
  max-width: 16ch;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4) var(--space-6);
  padding-top: var(--space-2);
}

.button {
  display: inline-block;
  padding: var(--space-3) var(--space-5);
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-weight: var(--weight-strong);
  text-decoration: none;
  border-radius: var(--radius-pill);
  transition: background-color 120ms ease;
}

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

.text-link {
  font-weight: var(--weight-strong);
}

/* --- Thinking Doors ---------------------------------------------------- */

.points {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: var(--space-5);
  margin: 0;
  padding: var(--space-3) 0 0;
  list-style: none;
}

.points li {
  position: relative;
  padding: var(--space-5) var(--space-5) var(--space-5) var(--space-7);
  background: var(--color-background);
  border-radius: var(--radius);
}

/* The amber marker: the accent as a shape, never as text. */
.points li::before {
  content: "";
  position: absolute;
  left: var(--space-5);
  top: calc(var(--space-5) + 0.4em);
  width: var(--marker-size);
  height: var(--marker-size);
  border-radius: var(--radius-pill);
  background: var(--color-accent);
}

.points strong {
  display: block;
  margin-bottom: var(--space-1);
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-size: var(--text-h3);
  font-weight: var(--weight-heading);
  line-height: var(--leading-heading);
}

.status {
  margin-top: var(--space-7);
  padding: var(--space-6) var(--space-5);
  background: var(--color-tint);
  border-left: var(--focus-width) solid var(--color-accent);
  border-radius: var(--radius);
}

.status > * + * {
  margin-top: var(--space-4);
}

.status p {
  font-size: var(--text-lead);
  font-weight: var(--weight-strong);
  color: var(--color-ink);
  max-width: var(--measure);
}

/* --- Contact ----------------------------------------------------------- */

.email {
  font-family: var(--font-heading);
  font-size: var(--text-h2);
  font-weight: var(--weight-heading);
  overflow-wrap: anywhere;
}

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

.site-footer {
  background: var(--color-primary);
  color: var(--color-on-primary);
  padding-block: var(--space-7);
  font-size: var(--text-small);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4) var(--space-5);
}

.site-footer img {
  width: var(--logo-size);
  height: var(--logo-size);
}

.site-footer a {
  color: var(--color-on-primary);
}

.site-footer :focus-visible {
  outline-color: var(--color-focus-on-dark);
}

/* --- 404 --------------------------------------------------------------- */

.not-found {
  min-height: 60vh;
}

/* --- Wider screens ----------------------------------------------------- */

@media (min-width: 48rem) {
  .section {
    padding-block: var(--space-9);
  }

  .hero {
    padding-block: var(--space-9);
  }

  .status {
    padding: var(--space-6) var(--space-7);
  }
}
