/* ============================================================
   BLACKCAIRN · a fictional highland expedition company
   Peat black, snow white, blaze orange. Archivo pushed to both
   extremes, IBM Plex Mono for waypoint data. Loud where Haar
   is quiet.
   ============================================================ */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("fonts/plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --peat: #101210;
  --peat-2: #161815;
  --snow: #F2F3EF;
  --blaze: #FF5A1F;
  --scree: #3A3E39;
  --shadow-blue: #97A8B4;
  --line: #272B26;
  --agm-gradient: linear-gradient(125deg, hsl(188 92% 60%), hsl(214 90% 62%) 45%, hsl(256 88% 70%) 78%, hsl(286 80% 66%));
  --ease-hard: cubic-bezier(.19, 1, .22, 1);
  --z-head: 30;
  --z-skip: 50;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 380;
  color: var(--snow);
  background: var(--peat);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}

/* expedition film stock: coarse grain over the dark sections */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .06;
  mix-blend-mode: overlay;
}

::selection { background: var(--blaze); color: var(--peat); }

.mono {
  font-family: "Plex Mono", "SF Mono", Menlo, monospace;
  font-weight: 400;
  letter-spacing: .04em;
}

h1, h2, h3 {
  font-family: "Archivo", sans-serif;
  font-stretch: 118%;
  font-weight: 850;
  line-height: .92;
  letter-spacing: -.01em;
  text-transform: uppercase;
}

h2 { font-size: clamp(2.2rem, 5.2vw, 4rem); }
h3 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
h2, h3, .ethos-line { text-wrap: balance; }

.tag {
  font-size: .78rem;
  color: var(--blaze);
  letter-spacing: .22em;
  margin-bottom: 1.1rem;
}

/* ---------- skip + focus ---------- */

.skip {
  position: fixed;
  top: .75rem; left: .75rem;
  z-index: var(--z-skip);
  padding: .6rem 1rem;
  background: var(--blaze);
  color: var(--peat);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-300%);
  transition: transform .2s var(--ease-hard);
}
.skip:focus { transform: none; }

:focus-visible {
  outline: 2px solid var(--blaze);
  outline-offset: 3px;
}

/* ---------- top bar ---------- */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-head);
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: .9rem clamp(1.25rem, 4vw, 2.5rem);
  background: color-mix(in srgb, var(--peat) 78%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.wordmark {
  font-family: "Archivo", sans-serif;
  font-stretch: 118%;
  font-weight: 850;
  font-size: 1.15rem;
  letter-spacing: .02em;
  color: var(--snow);
  text-decoration: none;
  padding: .45rem .3rem .45rem 0;
}
.wordmark span { color: var(--blaze); }

.topbar nav { display: flex; gap: 1.5rem; margin-left: auto; }
.topbar nav a {
  color: var(--shadow-blue);
  text-decoration: none;
  font-size: .92rem;
  padding: .45rem .1rem;
  transition: color .2s;
}
.topbar nav a:hover { color: var(--snow); }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  padding: .7rem 1.4rem;
  background: var(--blaze);
  color: var(--peat);
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: background .2s, transform .2s var(--ease-hard);
}
.btn:hover { background: #FF7A45; }
.btn:active { transform: translateY(1px); }

.btn-big { padding: 1rem 2rem; font-size: 1.05rem; }

.ghost {
  display: inline-block;
  padding: .95rem .4rem;
  color: var(--snow);
  text-decoration: none;
  border-bottom: 2px solid var(--blaze);
  font-weight: 600;
  transition: color .2s, border-color .2s;
}
.ghost:hover { color: var(--blaze); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  overflow: clip;
}

.skyfield {
  position: absolute;
  inset: 0;
  overflow: clip;
}

.peak {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
  transform-origin: 50% 34%;
  animation: peak-breathe 46s ease-in-out infinite alternate;
}

@keyframes peak-breathe {
  from { transform: scale(1.02); }
  to   { transform: scale(1.09); }
}

.cloud {
  position: absolute;
  left: 0;
  width: calc(100% + 1600px);
  background-repeat: repeat-x;
  background-size: 1600px 100%;
  will-change: transform;
  animation: cloud-drift linear infinite;
}

.cloud-far {
  top: 4%;
  height: 46%;
  opacity: .75;
  animation-duration: 60s;
}

.cloud-near {
  top: 16%;
  height: 62%;
  opacity: .9;
  animation-duration: 30s;
  animation-direction: reverse;
}

@keyframes cloud-drift {
  from { transform: translateX(0); }
  to   { transform: translateX(-1600px); }
}

.cloud-still { animation: none; }

@media (prefers-reduced-motion: reduce) {
  .peak { animation: none; transform: none; }
  .cloud { animation: none; }
}

.hero-grade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(16, 18, 16, .55) 0%, transparent 22%),
    linear-gradient(0deg, rgba(16, 18, 16, .92) 0%, rgba(16, 18, 16, .35) 34%, transparent 58%);
}

