/*
Theme Name: Wulfe Hollow
Theme URI: https://wulfehollow.com
Author: Wulfe Hollow
Description: The field-journal site for Wulfe Hollow, a house in Redding, Connecticut. A block theme built on the Wulfe Hollow design system in its Sunset theme — apricot sky, teal water, Cinzel, Alegreya and Alegreya Sans. Edit the journal in the page editor; add an entry by inserting the "Journal entry" pattern.
Requires at least: 6.6
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wulfe-hollow
Tags: one-column, custom-colors, editor-style, block-patterns, full-site-editing
*/

/* ------------------------------------------------------------------
   Tokens. Every value here is a preset from theme.json (the editor's
   colour and type pickers show the same palette) or a mark drawn from
   the illustration's sky.
   ------------------------------------------------------------------ */
:root {
  --wh-ground: var(--wp--preset--color--ground);
  --wh-ground-tint: var(--wp--preset--color--ground-tint);
  --wh-ground-deep: var(--wp--preset--color--ground-deep);
  --wh-surface: var(--wp--preset--color--surface);
  --wh-ink: var(--wp--preset--color--ink);
  --wh-ink-muted: var(--wp--preset--color--ink-muted);
  --wh-ink-on-deep: var(--wp--preset--color--ink-on-deep);
  --wh-accent: var(--wp--preset--color--accent);
  --wh-primary: var(--wp--preset--color--primary);
  --wh-on-primary: var(--wp--preset--color--on-primary);
  --wh-line: var(--wp--preset--color--line);
  --wh-hairline: var(--wp--preset--color--hairline);
  --wh-link: var(--wp--preset--color--link);
  --wh-card-surface: var(--wp--preset--color--card-surface);
  --wh-card-ink: var(--wp--preset--color--card-ink);
  --wh-card-ink-muted: var(--wp--preset--color--card-ink-muted);
  --wh-gold-line: var(--wp--preset--color--gold-line);

  --wh-font-display: var(--wp--preset--font-family--display);
  --wh-font-text: var(--wp--preset--font-family--text);
  --wh-font-ui: var(--wp--preset--font-family--ui);

  --wh-radius-md: 10px;
  --wh-radius-lg: 16px;
  --wh-shadow-card: var(--wp--preset--shadow--card, 0 20px 48px #5a3a1a33);
  --wh-gutter: clamp(24px, 5vw, 64px);

  /* The four marks from the illustration's sky, in the Sunset accent;
     the ripple in gold-line; the wave is the Sunset water's edge. */
  --wh-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23b85a24'%3E%3Cpath d='M12 0C12 7.2 16.8 12 24 12C16.8 12 12 16.8 12 24C12 16.8 7.2 12 0 12C7.2 12 12 7.2 12 0Z'/%3E%3C/svg%3E");
  --wh-crescent: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23b85a24'%3E%3Cpath d='M19 3.515A11 11 0 1 0 19 20.485A9 9 0 1 1 19 3.515Z'/%3E%3C/svg%3E");
  --wh-ring: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='none' stroke='%23b85a24' stroke-width='1.4'/%3E%3Ccircle cx='14.5' cy='9.5' r='2.4' fill='%23b85a24'/%3E%3C/svg%3E");
  --wh-ripple: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 620 40' preserveAspectRatio='none'%3E%3Cpath fill='none' stroke='%23ffc447' stroke-width='2' stroke-linecap='round' vector-effect='non-scaling-stroke' d='M0 20C60 0 120 40 180 20S300 0 360 20S480 40 540 20S600 12 620 20'/%3E%3C/svg%3E");
  --wh-wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 24' preserveAspectRatio='none'%3E%3Cpath fill='%233f6b5c' d='M0 14C40 2 80 2 120 14C160 26 200 26 240 14L240 24L0 24Z'/%3E%3C/svg%3E");
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ------------------------------------------------------------------
   Type helpers (the design system's text styles as classes)
   ------------------------------------------------------------------ */
.wh-caption {
  margin: 0;
  font-family: var(--wh-font-ui);
  font-size: 14px;
  line-height: 20px;
  color: var(--wh-ink-muted);
}
.wh-label {
  margin: 0;
  font-family: var(--wh-font-ui);
  font-size: 13px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wh-ink-muted);
}
.wh-numeral {
  margin: 0 0 8px;
  font-family: var(--wh-font-display);
  font-size: 24px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0.26em;
  color: var(--wh-ink);
}
.wh-quote,
.wh-tagline {
  margin: 0;
  font-family: var(--wh-font-text);
  font-style: italic;
  font-size: 22px;
  line-height: 32px;
  color: var(--wh-ink);
}
.wh-signoff {
  margin: 24px 0 0;
}

/* The wordmark, set live: Cinzel, capitals, tracked, with the left
   edge padded by the tracking so a centred line stays centred. */
.wh-wordmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--wh-font-display);
  text-transform: uppercase;
  line-height: 1;
  color: var(--wh-ink);
  gap: 0;
}
.wh-wordmark > * {
  margin: 0;
  font-family: var(--wh-font-display);
  color: inherit;
  line-height: 1;
}
.wh-wordmark-name {
  font-weight: 600;
  letter-spacing: 0.12em;
  padding-left: 0.12em;
  white-space: nowrap;
}
.wh-wordmark-sub {
  font-weight: 500;
  letter-spacing: 0.26em;
  padding-left: 0.26em;
  white-space: nowrap;
}
.wh-wordmark-l .wh-wordmark-name { font-size: 54px; }
.wh-wordmark-l .wh-wordmark-sub { font-size: 24px; margin-top: 12px; }
.wh-wordmark-m .wh-wordmark-name { font-size: 32px; }
.wh-wordmark-m .wh-wordmark-sub { font-size: 14px; margin-top: 8px; }
.wh-wordmark-deep { color: var(--wh-ink-on-deep); }

