/* Off Grid Newfoundland: public site. Plain CSS, no build step, no external requests.
   Every page is one screen: a header with the tabs, then the page filling the rest (Dylan, 13 Nov: no scrolling).
   On a phone a page that cannot fit may scroll; on a laptop or PC none should. */
:root {
  --spruce: #16231b;
  --spruce-2: #1f3226;
  --moss: #6f8f4e;
  --fog: #e9ece6;
  --fog-2: #c9cfc4;
  --ember: #f08a3c;
  --ember-2: #ffb070;
  --ink: #f4f1ea;
  --ink-2: #c8cdc2;
  --line: #34483a;
  --radius: 14px;
  --head: 76px;
  --font: "Segoe UI", "Fira Sans", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--spruce);
  color: var(--ink);
  font: 17px/1.55 var(--font);
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--ember-2); }
a:focus-visible, .button:focus-visible { outline: 3px solid var(--ember-2); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--spruce); padding: 8px 12px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 8px; }

/* One screen per page. */
body.screen { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
body.screen > main { flex: 1; }

/* Header and tabs. */
.top {
  position: absolute; inset: 0 0 auto 0; z-index: 5; height: var(--head);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 clamp(16px, 4vw, 48px);
  background: linear-gradient(rgba(10, 18, 13, 0.85) 0%, rgba(10, 18, 13, 0));
}
.top.solid { position: static; background: var(--spruce); border-bottom: 1px solid var(--line); flex: none; }
.brand { color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: 0.02em; font-size: 1.1rem; white-space: nowrap; }
.brand span { color: var(--ember-2); }
.top nav { display: flex; align-items: center; gap: 6px; }
.tab { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; padding: 8px 12px; border-radius: 999px; }
.tab:hover { color: var(--ember-2); }
.tab[aria-current="page"] { background: var(--spruce-2); color: var(--ember-2); box-shadow: inset 0 0 0 1px var(--line); }
.short-label { display: none; }
.top nav .button { margin-left: 8px; }

.button {
  display: inline-block; text-decoration: none; font: inherit; font-weight: 700; cursor: pointer;
  background: var(--ember); color: #1d1208;
  padding: 12px 22px; border-radius: 999px; border: 2px solid var(--ember);
  min-height: 44px;
}
.button:hover { background: var(--ember-2); border-color: var(--ember-2); }
.button.ghost { background: transparent; color: var(--ink); border-color: rgba(244, 241, 234, 0.6); }
.button.ghost:hover { border-color: var(--ink); background: rgba(244, 241, 234, 0.08); }
.button.small { padding: 7px 16px; font-size: 0.9rem; min-height: 40px; }
.button[aria-current="page"] { box-shadow: 0 0 0 3px rgba(255, 176, 112, 0.35); }

/* Type. */
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.8rem; font-weight: 700; color: var(--ember-2); margin: 0 0 8px; }
h1 { font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 1.07; margin: 0 0 14px; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.25rem, 2vw, 1.55rem); line-height: 1.2; margin: 22px 0 8px; }
p { margin: 0 0 12px; }
.sub { color: var(--ink-2); margin: 0; }
.fine { font-size: 0.88rem; color: var(--ink-2); }

/* Home: the picture fills the screen under the header. */
.home .hero { position: relative; display: grid; align-items: end; overflow: hidden; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 100%; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  /* Shade the left for the text, leave the lean-to and fire on the right lit. */
  background: linear-gradient(90deg, rgba(12, 20, 14, 0.85) 0%, rgba(12, 20, 14, 0.45) 40%, rgba(12, 20, 14, 0) 60%);
}
.hero-text { position: relative; z-index: 1; max-width: 640px; padding: calc(var(--head) + 24px) clamp(16px, 5vw, 64px) clamp(56px, 10vh, 110px); }
.home h1 { font-size: clamp(2.2rem, 5.2vw, 3.9rem); line-height: 1.05; margin-bottom: 18px; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--fog); margin: 0 0 26px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.note { margin: 16px 0 0; color: var(--ink-2); font-size: 0.92rem; }
.caption { position: absolute; z-index: 1; right: clamp(16px, 4vw, 48px); bottom: 14px; margin: 0; font-size: 0.78rem; color: rgba(244, 241, 234, 0.7); }

/* The other pages: content centred in the space under the header. */
.stage {
  display: flex; flex-direction: column; justify-content: center; gap: 28px;
  width: 100%; max-width: 1180px; margin: 0 auto; padding: clamp(24px, 4vh, 48px) clamp(16px, 5vw, 64px);
}
.stage.narrow { max-width: 760px; gap: 0; }
.stage p, .stage li { color: var(--fog-2); }
.stage .eyebrow { color: var(--ember-2); }
.stage-foot { margin: 0; }
.two { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: center; }
.stack { display: grid; gap: 18px; }
.stage ul { margin: 0 0 12px; padding-left: 1.2em; }

.cards { display: grid; gap: 18px; }
.cards.four { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--spruce-2); border: 1px solid var(--line); border-top: 3px solid var(--ember); border-radius: var(--radius); padding: 20px 20px 22px; }
.card h3 { margin: 0 0 8px; font-size: 1.12rem; color: var(--ink); }
.card p { margin: 0; color: var(--fog-2); }

