/* Wellsham. Mobile first. No gradients, no italics. */

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --teal: #0f4750;
  --yellow: #ffcf3a;
  --cream: #f6efe0;
  --sand: #ece2cc;
  --ink: #17171c;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 20px;
  --max: 1120px;
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 450;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ol, dl, dd { margin: 0; }
ol { padding: 0; list-style: none; }

a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
a:hover { text-decoration-color: var(--yellow); }

:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 2px; }
.hero :focus-visible { outline-color: var(--cream); }
.section--teal :focus-visible, .footer :focus-visible { outline-color: var(--yellow); }
.form :focus-visible { outline-color: var(--ink); }

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

.skip {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 10;
  background: var(--yellow); color: var(--ink); padding: 0.6rem 1rem; font-weight: 600;
}
.skip:focus { top: var(--gutter); }

/* Shared headline face: heavy, upright Fraunces */
.hero__title, .section__title, .name__title, .hello__title, .make h3, .step h3, .person h3 {
  font-family: var(--serif); font-weight: 800; font-variation-settings: "opsz" 72;
  letter-spacing: -0.03em;
}

/* ---------- Signs ---------- */

.sign { display: block; width: 168px; height: auto; }
.sign__small { font-family: var(--sans); font-size: 19px; font-weight: 600; fill: var(--ink); letter-spacing: 0.02em; }
.sign__name { font-family: var(--serif); font-size: 40px; font-weight: 800; fill: var(--ink); }
.sign__plate { font-family: var(--sans); font-size: 19px; font-weight: 700; fill: var(--ink); }
.sign__plate--sm { font-size: 16px; }
.sign--leaving { width: 190px; }
.sign--arrive { width: 210px; transform: rotate(3deg); transform-origin: 50% 100%; justify-self: end; margin-right: 10px; }

/* ---------- Hero: follows the clock ---------- */