.hero-content {
  position: relative;
  width: 100%;
  max-width: 82rem;
  margin-inline: auto;
  padding: 8rem clamp(1.25rem, 4vw, 2.5rem) clamp(3rem, 8vh, 5.5rem);
}

.coords {
  font-size: .8rem;
  color: #C8D4DC;
  margin-bottom: 1.2rem;
  text-shadow: 0 1px 4px rgba(16, 18, 16, .9), 0 0 18px rgba(16, 18, 16, .7);
}

h1 {
  font-size: clamp(4.2rem, 15vw, 12.5rem);
  color: var(--snow);
  text-shadow: 0 2px 30px rgba(16, 18, 16, .6);
  margin-bottom: 1.2rem;
}

.hero-sub {
  max-width: 34rem;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  color: var(--snow);
  margin-bottom: 1rem;
}

.stamp {
  display: inline-block;
  font-size: .8rem;
  color: var(--blaze);
  border: 1px solid var(--blaze);
  padding: .45rem .8rem;
  letter-spacing: .18em;
  margin-bottom: 1.8rem;
  transform: rotate(-1.2deg);
}

.hero-cta { display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; }

.scroll-cue {
  position: absolute;
  right: clamp(1.25rem, 4vw, 2.5rem);
  bottom: 1.4rem;
  font-size: .72rem;
  color: var(--shadow-blue);
  letter-spacing: .3em;
  writing-mode: vertical-rl;
}

/* ---------- ticker ---------- */

.ticker {
  background: var(--blaze);
  color: var(--peat);
  overflow: hidden;
  border-block: 1px solid var(--peat);
}

.ticker-track {
  display: flex;
  gap: 2.2rem;
  white-space: nowrap;
  width: max-content;
  padding: .55rem 0;
  font-family: "Plex Mono", monospace;
  font-weight: 500;
  font-size: .82rem;
  letter-spacing: .1em;
  animation: tick 36s linear infinite;
}
.ticker-track span { flex: none; }

@keyframes tick {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- expeditions ---------- */

.expeditions { padding: clamp(4.5rem, 10vh, 8rem) clamp(1.25rem, 4vw, 2.5rem); }

.section-head {
  max-width: 82rem;
  margin: 0 auto clamp(3rem, 7vh, 5rem);
}

.exp {
  max-width: 82rem;
  margin: 0 auto clamp(4rem, 9vh, 6.5rem);
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
}

.exp:nth-child(odd) .exp-media { order: 2; }

.exp-media {
  overflow: clip;
  border: 1px solid var(--line);
}
.exp-media img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 34rem;
  object-fit: cover;
  transition: transform .8s var(--ease-hard);
}
.exp:hover .exp-media img { transform: scale(1.03); }

.exp-body .tag { margin-bottom: .8rem; }
.exp-body h3 { margin-bottom: .6rem; }

.exp-meta {
  font-size: .82rem;
  color: var(--shadow-blue);
  letter-spacing: .12em;
  margin-bottom: 1rem;
}

.exp-body > p:not(.mono) {
  max-width: 30rem;
  color: #C9CDC6;
}