.facts, .log, .panel { background: var(--spruce-2); border: 1px solid var(--line); border-radius: var(--radius); }
.facts { padding: 4px 22px; }
.facts p { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.facts p:last-child { border-bottom: 0; }
.facts span { display: block; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.72rem; font-weight: 700; color: var(--moss); }
.log { padding: 18px 22px 8px; }
.log h3 { margin: 0 0 8px; font-size: 1.05rem; }
.panel { padding: 20px 22px; }
.panel h2 { margin-top: 0; }
.credits { list-style: none; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 10px; }
.credits li { background: var(--spruce); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; }
.credits li.empty { border-style: dashed; }

/* Request form. */
.form { display: grid; gap: 12px; background: var(--spruce-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form label { display: grid; gap: 5px; font-weight: 600; font-size: 0.92rem; align-content: start; }
.form small { font-weight: 400; color: var(--ink-2); }
.form input[type="text"], .form input[type="email"], .form textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--spruce);
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; min-height: 44px;
}
.form textarea { resize: vertical; }
.form input:focus-visible, .form textarea:focus-visible { outline: 3px solid var(--ember-2); outline-offset: 1px; }
.form .hint { margin: -6px 0 0; }
.form .send { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.form .check { display: flex; align-items: center; gap: 10px; font-weight: 400; }
.form .check input { width: 20px; height: 20px; accent-color: var(--ember); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Shorter laptop screens: tighten so a page still fits. */
@media (max-height: 820px) and (min-width: 861px) {
  body { font-size: 16px; }
  .stage { gap: 20px; }
  .card { padding: 16px 16px 18px; }
  .facts p { padding: 9px 0; }
  .form { padding: 18px; gap: 10px; }
}

@media (max-width: 1100px) {
  .cards.four { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  :root { --head: 104px; }
  .top { flex-direction: column; justify-content: center; align-items: stretch; gap: 8px; padding-top: 10px; padding-bottom: 10px; }
  .brand { text-align: center; }
  .top nav { justify-content: center; gap: 2px; }
  .tab { padding: 6px 10px; font-size: 0.88rem; }
  .top nav .button { margin-left: 4px; }
  .long-label { display: none; }
  .short-label { display: inline; }
  .two { grid-template-columns: 1fr; gap: 20px; align-items: start; }
  .stage { justify-content: flex-start; gap: 18px; }
  .card { padding: 14px 14px 16px; }
  .card h3 { font-size: 1rem; }
  .card p { font-size: 0.88rem; }
  .form .row { grid-template-columns: 1fr; }
  .home .hero { align-items: end; }
  .hero::after { background: linear-gradient(0deg, rgba(12, 20, 14, 0.92) 0%, rgba(12, 20, 14, 0.6) 55%, rgba(12, 20, 14, 0.1) 100%); }
  .hero-img { object-position: 72% 100%; }
  .hero-text { padding-bottom: 48px; }
  .caption { left: 16px; right: 16px; text-align: center; }
}
@media (max-width: 420px) {
  .cards.four { gap: 10px; }
  .card { padding: 12px; }
  .card p { font-size: 0.84rem; line-height: 1.45; }
}

/* Inner pages: the forest picture, dimmed, behind the whole screen. */
body.screen:not(.home) {
  background:
    linear-gradient(rgba(22, 35, 27, 0.88), rgba(22, 35, 27, 0.95)),
    url("img/hero.svg") 60% 100% / cover no-repeat fixed,
    var(--spruce);
}
body.screen:not(.home) .top.solid { background: rgba(16, 26, 20, 0.85); }

/* Big screens: everything a little larger so the page fills the screen. */
@media (min-width: 1700px) and (min-height: 950px) {
  body { font-size: 19px; }
  .stage { max-width: 1400px; }
}

/* Home: "Request access" opens the form over the picture (#join, no script). */
.modal { display: none; position: fixed; inset: 0; z-index: 30; align-items: center; justify-content: center; padding: 16px; }
.modal:target { display: flex; }
.modal-shade { position: absolute; inset: 0; background: rgba(8, 14, 10, 0.72); }
.modal-box {
  position: relative; width: min(680px, 100%); max-height: calc(100dvh - 32px); overflow: auto;
  background: var(--spruce); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 26px 22px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.modal-box h2 { margin: 0 0 8px; font-size: clamp(1.6rem, 3vw, 2.1rem); }
.modal-box .fine { margin-bottom: 16px; }
.modal-box .form { padding: 0; background: none; border: 0; }
.modal-close {
  position: absolute; top: 10px; right: 12px; width: 44px; height: 44px; display: grid; place-items: center;
  color: var(--ink); text-decoration: none; font-size: 1.8rem; line-height: 1; border-radius: 999px;
}
.modal-close:hover { background: var(--spruce-2); color: var(--ember-2); }

/* Comments form: comment / suggestion / question. */
.kinds { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.kinds legend { font-weight: 600; font-size: 0.92rem; padding: 0; margin-bottom: 6px; width: 100%; }
.kinds label { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.kinds input { width: 18px; height: 18px; accent-color: var(--ember); }
