/* danhewison.com
   Every page opens with a full-screen drawing. Colour comes from the drawings:
   warm paper, dark ink, and a dusk palette for the Dining page.
   Type: Libre Caslon for headings and text, Alegreya Sans for menus, buttons and small text. */

:root {
  color-scheme: light;

  --paper: #F7E6D4;        /* matches the paper in the drawings */
  --paper-deep: #F1DCC6;
  --ink: #26302A;
  --ink-soft: #4B5249;
  --accent: #8A4F2D;
  --dusk: #212D29;         /* matches the dark paper in the Dining drawing */
  --dusk-deep: #19231F;
  --night: #131A17;
  --ivory: #F3EADB;
  --ivory-soft: #D2C9B8;
  --amber: #E3A857;

  --display: 'Libre Caslon Display', 'Libre Caslon Text', Georgia, 'Times New Roman', serif;
  --text: 'Libre Caslon Text', Georgia, 'Times New Roman', serif;
  --sans: 'Alegreya Sans', 'Gill Sans', 'Trebuchet MS', sans-serif;

  --gutter: clamp(20px, 5vw, 72px);
  --line: rgb(38 48 42 / .22);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 18px;
  line-height: 1.7;
}

/* The Dining page is dark from top to bottom. */
body.page--dusk { background: var(--dusk); color: var(--ivory); --line: rgb(243 234 219 / .22); }

h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 400; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; transition: opacity .15s ease; }
a:hover { opacity: .72; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
img { max-width: 100%; }

.wrap { max-width: calc(1368px + 2 * var(--gutter)); margin: 0 auto; padding-inline: var(--gutter); }
.measure { max-width: 34em; }
.soft { color: var(--ink-soft); }
.page--dusk .soft { color: var(--ivory-soft); }

/* Header */

.site-header { position: relative; z-index: 3; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 32px; padding-block: 24px; }
.wordmark { padding: 5px 0; font-family: var(--display); font-size: 30px; line-height: 1.2; text-decoration: none; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 32px; font-family: var(--sans); font-size: 19px; line-height: 1.3; }
.site-nav a { padding: 11px 0; text-decoration: none; }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -1px 0 currentColor; }
.site-nav .nav-cta { padding: 9px 18px; border: 1px solid currentColor; border-radius: 3px; font-weight: 500; }

/* Buttons and links */

.btn { display: inline-block; padding: 16px 30px; border-radius: 3px; background: var(--ink); color: var(--paper); font-family: var(--sans); font-size: 19px; line-height: 1.3; font-weight: 500; text-decoration: none; }
.page--dusk .btn { background: var(--amber); color: #1B1F1A; }
.text-link { display: inline-block; padding: 11px 0; font-family: var(--sans); font-size: 19px; line-height: 1.3; font-weight: 500; text-decoration: underline; text-underline-offset: 5px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }

/* The opening drawing on each page.
   On a phone the drawing sits above the words. On a wider screen it fills the
   first screen, with the words on the lighter left side. */

.hero { --g: 247 230 212; position: relative; overflow: hidden; background: rgb(var(--g)); }
.hero--dusk { --g: 33 45 41; }
.hero__art { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: 82% center; }
.hero__inner { position: relative; z-index: 2; padding-block: 36px 64px; }
.hero__text { max-width: 640px; display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.hero__title { font-size: clamp(42px, 5.8vw, 88px); line-height: 1.02; letter-spacing: -0.012em; }
.hero__sub { max-width: 19em; font-size: clamp(19px, 1.55vw, 23px); line-height: 1.5; }
.hero__text .btn { margin-top: 8px; }
.hero .deflist { max-width: 480px; margin-top: 8px; }

@media (min-width: 821px) {
  .has-hero .site-header { position: absolute; top: 0; left: 0; right: 0; }
  .hero { display: flex; align-items: center; min-height: clamp(620px, 100svh, 1000px); }
  .hero__art { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; object-position: right center; }
  .hero::after {
    content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background:
      linear-gradient(to bottom, rgb(var(--g) / .94) 0, rgb(var(--g) / .7) 90px, rgb(var(--g) / 0) 190px),
      linear-gradient(to top, rgb(var(--g)) 0, rgb(var(--g) / 0) 120px),
      linear-gradient(to right, rgb(var(--g)) 0%, rgb(var(--g) / .96) 36%, rgb(var(--g) / 0) 66%);
  }
  .hero__inner { width: 100%; padding-block: 150px 96px; }
  .hero__text { max-width: min(640px, 44vw); }
}

/* Bands */

.band { padding-block: clamp(64px, 8vw, 112px); }
.band--deep { background: var(--paper-deep); }
.page--dusk .band--deep { background: var(--dusk-deep); }
.band--tight-top { padding-top: 0; }
.stack { display: flex; flex-direction: column; gap: 40px; }

.h-section { font-size: clamp(32px, 3.4vw, 46px); line-height: 1.1; }
.h-item { font-size: clamp(27px, 2.6vw, 32px); line-height: 1.15; }
.lead { max-width: 30em; font-size: clamp(22px, 2.1vw, 28px); line-height: 1.5; }

/* Photos. A slot shows nothing until a photo is added. */

.photo { margin: 0; overflow: hidden; }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo--tall { aspect-ratio: 4 / 5; }
.photo--wide { aspect-ratio: 5 / 2; }

/* Home: introduction and the three places */

.intro .wrap { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 48px 96px; }
.intro .lead { flex: 1.2 1 420px; min-width: 0; max-width: none; }
.places { flex: 1 1 340px; min-width: 0; list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.places li { padding: 20px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.places strong { font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1.25; }
.places span { font-family: var(--sans); line-height: 1.45; color: var(--ink-soft); }

/* Home: the two doorways, each over its own drawing */

.doors { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); }
.door { --g: 247 230 212; position: relative; overflow: hidden; min-height: clamp(440px, 42vw, 620px); display: flex; align-items: flex-end; color: var(--ink); }
.door--dining { --g: 33 45 41; color: var(--ivory); }
.door__art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 88% center; }
.door::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to top, rgb(var(--g) / .97) 0%, rgb(var(--g) / .9) 34%, rgb(var(--g) / 0) 72%); }
.door__text { position: relative; z-index: 2; width: 100%; padding: 48px var(--gutter); display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.door--garden .door__text { padding-left: max(var(--gutter), calc((100vw - 1368px) / 2)); }
.door__text p { max-width: 30em; }

/* Home: closing line */

.closing .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; }
.closing p { max-width: 22em; font-family: var(--display); font-size: clamp(28px, 3vw, 40px); line-height: 1.2; text-wrap: balance; }

