/* forme. — brand page
   Colours and type come from the brand dossier. */

:root {
  --forest: #123D2B;
  --deep: #163D2B;
  --ivory: #F5F0E5;
  --cream: #F8F5ED;
  --oat: #D9CFBD;
  --brown: #5A3825;
  --black: #20211F;
  --ink: #163D2B;
  --ink-soft: rgba(22, 61, 43, .72);
  --line: rgba(22, 61, 43, .16);
  --line-light: rgba(245, 240, 229, .22);
  --gutter: clamp(20px, 5vw, 72px);
  --max: 1320px;
  --bar: 64px;
  --font: "Jost", "Avenir Next", "Avenir", "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  text-transform: lowercase; /* house rule: all visible text is lowercase */
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }

:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 30;
  padding: 10px 16px; background: var(--ivory); color: var(--ink);
}
.skip:focus { top: 12px; }

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

.label {
  font-size: .84rem; font-weight: 500; letter-spacing: .12em;
  color: var(--ink-soft);
}
.label--light { color: rgba(245, 240, 229, .7); }

.title, .statement {
  font-weight: 300; letter-spacing: -.01em; line-height: 1.2; text-wrap: balance;
}
.title { font-size: clamp(1.7rem, 3.4vw, 2.75rem); max-width: 22ch; }
.statement { font-size: clamp(1.55rem, 3vw, 2.5rem); line-height: 1.28; }

section[id] { scroll-margin-top: calc(var(--bar) - 1px); }

.section-head { display: grid; gap: 18px; margin-bottom: clamp(32px, 5vw, 64px); }

/* ---------- Header bar ---------- */

.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  height: var(--bar); padding-inline: var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  color: var(--ivory);
  transition: background-color .35s ease, color .35s ease, border-color .35s ease;
  border-bottom: 1px solid transparent;
}
html:not(.js) .bar { position: absolute; }

.bar__logo { display: block; position: relative; width: 92px; flex: none; }
.bar__logo img { width: 100%; transition: opacity .35s ease; }
.bar__logo-dark { position: absolute; inset: 0; opacity: 0; }

.bar__nav { display: none; gap: clamp(20px, 3vw, 44px); }
.bar a { text-decoration: none; }
.bar__nav a, .bar__ig {
  font-size: .86rem; font-weight: 400; letter-spacing: .08em;
  padding-block: 8px;
}
.bar__nav a:hover, .bar__ig:hover { text-decoration: underline; text-underline-offset: 6px; }