.profile {
  display: block;
  width: min(300px, 100%);
  margin-top: 1.6rem;
}
.profile-line {
  stroke: var(--blaze);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.profile-label {
  font-size: .68rem;
  color: #6B7268;
  letter-spacing: .18em;
  margin-top: .4rem;
}

/* ---------- headtorch (bothy card) ---------- */

.torch { position: relative; }

.torch .torch-beam {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .5s;
  background: radial-gradient(
    14rem 14rem at var(--tx, 50%) var(--ty, 50%),
    rgba(255, 233, 180, .32) 0%,
    rgba(255, 214, 140, .12) 38%,
    transparent 68%
  );
  mix-blend-mode: screen;
}
.torch:hover .torch-beam { opacity: 1; }

.torch .torch-hint {
  position: absolute;
  right: .9rem;
  bottom: .8rem;
  font-size: .62rem;
  letter-spacing: .22em;
  color: rgba(242, 243, 239, .55);
  opacity: 0;
  transition: opacity .4s;
}
.torch:hover .torch-hint { opacity: 1; }

@media (hover: none) {
  .torch .torch-beam, .torch .torch-hint { display: none; }
}

/* ---------- ethos ---------- */

.ethos {
  background: var(--peat-2);
  border-block: 1px solid var(--line);
  padding: clamp(4.5rem, 11vh, 8rem) clamp(1.25rem, 4vw, 2.5rem);
}
.ethos .tag, .ethos-line { max-width: 82rem; margin-inline: auto; }
.ethos-line {
  font-family: "Archivo", sans-serif;
  font-stretch: 112%;
  font-weight: 780;
  text-transform: uppercase;
  font-size: clamp(1.5rem, 3.6vw, 2.9rem);
  line-height: 1.12;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}
.ethos-line:last-child { border-bottom: 0; }

/* ---------- preparation (snow inversion) ---------- */

.prep {
  background: var(--snow);
  color: var(--peat);
  padding: clamp(4.5rem, 10vh, 8rem) clamp(1.25rem, 4vw, 2.5rem);
}
.prep-inner {
  max-width: 82rem;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.prep .tag { color: #C2440F; }
.prep h2 { margin-bottom: 1rem; }
.prep-note { max-width: 30rem; color: #4A4E48; }

.kit { list-style: none; }
.kit li {
  font-size: .88rem;
  letter-spacing: .08em;
  padding: .9rem 0 .9rem 1.6rem;
  border-bottom: 1px solid #D8DAD3;
  position: relative;
}
.kit li::before {
  content: "◆";
  position: absolute;
  left: 0;
  color: #C2440F;
  font-size: .7rem;
  top: 1.15rem;
}

/* ---------- dates ---------- */

.dates {
  padding: clamp(4.5rem, 10vh, 8rem) clamp(1.25rem, 4vw, 2.5rem);
  max-width: 82rem;
  margin-inline: auto;
}
.dates h2 { margin-bottom: 2rem; }

.dates table {
  width: 100%;
  border-collapse: collapse;
}
.dates th, .dates td {
  text-align: left;
  padding: .9rem .8rem;
  border-bottom: 1px solid var(--line);
}
.dates th {
  font-family: "Plex Mono", monospace;
  font-weight: 500;
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--shadow-blue);
}
.dates td { color: #C9CDC6; }
.dates td.mono { color: var(--blaze); font-size: .88rem; }
.dates tbody tr { transition: background .2s; }
.dates tbody tr:hover { background: var(--peat-2); }
.dates tr.sold td { opacity: .38; }
.dates tr.sold td.mono { color: var(--shadow-blue); }

/* ---------- booking ---------- */

.book {
  background: var(--peat-2);
  border-top: 1px solid var(--line);
  padding: clamp(4.5rem, 10vh, 8rem) clamp(1.25rem, 4vw, 2.5rem);
}
.book-inner {
  max-width: 82rem;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.book h2 { margin-bottom: 1rem; }
.book .prep-note { color: var(--shadow-blue); }

form { max-width: 30rem; }

.hp { position: absolute; left: -9999px; }

.field { margin-bottom: 1.2rem; }
.field label {
  display: block;
  font-family: "Plex Mono", monospace;
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--shadow-blue);
  margin-bottom: .45rem;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: .85rem 1rem;
  font: inherit;
  color: var(--snow);
  background: var(--peat);
  border: 1px solid var(--line);
  border-radius: 0;
  transition: border-color .2s;
}
.field select { appearance: none; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blaze);
}

.form-note { margin-top: 1rem; font-size: .85rem; color: #79817A; }

/* ---------- footer ---------- */

.foot {
  padding: 3.5rem clamp(1.25rem, 4vw, 2.5rem) 3rem;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--shadow-blue);
  font-size: .95rem;
}

.conditions {
  font-size: .75rem;
  letter-spacing: .16em;
  color: var(--scree);
  margin-bottom: 2rem;
}

.foot-mark {
  font-family: "Archivo", sans-serif;
  font-stretch: 118%;
  font-weight: 850;
  font-size: 1.3rem;
  letter-spacing: .04em;
  color: var(--snow);
  margin-bottom: .8rem;
}

.foot p + p { margin-top: .4rem; }

.credit strong {
  font-weight: 600;
  background: var(--agm-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.guide-link {
  color: var(--shadow-blue);
  text-decoration: underline;
  text-underline-offset: .3em;
  text-decoration-color: var(--scree);
  padding: .4rem .2rem;
  transition: color .2s;
}
.guide-link:hover { color: var(--blaze); }

/* ---------- reveals ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s var(--ease-hard), transform .8s var(--ease-hard);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .stamp { font-size: .72rem; letter-spacing: .13em; }
  .topbar nav { display: none; }
  .topbar .btn { margin-left: auto; }
  .exp, .exp:nth-child(odd) { grid-template-columns: 1fr; }
  .exp:nth-child(odd) .exp-media { order: 0; }
  .exp-media img { max-height: 24rem; }
  .prep-inner, .book-inner { grid-template-columns: 1fr; }
  .scroll-cue { display: none; }
  .dates { overflow-x: auto; }
  .dates table { min-width: 34rem; }
}

/* ---------- still mode (screenshots) ---------- */

.still .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
.still .ticker-track { animation: none; }
.still .peak { animation: none; transform: none; }
.still .cloud { animation: none; }

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .ticker-track { animation: none; }
  .exp-media img { transition: none; }
  .exp:hover .exp-media img { transform: none; }
}
