/* Astrodivergent — the light on the shore. See DESIGN.md. */

:root {
  --paper: #EEF3F1;
  --paper-deep: #E1EAE7;
  --ink: #0E2834;
  --ink-soft: #3F5560;
  --sea: #1F7A78;
  --sea-deep: #155A58;
  --night: #181633;
  --sand: #EAE2D3;
  --sand-soft: #B8B0C4;
  --lamp: #D9A441;
  --lamp-deep: #B8862E;
  --rule: #CFD9D5;

  --display: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;

  --measure: 66ch;
  --col: 44rem;
  --gutter: 24px;
  --section-y: 64px;
}

@media (min-width: 640px) {
  :root { --gutter: 32px; --section-y: 96px; }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.65;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--sea);
}

::selection { background: rgba(217, 164, 65, 0.4); color: var(--ink); }

a {
  color: var(--sea);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 150ms ease-out;
}
a:hover { color: var(--sea-deep); }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--sea);
  outline-offset: 3px;
}

p { margin: 0 0 1.25em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 24px;
  max-width: 24ch;
}

h3 {
  font-size: 1.5rem;
  font-style: italic;
  line-height: 1.3;
  margin: 0 0 8px;
}

.wrap {
  max-width: var(--col);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Top */

.top {
  padding-top: 32px;
}
.wordmark {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.125rem;
  letter-spacing: 0.12em;
  font-variant: small-caps;
  color: var(--ink);
  text-decoration: none;
}
.wordmark:hover { color: var(--sea); }

.bar { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.nav { display: flex; gap: 20px; flex-wrap: wrap; }
.nav a {
  font-size: 0.9375rem;
  color: var(--ink-soft);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.nav a:hover { color: var(--sea); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--lamp); }

.hero.small { padding-top: 56px; padding-bottom: 32px; }
.hero.small h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
@media (min-width: 640px) { .hero.small { padding-top: 80px; } }

/* Hero */

.hero {
  padding-top: 72px;
  padding-bottom: var(--section-y);
}
@media (min-width: 640px) { .hero { padding-top: 112px; } }

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  max-width: 18ch;
}

.hero .lead {
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-top: 24px;
  max-width: 44ch;
}

.lamp-rule {
  width: 64px;
  height: 1px;
  background: var(--lamp);
  margin: 32px 0 40px;
  border: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero .lead {
    transform: translateY(8px);
    animation: settle 600ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
  .hero .lead { animation-delay: 80ms; }
  @keyframes settle {
    to { transform: none; }
  }
}

/* Sections */

.section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}

.hairline {
  border: 0;
  height: 1px;
  background: var(--rule);
  margin: 0;
}

.night {
  background: var(--night);
  color: var(--sand);
}
.night h2 { color: var(--sand); }
.night .soft { color: var(--sand-soft); }
.night a { color: var(--sand); }
.night a:hover { color: var(--lamp); }
.night a:focus-visible, .night button:focus-visible { outline-color: var(--lamp); }
.night ::selection { background: rgba(217, 164, 65, 0.45); color: var(--night); }

.deep { background: var(--paper-deep); }

.steps { margin: 0; padding: 0; list-style: none; }
.steps li { margin-top: 40px; }
.steps li:first-child { margin-top: 0; }

.short {
  font-size: 1.25rem;
  line-height: 1.5;
}

/* Button */

.button {
  display: inline-block;
  background: var(--lamp);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1;
  padding: 14px 28px;
  border: 0;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease-out;
}
.button:hover { background: var(--lamp-deep); color: var(--ink); }
.button + p { margin-top: 24px; }

.cta { margin-top: 40px; }
.aside { margin-top: 20px; font-size: 0.9375rem; color: var(--ink-soft); max-width: 36rem; }

/* Form */

.form { margin-top: 40px; max-width: 32rem; }
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: 0.9375rem;
  color: var(--sand-soft);
  margin-bottom: 6px;
}
.field input, .field textarea {
  width: 100%;
  font: inherit;
  font-size: 1.0625rem;
  color: var(--ink);
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 12px 14px;
}
.field input:focus, .field textarea:focus {
  outline: 2px solid var(--lamp);
  outline-offset: 2px;
  border-color: var(--lamp);
}
.field textarea { min-height: 96px; resize: vertical; }
.field .hint { font-size: 0.9375rem; line-height: 1.5; color: var(--ink-soft); margin: 8px 0 0; max-width: 36rem; }
.night .field .hint { color: var(--sand-soft); }

/* The form on a light surface (the free door on the work page) */
.section:not(.night) .field label { color: var(--ink-soft); }
.section:not(.night) .field input, .section:not(.night) .field textarea { background: #fff; }
.field input::placeholder { color: #7A8B90; }


/* Footer */

.footer {
  background: var(--night);
  color: var(--sand-soft);
  font-size: 0.9375rem;
  padding-top: 32px;
  padding-bottom: 48px;
}
.footer .wrap { border-top: 1px solid rgba(233, 223, 203, 0.18); padding-top: 24px; }

/* Portraits */

.portrait { margin: 0; }
.portrait img { display: block; width: 100%; height: auto; border-radius: 4px; }
.portrait.wide { max-width: 22rem; margin: 0 0 40px; }
.portrait.wide + h2 { margin-top: 0; }
figcaption { font-size: 0.9375rem; color: var(--ink-soft); margin-top: 10px; max-width: var(--measure); }

.two { display: grid; gap: 40px; }
@media (min-width: 760px) {
  .two { grid-template-columns: 1fr 17rem; align-items: start; }
  .two .portrait { padding-top: 8px; }
}
@media (max-width: 759px) {
  .two .portrait { max-width: 22rem; }
}

/* The trademark mark: present, not loud. */
sup.tm { font-size: 0.42em; font-weight: 400; letter-spacing: 0; vertical-align: super; margin-left: 0.15em; color: var(--ink-soft); }