.bar.is-solid {
  background: rgba(248, 245, 237, .94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: var(--ink); border-bottom-color: var(--line);
}
.bar.is-solid .bar__logo-light { opacity: 0; }
.bar.is-solid .bar__logo-dark { opacity: 1; }

@media (min-width: 820px) { .bar__nav { display: flex; } }

/* ---------- Hero ---------- */

.hero {
  min-height: 100vh; min-height: 100svh;
  background: linear-gradient(rgba(18, 61, 43, .8), rgba(14, 48, 34, .86)), url("../img/mood-green-knit.jpg") center / cover no-repeat, var(--forest);
  color: var(--ivory);
  display: grid; grid-template-rows: 1fr auto;
  padding: var(--bar) var(--gutter) 0;
}
.hero__mid { display: grid; place-content: center; justify-items: center; gap: clamp(20px, 3vw, 34px); text-align: center; }
.hero__mark img { width: clamp(210px, 40vw, 520px); }
.hero__line {
  font-weight: 300; font-size: clamp(.95rem, 1.5vw, 1.2rem); letter-spacing: .06em;
  color: rgba(245, 240, 229, .82);
}
.hero__base {
  display: flex; justify-content: space-between; gap: 16px;
  padding-block: 22px; border-top: 1px solid var(--line-light);
  font-size: .82rem; font-weight: 400; letter-spacing: .1em;
}
.hero__base a { text-decoration: none; }

@media (prefers-reduced-motion: no-preference) {
  .hero__mark, .hero__line, .hero__base { animation: rise 1.1s cubic-bezier(.2, .7, .2, 1) both; }
  .hero__line { animation-delay: .18s; }
  .hero__base { animation-delay: .4s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- The idea: one statement over a full-width image ---------- */

.band {
  position: relative; isolation: isolate;
  min-height: min(78vh, 760px);
  padding: clamp(96px, 12vw, 170px) var(--gutter) clamp(72px, 10vw, 140px);
  display: grid; align-content: start; gap: clamp(22px, 3vw, 36px);
  background: var(--oat) url("../img/mood-sunlit-glow.jpg") center / cover no-repeat;
}
.band::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, rgba(248, 245, 237, .78), rgba(248, 245, 237, .35) 55%, rgba(248, 245, 237, 0) 85%);
}
.band .statement { max-width: 19em; font-size: clamp(1.6rem, 3.5vw, 3rem); }
.band__points { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .98rem; }
.band__points li + li::before { content: "·"; margin-right: 14px; }

/* ---------- Up close: a wall of images with no gaps ---------- */

.wall { display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 50vw; grid-auto-flow: dense; }
.wall li { position: relative; overflow: hidden; background: var(--oat); }
.wall img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.wall__big { grid-column: span 2; grid-row: span 2; }
.wall__wide { grid-column: span 2; }
.wall__title {
  position: absolute; inset: auto 0 0 0;
  padding: clamp(80px, 12vw, 160px) var(--gutter) clamp(20px, 3vw, 40px);
  color: var(--ivory); font-weight: 300; line-height: 1.1;
  font-size: clamp(2rem, 4.6vw, 3.8rem);
  background: linear-gradient(to top, rgba(10, 34, 24, .7), rgba(10, 34, 24, 0));
}
@media (hover: hover) { .wall li:hover img { transform: scale(1.04); } }
@media (min-width: 900px) {
  .wall { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 25vw; }
}

/* ---------- The experience: three full-height images ---------- */

.trio { display: grid; }
.trio article { position: relative; overflow: hidden; aspect-ratio: 4 / 5; background: var(--forest); }
.trio__img, .trio .box { position: absolute; inset: 0; width: 100%; height: 100%; }
.trio__img { object-fit: cover; }
.trio__text {
  position: absolute; inset: auto 0 0 0;
  padding: 96px var(--gutter) 26px;
  color: var(--ivory); display: grid; gap: 6px;
  background: linear-gradient(to top, rgba(10, 34, 24, .78), rgba(10, 34, 24, 0));
}
.trio__text h3 { font-size: clamp(1.45rem, 2.2vw, 2rem); font-weight: 300; line-height: 1.2; }
@media (min-width: 900px) {
  .trio { grid-template-columns: repeat(3, 1fr); }
  .trio article { aspect-ratio: 3 / 4; }
  .trio__text { padding: 110px 32px 30px; }
}

.box { background: var(--forest); display: grid; place-items: center; }
.box::before { content: ""; position: absolute; inset: clamp(16px, 2vw, 28px); border: 1px solid rgba(245, 240, 229, .5); }
.box img { width: 46%; max-width: 280px; }

/* ---------- Palette ---------- */

.palette { display: grid; grid-template-columns: repeat(2, 1fr); }
.swatch {
  min-height: 84px; padding: 12px var(--gutter) 12px 16px;
  display: flex; align-items: flex-end;
  font-size: .82rem; font-weight: 400; letter-spacing: .08em;
  color: var(--ink);
}
.swatch--dark { color: var(--ivory); }
@media (min-width: 640px) {
  .palette { grid-template-columns: repeat(4, 1fr); }
  .swatch { min-height: 104px; padding: 16px 22px; }
}

/* ---------- Instagram call to action ---------- */

.cta {
  background: var(--forest); color: var(--ivory); text-align: center;
  padding: clamp(72px, 10vw, 140px) var(--gutter);
  display: grid; justify-items: center; gap: 20px;
}
.cta__title { font-size: clamp(2rem, 5.2vw, 4.2rem); font-weight: 300; line-height: 1.1; letter-spacing: -.015em; text-wrap: balance; }
.cta__text { color: rgba(245, 240, 229, .78); max-width: 40ch; }

.button {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 14px;
  padding: 17px 30px; background: var(--ivory); color: var(--forest);
  font-size: .95rem; font-weight: 400; letter-spacing: .06em;
  text-decoration: none; border: 1px solid var(--ivory);
  transition: background-color .3s ease, color .3s ease;
}
.button:hover { background: transparent; color: var(--ivory); }

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

.foot {
  background: var(--forest); color: var(--ivory);
  border-top: 1px solid var(--line-light);
  padding: 44px var(--gutter) 36px;
  display: grid; justify-items: center; gap: 12px; text-align: center;
}
.foot__logo { width: 96px; margin-bottom: 6px; }
.foot__line { font-weight: 300; color: rgba(245, 240, 229, .8); }
.foot__links { display: flex; gap: 22px; }
.foot__links a { text-underline-offset: 5px; }
.foot__small { margin-top: 14px; font-size: .78rem; letter-spacing: .06em; color: rgba(245, 240, 229, .55); }

/* ---------- Pages without a hero (journal, articles, 404) ---------- */

.page { padding-top: var(--bar); min-height: 72vh; }
.label a { text-underline-offset: 4px; }

.journal-head { max-width: var(--max); margin-inline: auto; padding: clamp(56px, 8vw, 112px) var(--gutter) clamp(28px, 4vw, 52px); display: grid; gap: 10px; }
.journal-head h1 { font-weight: 300; font-size: clamp(2.6rem, 7vw, 5rem); line-height: 1; }
.journal-empty { max-width: var(--max); margin-inline: auto; padding: 0 var(--gutter) clamp(96px, 14vw, 200px); font-size: 1.2rem; color: var(--ink-soft); }

.posts {
  max-width: var(--max); margin-inline: auto;
  padding: 0 var(--gutter) clamp(72px, 10vw, 140px);
  display: grid; gap: clamp(36px, 5vw, 64px) 20px;
}
.post a { display: grid; gap: 8px; text-decoration: none; }
.post__img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--oat); margin-bottom: 10px; }
.post__img--empty { background: var(--forest); display: grid; place-items: center; }
.post__img--empty img { width: 42%; }
.post__title { font-size: 1.4rem; line-height: 1.25; }
.post__excerpt { color: var(--ink-soft); font-size: .98rem; line-height: 1.55; }
@media (hover: hover) { .post a:hover .post__title { text-decoration: underline; text-underline-offset: 5px; } }
@media (min-width: 700px) { .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .posts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.article__cover { width: 100%; aspect-ratio: 4 / 5; max-height: 82vh; object-fit: cover; background: var(--oat); }
@media (min-width: 820px) { .article__cover { aspect-ratio: 16 / 9; } }
.article__head, .prose, .article__foot { max-width: 46rem; margin-inline: auto; padding-inline: var(--gutter); }
.article__head { padding-top: clamp(40px, 6vw, 80px); display: grid; gap: 14px; }
.article__head h1 { font-weight: 300; font-size: clamp(2.1rem, 5.4vw, 3.8rem); line-height: 1.08; text-wrap: balance; }

.prose { padding-top: clamp(24px, 4vw, 44px); font-size: 1.14rem; line-height: 1.78; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font-weight: 400; font-size: 1.65rem; line-height: 1.25; margin-top: 2.1em; }
.prose h3 { font-weight: 500; font-size: 1.2rem; margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .35em; }
.prose a { text-underline-offset: 4px; }
.prose blockquote { border-left: 2px solid var(--forest); padding-left: 1.1em; font-size: 1.3rem; font-weight: 300; line-height: 1.5; }
.prose figure { margin-block: 2em; }
.prose figure img { width: 100%; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2.4em; }

.article__foot { padding-block: clamp(36px, 5vw, 60px) clamp(72px, 10vw, 130px); display: grid; gap: 22px; }
.article__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.article__tags a { border: 1px solid var(--line); padding: 5px 12px; font-size: .88rem; text-decoration: none; }
.article__back { justify-self: start; text-underline-offset: 5px; }

.notfound { display: grid; justify-items: center; gap: 18px; text-align: center; padding: clamp(96px, 16vw, 220px) var(--gutter); }
.notfound h1 { font-weight: 300; font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.1; }
.button--dark { background: var(--forest); color: var(--ivory); border-color: var(--forest); }
.button--dark:hover { background: transparent; color: var(--forest); }

/* ---------- Reveal on scroll (only when JavaScript is running) ---------- */

@media (prefers-reduced-motion: no-preference) {
  html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
  html.js .reveal.is-in { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
