/* =========================================================
   FJARÐARKOLLA — design tokens
   A widebeam's site, drawn like a chart: graticule margins,
   a sounding-line that threads every page, brass for warmth.
   ========================================================= */

:root {
  /* color */
  --chart-indigo: #131f2b;
  --chart-indigo-deep: #0b1318;
  --fog-paper: #edeae1;
  --fog-paper-soft: #f6f4ee;
  --contour-teal: #3f6b64;
  --contour-teal-soft: #5d8a82;
  --brass: #b6863c;
  --brass-bright: #d6a35a;
  --flag-red: #a8362e;
  --ink: #1c2630;
  --mist: #707d82;
  --line-on-dark: rgba(237, 234, 225, 0.18);
  --line-on-light: rgba(28, 38, 48, 0.14);

  /* type */
  --f-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", serif;
  --f-body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "Space Mono", "SF Mono", Consolas, monospace;

  /* layout */
  --margin-tick: 30px;
  --container: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--f-body);
  background: var(--fog-paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--f-display);
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 13px 22px;
  border: 1px solid currentColor;
  border-radius: 2px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn--brass {
  color: var(--chart-indigo);
  background: var(--brass-bright);
  border-color: var(--brass-bright);
}
.btn--brass:hover { background: var(--brass); }

.btn--ghost-dark {
  color: var(--fog-paper);
  border-color: var(--line-on-dark);
}
.btn--ghost-dark:hover {
  border-color: var(--brass-bright);
  color: var(--brass-bright);
}

.btn--ghost-light {
  color: var(--ink);
  border-color: var(--line-on-light);
}
.btn--ghost-light:hover {
  border-color: var(--contour-teal);
  color: var(--contour-teal);
}

/* =========================================================
   Chart margin — fixed graticule tick strips, top & bottom
   ========================================================= */
.chart-margin {
  position: fixed;
  left: 0;
  right: 0;
  height: var(--margin-tick);
  z-index: 40;
  pointer-events: none;
  background: var(--chart-indigo);
  display: flex;
  align-items: center;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(237, 234, 225, 0.55);
  overflow: hidden;
}
.chart-margin--top { top: 0; }
.chart-margin--bottom { bottom: 0; }
.chart-margin .ticks {
  display: flex;
  width: 100%;
  justify-content: space-between;
  padding: 0 14px;
}
.chart-margin .ticks span { white-space: nowrap; opacity: 0.8; }
.chart-margin .ticks span:nth-child(even) { opacity: 0.35; }

body { padding-top: var(--margin-tick); padding-bottom: var(--margin-tick); }

/* =========================================================
   Nav
   ========================================================= */
.site-header {
  position: sticky;
  top: var(--margin-tick);
  z-index: 30;
  background: var(--chart-indigo);
  border-bottom: 1px solid var(--line-on-dark);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  max-width: var(--container);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-display);
  font-size: 19px;
  letter-spacing: 0.01em;
  color: var(--fog-paper);
}
.brand small {
  display: block;
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--brass-bright);
  text-transform: uppercase;
  margin-top: 2px;
}
.brand-mark { width: 22px; height: 22px; flex-shrink: 0; }