/* A wide photo band, for when Dan's photos arrive. */
.page-photo { padding-bottom: clamp(48px, 6vw, 80px); }

/* Food Gardens: the four steps */

.steps { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.step { border-top: 1px solid var(--line); padding: 36px 0; display: flex; flex-wrap: wrap; gap: 16px 64px; }
.step__head { flex: 1 1 300px; min-width: 0; display: flex; align-items: baseline; gap: 20px; }
.step__num { min-width: 1.2em; font-family: var(--display); font-size: 26px; line-height: 1.15; color: var(--accent); }
.step__body { flex: 1.5 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.receive { max-width: 34em; display: flex; flex-direction: column; gap: 10px; }
.receive__label { font-family: var(--sans); font-weight: 700; line-height: 1.4; }
.receive ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 0 32px; font-family: var(--sans); line-height: 1.45; }
.receive li { padding: 10px 0; border-top: 1px solid var(--line); }

/* Two columns side by side */

.cols { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 56px 96px; }
.cols > * { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 28px; }
.cols p { max-width: 30em; }
.plain-list { align-self: stretch; list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); font-family: var(--display); font-size: 28px; line-height: 1.25; }
.plain-list li { padding: 16px 0; border-top: 1px solid var(--line); }

/* Dining: the three formats */

.formats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 40px; }
.format { border-top: 1px solid var(--line); padding-top: 24px; display: flex; flex-direction: column; gap: 12px; }

/* Label and value rows */

.deflist { align-self: stretch; margin: 0; border-bottom: 1px solid var(--line); }
.deflist div { padding: 16px 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 24px; }
.deflist dt { flex: 0 0 110px; font-family: var(--sans); line-height: 1.4; color: var(--ink-soft); }
.page--dusk .deflist dt { color: var(--ivory-soft); }
.deflist dd { flex: 1 1 220px; margin: 0; font-size: 19px; line-height: 1.55; }
.deflist a { text-decoration: underline; text-underline-offset: 5px; }

/* About */

.story { border-bottom: 1px solid var(--line); }
.story__row { border-top: 1px solid var(--line); padding: 36px 0; display: flex; flex-wrap: wrap; gap: 16px 64px; }
.story__head { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.story__place { font-family: var(--sans); line-height: 1.4; color: var(--ink-soft); }
.story__row p { flex: 1.5 1 420px; min-width: 0; max-width: 34em; }
.work .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px 64px; }
.work__text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.work__text p { max-width: 30em; }

/* Contact */

.know { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 40px 64px; }
.know > div { display: flex; flex-direction: column; gap: 14px; }
.know h3 { font-size: 28px; line-height: 1.2; }
.know ul { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.know li { padding: 13px 0; border-top: 1px solid var(--line); }

/* Page not found */

.missing { display: flex; flex-direction: column; align-items: flex-start; gap: 28px; }

/* Footer */

.site-footer { background: var(--night); color: #E9E4DA; font-family: var(--sans); line-height: 1.4; }
.site-footer .wrap { padding-block: 72px 48px; display: flex; flex-direction: column; gap: 48px; }
.footer__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px 64px; }
.footer__brand { max-width: 400px; display: flex; flex-direction: column; gap: 10px; }
.footer__brand strong { font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1.2; }
.footer__brand span { line-height: 1.5; color: #B4AD9F; }
.footer__links { display: flex; flex-direction: column; }
.footer__links a { padding: 10px 0; text-decoration: none; }
.footer__legal { border-top: 1px solid #2C3531; padding-top: 20px; font-size: 16px; color: #B4AD9F; }

@media (prefers-reduced-motion: reduce) {
  a { transition: none; }
}
