@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --paper: #f6f5ef;
  --ink: #262e25;
  --muted: #62695d;
  --line: #d8dbcf;
  --green: #344732;
  --lime: #e4edb0;
  --orange: #bd502f;
  --white: #fffef9;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 2rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "DM Sans", sans-serif; line-height: 1.65; }
a { color: inherit; text-underline-offset: .25em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--orange); outline-offset: 6px; }
::selection { background: var(--lime); color: var(--ink); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: "Manrope", sans-serif; font-weight: 500; line-height: 1.1; letter-spacing: -.055em; }
h1 { font-size: clamp(3.6rem, 7.5vw, 7rem); margin-bottom: 1.6rem; }
h2 { font-size: clamp(2.3rem, 4vw, 4rem); margin-bottom: 1.4rem; }
h3 { font-size: 1.6rem; letter-spacing: -.035em; }
p { margin-bottom: 1.2rem; }
.wrap { width: min(1320px, calc(100% - 96px)); margin-inline: auto; }
.skip-link { position: absolute; top: -100px; left: 1rem; padding: .7rem 1rem; background: var(--ink); color: white; z-index: 10; }
.skip-link:focus { top: 1rem; }
.header-inner { min-height: 104px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { display: inline-flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.brand-logo { display: block; width: 128px; height: auto; padding: 8px; background: #000; border-radius: 3px; }
.nav { display: flex; align-items: center; gap: 1.7rem; font-size: .82rem; }
.nav a { text-decoration: none; padding-block: .5rem; }
.nav .journal-nav-link { font-size: 1.4rem; font-weight: 600; }
.nav .journal-nav-link:hover { color: var(--green); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--orange); }
.nav .nav-cta { border: 1px solid var(--ink); border-radius: 3px; padding: .7rem 1rem; }
.section-label { display: flex; align-items: center; gap: .6rem; text-transform: uppercase; font-size: .69rem; font-weight: 600; letter-spacing: .15em; margin-bottom: 1.8rem; }
.section-label::before { content: ""; width: 7px; height: 7px; background: var(--orange); border-radius: 50%; flex-shrink: 0; }
.hero-copy > p:not(.section-label) { max-width: 28rem; color: var(--muted); font-size: 1rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.8rem; margin-top: 2rem; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 2.4rem; padding: 1rem 1.3rem; background: var(--green); color: white; text-decoration: none; border: 1px solid var(--green); border-radius: 3px; font-size: .82rem; font-weight: 500; }
.button:hover { background: var(--ink); border-color: var(--ink); }
.text-link { font-size: .82rem; font-weight: 600; }
.arrow { font-size: 1.1rem; }
.hero-footnote { border-top: 1px solid var(--line); margin-top: 3rem; padding-top: 1rem; display: flex; gap: 1.5rem; font-size: .67rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.joinery-scene { position: relative; min-height: 520px; margin: 0; background: #e3e2d5; overflow: hidden; border-radius: 3px; }
.scene-grid { position: absolute; inset: 0; background-image: linear-gradient(#b8bcaa40 1px, transparent 1px), linear-gradient(90deg, #b8bcaa40 1px, transparent 1px); background-size: 45px 45px; }
.scene-light { position: absolute; inset: 0; background: linear-gradient(130deg, #fff9 0%, transparent 60%, #4b5b3920 100%); }

/* Homepage desktop layout. */
body:has(.hero-wood) { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; overflow-x: hidden; }
body:has(.hero-wood) .site-header { position: relative; z-index: 3; flex: 0 0 auto; }
body:has(.hero-wood) .header-inner { min-height: clamp(70px, 12dvh, 104px); }
body:has(.hero-wood) main { flex: 1 1 auto; min-height: 0; display: flex; }
.hero {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}
.hero-content { position: relative; z-index: 2; padding-top: clamp(12px, 4dvh, 48px); padding-bottom: 12px; }
.hero h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: clamp(2.45rem, min(8.4vw, 12dvh), 9rem); line-height: .99; letter-spacing: -.065em; }
.hero h1 em { color: var(--orange); font-style: italic; font-weight: 400; }
.hero-journal-link { display: inline-flex; align-items: center; gap: .5rem; margin-top: clamp(12px, 3dvh, 32px); font-family: Georgia, "Times New Roman", serif; font-size: clamp(1rem, 2vw, 1.6rem); font-weight: 400; line-height: 1.3; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 3px; }
.hero-journal-link:hover { color: var(--orange); }
.hero-wood {
  position: absolute;
  z-index: 0;
  display: block;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-position: center;
  pointer-events: none;
}

/* One mobile layout: all sizing adjusts fluidly within this breakpoint. */
@media (max-width: 760px) {
  .wrap { width: calc(100% - 40px); }
  body:has(.hero-wood) { display: block; min-height: 0; overflow-x: clip; }
  body:has(.hero-wood) main { display: block; min-height: 0; }
  body:has(.hero-wood) .header-inner { min-height: 0; padding-block: 14px 0; }
  body:has(.hero-wood) .brand-logo { width: 104px; padding: 5px; }

  .hero { display: flex; flex-direction: column; min-height: 0; height: auto; padding-bottom: 0; overflow: hidden; }
  .hero-content { order: 0; flex: none; padding-top: 42px; padding-bottom: 0; }
  .hero .section-label { font-size: clamp(.53rem, 1.8vw, .69rem); letter-spacing: .1em; margin-bottom: 26px; }
  .hero h1 { font-size: clamp(2.45rem, 10.5vw, 4.5rem); line-height: 1.02; }
  .hero-journal-link {
    margin-top: clamp(16px, 3dvh, 34px);
    font-size: clamp(1rem, 4.2vw, 1.35rem);
  }
  .hero-wood {
    position: relative;
    z-index: 0;
    order: 1;
    flex: 0 1 auto;
    inset: auto;
    left: 0;
    width: 100%;
    height: auto;
    margin-top: 8px;
    object-fit: cover;
    object-position: center;
    transform: none;
    overflow: hidden
  }
}

/* Short desktop windows: allow scrolling rather than clipping content. */
@media (min-width: 761px) and (max-height: 450px) {
  body:has(.hero-wood) { overflow-y: auto; }
  .hero { min-height: 310px; }
}

a {
  transition: color 0.2s ease;
}

a:hover {
  color: var(--orange);
  text-decoration-thickness: 2px;
}

a:focus-visible {
  color: var(--orange);
}

.nav .journal-nav-link:hover,
.nav .journal-nav-link:focus-visible {
  color: var(--orange);
}

/* Journal images — more compact on desktop */
/* Journal article thumbnails — desktop only */
@media (min-width: 761px) {
  .post-heading .post-thumbnail {
    display: block;
    width: auto;
    max-width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: center;
    border-radius: 3px;
  }
}

/* Journal photographs — desktop and mobile */
.journal-post .post-body figure {
  width: min(100%, 420px);
  margin: 28px auto;
}

.journal-post .post-body figure img {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: cover;
  object-position: center;
  border-radius: 3px;
}

.journal-post .post-body figcaption {
  margin-top: 10px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
}

/* Desktop hero refinements */
@media (min-width: 761px) {
  .hero-content {
    padding-top: clamp(12px, 3dvh, 36px);
  }

  .hero h1 {
    font-size: clamp(2.45rem, min(7.5vw, 11dvh), 9rem);
  }

  .hero-journal-link {
    position: relative;
    z-index: 3;
    margin-top: clamp(12px, 2dvh, 22px);
  }
}

/* Journal article hero images */
.journal-post .post-heading .post-thumbnail,
.journal-post .post-heading .post-thumbnail-large {
  display: block;
  width: 220px;
  max-width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center;
  flex-shrink: 0;
  border: none;
  border-radius: 3px;
}

/* Smaller screens */
@media (max-width: 760px) {
  .journal-post .post-heading .post-thumbnail,
  .journal-post .post-heading .post-thumbnail-large {
    width: 150px;
    height: 180px;
  }
}