.hero {
  --h-bg: #0f4750; --h-orb: #ffcf3a; --h-accent: #ffcf3a;
  background: var(--h-bg); color: var(--cream);
  transition: background-color 700ms ease;
}
.hero[data-hour="early"]   { --h-bg: #33405a; --h-orb: #ffb38a; --h-accent: #ffb38a; }
.hero[data-hour="morning"] { --h-bg: #4a2c1d; }
.hero[data-hour="evening"] { --h-bg: #a03c27; }
.hero[data-hour="late"]    { --h-bg: #11131f; --h-orb: #f6efe0; }

.hero__inner {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  padding-top: 2.5rem; padding-bottom: 4.5rem;
}
/* On phones the headline comes first and the scene sits under the hour buttons. */
.hero__sign { order: 2; margin-top: 2.5rem; }

.hero__eyebrow { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 1.5rem; opacity: 0.85; }
.hero__title { font-size: clamp(2.6rem, 11.6vw, 5.5rem); line-height: 1; }
.hero__title span { display: block; }
.hero__title .hero__sham { display: inline; color: var(--h-accent); transition: color 700ms ease; }
.hero__title .hero__hour {
  text-decoration: underline; text-decoration-color: var(--h-accent);
  text-decoration-thickness: 0.08em; text-underline-offset: 0.12em;
}
.hero__lede { max-width: 34rem; margin-top: 2rem; font-size: 1.1875rem; line-height: 1.5; }

.button {
  display: inline-block; margin-top: 2.25rem;
  background: var(--teal); color: var(--cream);
  font-family: var(--sans); font-weight: 700; font-size: 1.125rem; line-height: 1;
  padding: 1.05rem 1.6rem; border: 0; border-radius: 6px;
  text-decoration: none; cursor: pointer;
  transition: transform 120ms ease;
}
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0); }
.button span { display: inline-block; margin-left: 0.3em; transition: transform 150ms ease; }
.button:hover span { transform: translateX(4px); }
.hero .button { background: var(--h-accent); color: var(--ink); transition: background-color 700ms ease, transform 120ms ease; }
.button--dark { background: var(--ink); color: var(--cream); margin-top: 0.25rem; }

.picker { display: none; }
.js .picker { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 2.25rem; }
.picker__label { font-size: 0.9375rem; margin-right: 0.25rem; opacity: 0.85; }
.picker button {
  font: inherit; font-size: 0.9375rem; font-weight: 600; line-height: 1;
  color: var(--cream); background: transparent;
  border: 2px solid rgba(246, 239, 224, 0.4); border-radius: 999px;
  padding: 0.5rem 0.85rem; cursor: pointer;
}
.picker button:hover { border-color: var(--cream); }
.picker button[aria-pressed="true"] { background: var(--h-accent); border-color: var(--h-accent); color: var(--ink); }

/* The scene around the welcome sign */
.scene { display: block; width: 250px; height: auto; overflow: visible; }
.scene__orb { transition: transform 900ms cubic-bezier(.3,1.2,.4,1); }
.orb { fill: var(--h-orb); transition: fill 700ms ease; }
.orb-bite { fill: var(--h-bg); opacity: 0; transition: opacity 500ms ease, fill 700ms ease; }
.scene__stars circle { fill: var(--cream); opacity: 0; transition: opacity 600ms ease; }
.scene__item {
  opacity: 0; transform: translateY(26px) scale(0.92);
  transform-box: fill-box; transform-origin: 50% 100%;
  transition: opacity 350ms ease, transform 600ms cubic-bezier(.2,1.5,.4,1);
}
.steam { fill: none; stroke: var(--cream); stroke-width: 5; stroke-linecap: round; opacity: 0.75; }

.hero[data-hour="early"]   .scene__orb { transform: translate(-226px, 150px); }
.hero[data-hour="morning"] .scene__orb { transform: translate(-232px, -34px); }
.hero[data-hour="arvo"]    .scene__orb { transform: translate(34px, -40px); }
.hero[data-hour="evening"] .scene__orb { transform: translate(36px, 150px); }
.hero[data-hour="late"]    .scene__orb { transform: translate(8px, -14px); }
.hero[data-hour="late"] .orb-bite { opacity: 1; }
.hero[data-hour="late"] .scene__stars circle { opacity: 0.9; }
.hero[data-hour="evening"] .scene__stars circle:nth-child(3n) { opacity: 0.7; }
.hero[data-hour="morning"] .scene__item--coffee,
.hero[data-hour="arvo"] .scene__item--roll { opacity: 1; transform: none; }

@keyframes steam { 0% { opacity: 0; transform: translateY(8px); } 40% { opacity: 0.8; } 100% { opacity: 0; transform: translateY(-14px); } }
@keyframes twinkle { 0%, 100% { opacity: 0.9; } 50% { opacity: 0.25; } }

/* ---------- Sections ---------- */

.section { padding: 5.5rem 0; }
.section--sand { background: var(--sand); }
.section--teal { background: var(--teal); color: var(--cream); }

/* Fingerpost marker: a label with a point, like a finger on a signpost. */
.post {
  display: inline-block;
  background: var(--teal); color: var(--cream);
  font-weight: 700; font-size: 0.8125rem;
  letter-spacing: 0.09em; text-transform: uppercase; line-height: 1;
  padding: 0.6rem 1.6rem 0.6rem 0.8rem;
  clip-path: polygon(0 0, calc(100% - 0.9rem) 0, 100% 50%, calc(100% - 0.9rem) 100%, 0 100%);
  margin-bottom: 1.75rem;
}
.post--light { background: var(--cream); color: var(--teal); }
.section--hello .post { background: var(--ink); }

.section__title { font-size: clamp(2.25rem, 8vw, 4.5rem); line-height: 1; max-width: 16ch; text-wrap: balance; }
.section__title--wide { max-width: 20ch; }

.nudge { margin-top: 3.25rem; font-size: 1.1875rem; font-weight: 600; line-height: 1.5; }
.nudge a { font-weight: 700; text-decoration-color: var(--teal); text-decoration-thickness: 3px; white-space: nowrap; }

/* Placeholders: clearly labelled, never dressed up as real */
.placeholder { margin-top: 3rem; padding: 1.75rem; border: 2px dashed var(--ink); border-radius: 6px; }
.placeholder p { margin-top: 0.6rem; max-width: 34rem; }
.placeholder strong { display: block; margin-bottom: 0.3rem; font-family: var(--serif); font-weight: 700; font-size: 1.375rem; }
.placeholder__tag {
  display: inline-block; background: var(--ink); color: var(--cream);
  font-size: 0.6875rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; line-height: 1;
  padding: 0.35rem 0.5rem; border-radius: 3px; vertical-align: middle;
}
.placeholder__tag--dark { margin-right: 0.3rem; }

/* ---------- 01 What we make ---------- */

.makes { margin-top: 3.25rem; border-top: 2px solid var(--ink); }
.make { padding: 1.9rem 0; border-bottom: 2px solid var(--ink); }
.make h3 { font-size: clamp(2.5rem, 11vw, 5.5rem); line-height: 1; color: var(--teal); }
.make p { margin-top: 0.75rem; font-size: 1.1875rem; max-width: 30rem; }

/* ---------- 02 How it goes: steps as distance markers ---------- */

.steps { position: relative; margin-top: 3.25rem; display: grid; gap: 3rem; }
.step__marker {
  display: inline-block; background: var(--ink); color: var(--cream);
  font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1;
  padding: 0.55rem 0.75rem; border-radius: 4px;
}
.step:last-child .step__marker { background: var(--yellow); color: var(--ink); }
.step h3 { margin-top: 1.25rem; font-size: 2.125rem; line-height: 1.05; }
.step p { margin-top: 0.75rem; max-width: 24rem; }
.step .step__sub { margin-top: 0.4rem; font-weight: 600; }

/* ---------- 03 Who's here ---------- */

.people { margin-top: 3.25rem; display: grid; gap: 4rem; }
/* Photos get a teal-and-cream duotone so both portraits match each other and the site. */
.photo {
  position: relative; overflow: hidden;
  aspect-ratio: 1 / 1; width: 100%; max-width: 24rem;
  background: var(--teal); border-radius: 6px;
}
.photo img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.08); mix-blend-mode: screen;
}
/* Mark's source photo has rotated corners; zoom past them. */
.photo--zoom img { transform: scale(1.14); }
.photo::after { content: ""; position: absolute; inset: 0; background: var(--cream); mix-blend-mode: multiply; pointer-events: none; }
.person h3 { margin-top: 1.75rem; font-size: 2.75rem; line-height: 1; color: var(--teal); }
.person p { margin-top: 1rem; max-width: 30rem; }
.person .person__role { margin-top: 0.5rem; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }
.person .inline-placeholder { margin-top: 1.25rem; font-size: 0.9375rem; }
.handle { font-weight: 700; white-space: nowrap; }