/* ------------------------------------------------------------------
   Header: the dateline and the page links
   ------------------------------------------------------------------ */
.wh-dateline {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 24px;
  margin: 0;
  padding: 20px var(--wh-gutter);
  background: var(--wh-ground);
}
.wh-dateline .wh-caption { margin: 0; }
.wh-nav,
.wh-nav .wp-block-navigation__container {
  font-family: var(--wh-font-ui);
  font-size: 14px;
  line-height: 20px;
}
.wh-nav .wp-block-navigation-item__content {
  color: var(--wh-link);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.wh-nav .wp-block-navigation-item__content:hover { color: var(--wh-primary); }

/* ------------------------------------------------------------------
   Scenes: sky above, water below. The band is ::before, its wave ::after.
   ------------------------------------------------------------------ */
.wh-scene {
  position: relative;
  overflow: hidden;
  --wh-band: 290px;
}
.wh-scene::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--wh-band);
  background: var(--wh-ground-deep);
  pointer-events: none;
}
.wh-scene::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--wh-band);
  height: 24px;
  background: var(--wh-wave) repeat-x center bottom;
  background-size: 240px 24px;
  pointer-events: none;
}
.wh-scene .wh-motifs,
.wh-band .wh-motifs {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
  pointer-events: none;
}
.wh-motifs i {
  position: absolute;
  display: block;
  width: 20px;
  height: 20px;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.7;
}
.wh-motifs .wh-star { background-image: var(--wh-star); }
.wh-motifs .wh-crescent { background-image: var(--wh-crescent); }
.wh-motifs .wh-ring { background-image: var(--wh-ring); opacity: 0.45; }
.wh-motifs .wh-ripple {
  width: 360px;
  height: 22px;
  background-image: var(--wh-ripple);
  background-size: 100% 100%;
  opacity: 0.38;
}
.wh-motifs .wh-ripple-2 { width: 220px; height: 16px; opacity: 0.26; }

/* The hero: apricot sky, the illustration floating on the waterline,
   the wordmark on the water. */
.wh-hero {
  margin: 0;
  min-height: 940px;
  background: linear-gradient(180deg, var(--wh-ground) 0%, var(--wh-ground-tint) 100%);
}
.wh-hero > :not(.wh-motifs) { position: relative; z-index: 2; }
.wh-hero .wh-issue {
  position: absolute;
  right: var(--wh-gutter);
  top: 24px;
  margin: 0;
  font-family: var(--wh-font-ui);
  font-size: 14px;
  line-height: 20px;
  color: var(--wh-ink-muted);
}
.wh-hero .wh-art {
  position: absolute;
  left: 50%;
  bottom: calc(var(--wh-band) - 10px);
  width: 570px;
  max-width: 86vw;
  margin: 0;
  transform: translateX(-50%);
}
.wh-hero .wh-art img {
  display: block;
  width: 100%;
  height: auto;
}
.wh-hero .wh-wordmark {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 150px;
}
.wh-hero .wh-tagline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 84px;
  padding: 0 24px;
  text-align: center;
  color: var(--wh-ink-on-deep);
}

/* ------------------------------------------------------------------
   The journal: a narrow margin column and a reading column
   ------------------------------------------------------------------ */
.wh-entry {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 24px 48px;
  padding-top: 48px;
}
.wh-entry .wh-margin {
  flex: 0 0 200px;
  min-width: 0;
}
.wh-entry .wh-text {
  flex: 1 1 480px;
  min-width: 0;
}
.wh-entry .wh-text > * { margin-block: 0; }
.wh-entry .wh-text > * + * { margin-block-start: 18px; }
.wh-entry .wh-text h2 {
  font-family: var(--wh-font-text);
  font-size: 28px;
  line-height: 34px;
  font-weight: 500;
}
.wh-entry .wh-text p {
  font-size: 18px;
  line-height: 28px;
}

/* The hour-by-hour list: a bold time, then the note */
.wh-hours {
  margin-top: 24px;
  border-top: 1px solid var(--wh-hairline);
}
.wh-hours > * { margin-block: 0; }
.wh-hours .wh-hour {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  column-gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--wh-hairline);
}
.wh-hours .wh-hour strong {
  font-family: var(--wh-font-ui);
  font-size: 16px;
  font-weight: 700;
  color: var(--wh-ink);
}