.nav-links {
  display: flex;
  gap: 30px;
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav-links a {
  color: rgba(237, 234, 225, 0.72);
  position: relative;
  padding-bottom: 4px;
}
.nav-links a:hover, .nav-links a.active { color: var(--brass-bright); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 1px;
  background: var(--brass-bright);
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--fog-paper);
  width: 28px; height: 22px;
  position: relative;
  cursor: pointer;
}
.nav-toggle span, .nav-toggle::before, .nav-toggle::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle::before { top: 4px; }
.nav-toggle span { top: 10px; }
.nav-toggle::after { top: 16px; }
.nav-toggle.is-open::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle.is-open::after { transform: translateY(-6px) rotate(-45deg); }
.nav-toggle.is-open span { opacity: 0; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--chart-indigo);
    border-bottom: 1px solid var(--line-on-dark);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .nav-links.is-open { max-height: 320px; }
  .nav-links a { padding: 16px 28px; border-top: 1px solid var(--line-on-dark); }
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  background: var(--chart-indigo);
  color: var(--fog-paper);
  overflow: hidden;
  padding: 110px 0 90px;
}
.hero-graticule {
  position: absolute;
  inset: 0;
  opacity: 0.5;
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}
.hero h1 {
  font-size: clamp(56px, 11vw, 122px);
  line-height: 0.92;
  margin: 18px 0 22px;
  color: var(--fog-paper);
}
.hero .lede {
  max-width: 480px;
  font-size: 17px;
  color: rgba(237, 234, 225, 0.78);
  margin-bottom: 34px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.waypoint {
  position: absolute;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--flag-red);
  box-shadow: 0 0 0 0 rgba(168, 54, 46, 0.6);
  animation: ping 2.6s ease-out infinite;
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(168, 54, 46, 0.55); }
  70% { box-shadow: 0 0 0 14px rgba(168, 54, 46, 0); }
  100% { box-shadow: 0 0 0 0 rgba(168, 54, 46, 0); }
}

/* =========================================================
   Sounding line — the signature divider
   ========================================================= */
.sounding {
  position: relative;
  background: var(--fog-paper);
  padding: 6px 0 0;
}
.sounding svg { display: block; width: 100%; height: 46px; }
.sounding-figures {
  display: flex;
  justify-content: space-between;
  max-width: var(--container);
  margin: -8px auto 0;
  padding: 0 28px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  color: var(--mist);
}
.sounding-figures span:nth-child(3n+1) { color: var(--contour-teal); }
.sounding--dark { background: var(--chart-indigo); }
.sounding--dark .sounding-figures { color: rgba(237,234,225,0.45); }

/* =========================================================
   Sections
   ========================================================= */
section { padding: 86px 0; }
.section-light { background: var(--fog-paper); }
.section-soft { background: var(--fog-paper-soft); }
.section-dark { background: var(--chart-indigo); color: var(--fog-paper); }

.section-head { max-width: 600px; margin-bottom: 50px; }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); margin-top: 10px; }
.section-head p { color: var(--mist); margin-top: 14px; font-size: 15.5px; }
.section-dark .section-head p { color: rgba(237,234,225,0.68); }

/* intro / story */
.lead-text {
  font-family: var(--f-display);
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.4;
  max-width: 760px;
  font-weight: 500;
}

.prose { max-width: 640px; }
.prose p { margin: 0 0 20px; color: var(--ink); font-size: 16px; }
.prose p.dim { color: var(--mist); }

.pullquote {
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(22px, 3vw, 30px);
  color: var(--contour-teal);
  border-left: 2px solid var(--brass);
  padding-left: 24px;
  margin: 40px 0;
  max-width: 560px;
}

/* =========================================================
   Cards (log preview, gallery captions)
   ========================================================= */
.grid { display: grid; gap: 28px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 880px) {
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--fog-paper-soft);
  border: 1px solid var(--line-on-light);
  padding: 22px;
}
.card .meta {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--contour-teal);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.card h3 { font-size: 20px; margin: 6px 0 10px; }
.card p { color: var(--mist); font-size: 14.5px; margin: 0 0 14px; }
.card .read-more {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--brass);
  letter-spacing: 0.04em;
}