/* ---------- 04 The name ---------- */

.name__title { font-size: clamp(2.2rem, 7.6vw, 4.4rem); line-height: 1.02; text-wrap: balance; }
.layers { margin-top: 3rem; display: grid; gap: 2.25rem; }
.layer { border-top: 2px solid var(--yellow); padding-top: 1.25rem; }
.layer p { font-size: 1.1875rem; line-height: 1.45; max-width: 24rem; }
.layer .layer__label { margin-bottom: 0.7rem; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; line-height: 1.55; color: var(--yellow); max-width: none; }
.arrive { margin-top: 3.5rem; display: grid; gap: 3rem; }
.arrive__line {
  font-family: var(--serif); font-weight: 500; font-variation-settings: "opsz" 36;
  font-size: clamp(1.4rem, 4.4vw, 2.1rem); line-height: 1.22; letter-spacing: -0.01em; max-width: 24em;
}

/* ---------- 05 Say hello ---------- */

.hello { display: grid; gap: 3.5rem; }
.hello__title { font-size: clamp(2.8rem, 12vw, 5.25rem); line-height: 1; text-wrap: balance; }
.hello__lede { margin-top: 1.75rem; font-size: 1.1875rem; max-width: 26rem; }

.contact { margin-top: 2.5rem; display: grid; gap: 1.25rem; }
.contact dt { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }
.contact dd { margin-top: 0.3rem; font-size: 1.125rem; font-weight: 500; }
.contact a { font-weight: 700; }

