/* ==========================================================================
   base.css — design tokens, reset, and the bits shared by every page
   ========================================================================== */

:root {
  /* --- palette: soft yellow, soft blue, soft orange, plus a warm neutral.
         each has a muted "-deep" partner used for the offset shadows. --- */
  --sun:   #fffaaf;  --sun-deep:   #ddd083;
  --blue:  #dfe9f2;  --blue-deep:  #a8bccd;
  --amber: #ffe5cd;  --amber-deep: #f8bf8c;
  --sand:  #f4ebdd;  --sand-deep:  #cdbfa9;

  /* --- surfaces & ink --- */
  --cream:    #fffcf6;
  --dot:      #efe6d8;
  --card:     #ffffff;
  --ink:      #3b3630;
  --ink-soft: #6f675c;
  --accent:   #2f6690;

  /* --- shape --- */
  --radius:     22px;
  --radius-sm:  14px;
  --stroke:     2.5px;
  --shadow-col: var(--amber-deep);

  /* --- type: system sans throughout, mono for the wordmark and dates --- */
  --body:    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: var(--body);
  --mono:    ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }

body {
  font-family: var(--body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--cream);
  /* a very soft dotted-paper grid */
  background-image: radial-gradient(var(--dot) 1.6px, transparent 1.6px);
  background-size: 22px 22px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--display); line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }

a { color: inherit; text-decoration: none; }

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

::selection { background: var(--amber-deep); color: var(--ink); }

:focus-visible {
  outline: 3px dashed var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: 68rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* --------------------------------------------------------------------------
   The house style: a chunky outlined box that sits a little crooked.
   Set --tilt (and optionally --shadow-col) per element.
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  background: var(--card);
  border: var(--stroke) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 5px 6px 0 var(--shadow-col);
  padding: 1.75rem;
  transform: rotate(var(--tilt, 0deg));
  transition: transform .3s cubic-bezier(.2, .9, .3, 1.3), box-shadow .3s ease;
}

.card:hover,
.card:focus-within {
  transform: rotate(0deg) translate(-2px, -4px);
  box-shadow: 8px 10px 0 var(--shadow-col);
}

/* little pastel pill, used for tags and eyebrows */
.pill {
  display: inline-block;
  font-size: .85rem;
  font-weight: 500;
  padding: .2rem .8rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--sun);
  white-space: nowrap;
}

/* highlighter swipe behind inline text */
.hl {
  background-image: linear-gradient(transparent 58%, var(--hl-col, var(--sun-deep)) 58%);
  padding: 0 .15em;
  border-radius: 3px;
}
.hl-sun   { --hl-col: var(--sun-deep); }
.hl-blue  { --hl-col: var(--blue-deep); }
.hl-amber { --hl-col: var(--amber-deep); }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--cream);
  border-bottom: var(--stroke) solid var(--ink);
}

/* candy stripe under the header */
.site-header::after {
  content: "";
  display: block;
  height: 7px;
  background: repeating-linear-gradient(
    45deg,
    var(--blue) 0 10px,
    var(--sand) 10px 20px
  );
  border-top: var(--stroke) solid var(--ink);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-block: .85rem;
}

.logo {
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  font-size: 1rem;
  background: var(--blue);
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 2px 2px 0 var(--blue-deep);
  transition: transform .3s cubic-bezier(.2, .9, .3, 1.4);
}

.logo:hover .logo-mark { transform: rotate(20deg) scale(1.1); }

.nav {
  display: flex;
  align-items: center;
  gap: .35rem;
  flex-wrap: wrap;
  font-size: .95rem;
}

.nav a {
  padding: .3rem .7rem;
  border-radius: 999px;
  border: 2px solid transparent;
  transition: background .2s, border-color .2s, transform .2s;
}

.nav a:hover {
  background: var(--blue);
  border-color: var(--ink);
  transform: rotate(-2deg);
}

.nav .nav-cta {
  background: var(--blue);
  border-color: var(--ink);
  box-shadow: 2px 3px 0 var(--blue-deep);
}

.nav .nav-cta:hover { background: var(--sun); box-shadow: 3px 4px 0 var(--sun-deep); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 2px solid var(--sand-deep);
  margin-top: 4rem;
  padding-block: 2rem 2.5rem;
  text-align: center;
}

.site-footer p {
  font-size: .95rem;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   Motion preferences
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