/* placeholder photo tile (swap for real <img> later) */
.photo-tile {
  aspect-ratio: 4/3;
  background:
    repeating-linear-gradient(135deg, rgba(63,107,100,0.10) 0 2px, transparent 2px 14px),
    linear-gradient(160deg, #2b3e44, #15222a);
  border: 1px solid var(--line-on-light);
  position: relative;
  overflow: hidden;
}
.photo-tile::after {
  content: attr(data-label);
  position: absolute;
  left: 12px; bottom: 10px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: rgba(237,234,225,0.8);
}

/* =========================================================
   Spec sheet (About page)
   ========================================================= */
.specs {
  font-family: var(--f-mono);
  font-size: 14px;
  border-top: 1px solid var(--line-on-light);
}
.specs dt, .specs dd { margin: 0; padding: 13px 0; }
.specs > div {
  display: grid;
  grid-template-columns: 140px 1fr;
  border-bottom: 1px solid var(--line-on-light);
}
.specs dt { color: var(--mist); text-transform: uppercase; font-size: 11.5px; letter-spacing: 0.06em; padding-top: 16px; }
.specs dd { color: var(--ink); padding-top: 16px; }

/* =========================================================
   Log timeline (Log page)
   ========================================================= */
.timeline { position: relative; max-width: 760px; }
.timeline-rail {
  position: absolute;
  left: 7px; top: 6px; bottom: 6px;
  width: 1px;
  background: var(--line-on-light);
}
.entry {
  position: relative;
  padding: 0 0 56px 38px;
}
.entry:last-child { padding-bottom: 0; }
.entry::before {
  content: "";
  position: absolute;
  left: 0; top: 4px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--fog-paper);
  border: 2px solid var(--contour-teal);
}
.entry .meta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mist);
  margin-bottom: 10px;
}
.entry .meta-row b { color: var(--contour-teal); font-weight: 600; }
.entry h3 { font-size: 23px; margin: 0 0 12px; }
.entry p { color: var(--ink); font-size: 15.5px; margin: 0 0 16px; }
.entry .entry-photo { margin-top: 16px; max-width: 360px; }
.log-empty { display: none; }

.log-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 44px;
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.log-filters button {
  background: none;
  border: 1px solid var(--line-on-light);
  color: var(--mist);
  padding: 8px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.log-filters button.active,
.log-filters button:hover {
  border-color: var(--contour-teal);
  color: var(--contour-teal);
}

/* photo hero — real photo with a chart-indigo wash so text stays legible */
.hero--photo {
  background-size: cover;
  background-position: center 60%;
}
.hero--photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(165deg, rgba(11,19,24,0.90) 0%, rgba(19,31,43,0.72) 45%, rgba(11,19,24,0.92) 100%);
}

/* gallery — real photos */
.gallery-item {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  aspect-ratio: 4/3;
  overflow: hidden;
  position: relative;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s ease, transform 0.4s ease;
}
.gallery-item:hover img { opacity: 0.88; transform: scale(1.03); }

.lightbox-img {
  width: 100%;
  display: block;
  border: 1px solid var(--line-on-dark);
  max-height: 78vh;
  object-fit: contain;
  background: var(--chart-indigo-deep);
}

/* =========================================================
   Gallery + lightbox
   ========================================================= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 760px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
.gallery-grid .photo-tile { cursor: pointer; transition: opacity 0.15s ease; }
.gallery-grid .photo-tile:hover { opacity: 0.85; }

.lightbox {
  position: fixed; inset: 0;
  background: rgba(11, 19, 24, 0.92);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
}
.lightbox.is-open { display: flex; }
.lightbox-inner { max-width: 720px; width: 100%; }
.lightbox .photo-tile { aspect-ratio: 3/2; }
.lightbox-caption {
  font-family: var(--f-mono);
  font-size: 12px;
  color: rgba(237,234,225,0.7);
  margin-top: 14px;
  text-align: center;
}
.lightbox-close {
  position: absolute;
  top: 50px; right: 36px;
  color: var(--fog-paper);
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  background: none;
  border: 1px solid var(--line-on-dark);
  padding: 8px 14px;
  cursor: pointer;
}

/* =========================================================
   Follow / contact
   ========================================================= */
.follow-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
@media (max-width: 760px) { .follow-grid { grid-template-columns: 1fr; gap: 40px; } }
.social-list { list-style: none; padding: 0; margin: 18px 0 0; font-family: var(--f-mono); font-size: 14px; }
.social-list li { border-top: 1px solid var(--line-on-dark); padding: 14px 0; display: flex; justify-content: space-between; }
.social-list a:hover { color: var(--brass-bright); }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: var(--chart-indigo-deep);
  color: rgba(237, 234, 225, 0.55);
  padding: 36px 0;
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
}
.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* =========================================================
   Reveal-on-scroll
   ========================================================= */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .waypoint { animation: none; }
  html { scroll-behavior: auto; }
}

/* focus visibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--brass-bright);
  outline-offset: 3px;
}