.form { display: grid; gap: 1.5rem; align-content: start; background: var(--yellow); padding: 1.75rem; border-radius: 10px; }
.field label { display: block; font-weight: 700; margin-bottom: 0.5rem; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--cream); border: 2px solid var(--ink); border-radius: 6px;
  padding: 0.85rem 0.9rem;
}
.field textarea { resize: vertical; min-height: 8rem; }
.field input::placeholder, .field textarea::placeholder { color: #6f6470; opacity: 1; }
.field--trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .button { justify-self: start; }
.form__note { font-size: 0.875rem; }
.form__status { font-weight: 600; }
.form__status:empty { display: none; }
.form__status a { font-weight: 700; }

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

.footer { background: var(--ink); color: var(--cream); padding: 5rem 0 3.5rem; }
.footer__inner { display: flex; flex-direction: column; align-items: flex-start; gap: 1.75rem; }
.footer__line { max-width: 30rem; }
.footer__line a { font-weight: 700; text-decoration-color: var(--yellow); }
.footer__small { font-size: 0.875rem; opacity: 0.75; }

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0; transform: translateY(14px);
    transition: opacity 500ms ease, transform 500ms ease;
  }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .sign--arrive[data-reveal] { transform: translateY(14px) rotate(3deg); }
  .js .sign--arrive[data-reveal].is-in { transform: rotate(3deg); }

  .steam { animation: steam 3.2s ease-in-out infinite; }
  .steam--2 { animation-delay: 0.7s; }
  .steam--3 { animation-delay: 1.4s; }
  .hero[data-hour="late"] .scene__stars circle { animation: twinkle 3.5s ease-in-out infinite; }
  .hero[data-hour="late"] .scene__stars circle:nth-child(2n) { animation-delay: 1.2s; }
  .hero[data-hour="late"] .scene__stars circle:nth-child(3n) { animation-delay: 2.1s; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .button span, .hero, .hero .button, .hero__title .hero__sham,
  .orb, .orb-bite, .scene__orb, .scene__item, .scene__stars circle { transition: none; }
}

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

@media (min-width: 720px) {
  :root { --gutter: 40px; }
  body { font-size: 1.125rem; }
  .section { padding: 8.5rem 0; }
  .post { margin-bottom: 2rem; }
  .sign { width: 210px; }
  .sign--leaving { width: 230px; }
  .sign--arrive { width: 280px; margin-right: 0; }
  .scene { width: 300px; }
  .hero__lede { font-size: 1.375rem; }
  .nudge { margin-top: 4rem; }
  .placeholder { margin-top: 3.5rem; padding: 2.25rem; }

  .makes, .steps, .people { margin-top: 4rem; }
  .make { display: grid; grid-template-columns: 1.1fr 1fr; align-items: start; gap: 2rem; padding: 2.5rem 0; }
  .make__body { padding-top: 0.9rem; }
  .make p { margin-top: 0; font-size: 1.3125rem; }

  .steps { grid-template-columns: repeat(3, 1fr); }
  .steps::before { content: ""; position: absolute; left: 0; right: 0; top: 1rem; border-top: 3px dashed var(--ink); opacity: 0.35; }
  .step__marker { position: relative; }

  .people { grid-template-columns: 1fr 1fr; }

  .layers { grid-template-columns: repeat(3, 1fr); gap: 3rem; margin-top: 4rem; }
  .arrive { grid-template-columns: 1fr auto; align-items: end; gap: 4rem; margin-top: 5rem; }

  .hello { grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start; }
  .form { padding: 2.5rem; }
  .footer { padding: 6rem 0 4rem; }
}

@media (min-width: 1040px) {
  .hero__inner { flex-direction: row-reverse; align-items: center; justify-content: space-between; gap: 2.5rem; padding-top: 2.5rem; padding-bottom: 2.5rem; }
  .hero__sign { order: 0; margin-top: 0; }
  .scene { width: 360px; }
}