/* Run-in heads for the places, and the dates */
.wh-places p strong,
.wh-dates p strong {
  font-family: var(--wh-font-ui);
  font-size: 17px;
  font-weight: 700;
  color: var(--wh-ink);
}
.wh-dates p strong {
  font-size: 16px;
  letter-spacing: 0.04em;
}
.wh-dates > * + * { margin-block-start: 10px; }

/* A pull quote with a crescent beside it */
.wh-pull {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 8px;
}
.wh-pull::before {
  content: "";
  flex: none;
  width: 28px;
  height: 28px;
  background: var(--wh-crescent) no-repeat center / contain;
  opacity: 0.7;
}
.wh-pull p { margin: 0; }

/* ------------------------------------------------------------------
   The apricot band with the paper card
   ------------------------------------------------------------------ */
.wh-band {
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 80px var(--wh-gutter);
  background: var(--wh-ground);
}
.wh-band > :not(.wh-motifs) { position: relative; z-index: 2; }
.wh-band .wh-entry {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0;
}
.wh-paper {
  box-sizing: border-box;
  max-width: 680px;
  padding: 32px;
  border-radius: var(--wh-radius-lg);
  background: var(--wh-card-surface);
  color: var(--wh-card-ink);
  box-shadow: var(--wh-shadow-card);
}
.wh-paper > * { margin-block: 0; color: inherit; }
.wh-paper > * + * { margin-block-start: 8px; }
.wh-paper .wh-card-title,
.wh-text.wh-paper .wh-card-title {
  font-family: var(--wh-font-display);
  font-size: 24px;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-wrap: balance;
}
.wh-paper p,
.wh-text.wh-paper p {
  font-size: 16px;
  line-height: 24px;
  color: var(--wh-card-ink-muted);
}
@media (min-width: 782px) {
  .wh-paper { padding: 40px; }
}

/* ------------------------------------------------------------------
   Footer: the water again, the small wordmark on it
   ------------------------------------------------------------------ */
.wh-foot {
  margin: 0;
  min-height: 300px;
  --wh-band: 160px;
  background: linear-gradient(180deg, var(--wh-ground-tint) 0%, var(--wh-ground) 100%);
}
.wh-foot > :not(.wh-motifs) { position: relative; z-index: 2; }
.wh-foot .wh-wordmark {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 74px;
}
.wh-foot .wh-foot-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 40px;
  margin: 0;
  padding: 0 24px;
  text-align: center;
  font-family: var(--wh-font-ui);
  font-size: 14px;
  line-height: 20px;
  color: var(--wh-ink-on-deep);
}

/* ------------------------------------------------------------------
   Other pages and posts
   ------------------------------------------------------------------ */
.wh-page {
  padding-top: 64px;
  padding-bottom: 96px;
}
.wh-page .wp-block-post-title {
  margin: 0 0 24px;
  font-family: var(--wh-font-text);
  font-size: 32px;
  line-height: 1.2;
  font-weight: 500;
}
.home .wh-page {
  margin-block-start: 0;
  padding-top: 0;
  padding-bottom: 0;
}
.home .wh-page > * { margin-block-start: 0; }
.home .wh-page-head { display: none; }
.wh-page .wp-block-post-date { margin: -12px 0 24px; }
.wh-index .wp-block-post-title { font-size: 28px; }
.wh-index .wp-block-post-title a { text-decoration: none; color: var(--wh-ink); }
.wh-index .wp-block-post-title a:hover { color: var(--wh-link); }
.wh-index .wp-block-post-template > * + * {
  margin-block-start: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--wh-hairline);
}

/* ------------------------------------------------------------------
   Small screens
   ------------------------------------------------------------------ */
@media (max-width: 900px) {
  .wh-hero {
    min-height: 780px;
    --wh-band: 250px;
  }
  .wh-hero .wh-art { width: 340px; }
  .wh-hero .wh-wordmark { bottom: 128px; }
  .wh-hero .wh-tagline { bottom: 64px; }
  .wh-hero .wh-issue { top: 20px; }
  .wh-band { padding: 64px var(--wh-gutter); }
  .wh-foot { min-height: 260px; --wh-band: 140px; }
  .wh-foot .wh-wordmark { bottom: 68px; }
}
@media (max-width: 600px) {
  .wh-wordmark-l .wh-wordmark-name { font-size: 38px; }
  .wh-wordmark-l .wh-wordmark-sub { font-size: 17px; }
  .wh-hours .wh-hour {
    grid-template-columns: 1fr;
    row-gap: 4px;
  }
  .wh-entry { padding-top: 40px; }
}

/* Focus is always visible */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid transparent;
  box-shadow: 0 0 0 2px var(--wh-ground-tint), 0 0 0 4px var(--wh-primary);
  border-radius: 4px;
}
