/* ============================================================
   Our Sailing Adventure — editorial travel-journal aesthetic
   Palette: warm cream, deep ink, terracotta accent, sage past
   ============================================================ */

:root {
  --ink:        #1a1814;
  --ink-soft:   #4a423a;
  --ink-mute:   #7a7065;
  --paper:      #f5ecdc;
  --paper-2:    #ebe1cf;
  --paper-3:    #e0d5bf;
  --line:       #d2c5ac;
  --line-soft:  #e2d6bf;
  --accent:     #c2553a;       /* terracotta — current */
  --accent-deep:#9a3f2a;
  --accent-2:   #5d7d6e;       /* muted sage — past stops */
  --shadow-sm:  0 1px 2px rgba(26,24,20,.08);
  --shadow:     0 2px 6px rgba(26,24,20,.08), 0 12px 28px rgba(26,24,20,.10);
  --shadow-lg:  0 24px 64px rgba(26,24,20,.18);

  --timeline-h: 140px;
}

* { box-sizing: border-box; }
a { color: inherit; text-decoration: none; }

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* paper grain over the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  background-image:
    radial-gradient(rgba(26,24,20,0.025) 1px, transparent 1.2px);
  background-size: 3px 3px;
  mix-blend-mode: multiply;
  opacity: .6;
}

/* ============================================================
   STAGE — first-screen section holding the map + timeline
   ============================================================ */
.stage {
  position: relative;
  width: 100%;
  height: 100vh;            /* fallback for older browsers */
  height: 100svh;           /* small viewport — stable on mobile */
  min-height: 100vh;        /* belt-and-suspenders: never collapse */
  overflow: hidden;
}
@supports (height: 100dvh) {
  .stage { height: 100dvh; }
}

/* MAP -------------------------------------------------------- */
#map {
  position: absolute;
  inset: 0 0 var(--timeline-h) 0;
  background: var(--paper);
  z-index: 1;
}

/* tone the standard OSM tiles toward warm paper */
.leaflet-tile {
  filter: sepia(.35) saturate(.75) brightness(1.04) contrast(.92) hue-rotate(-6deg);
}

/* Leaflet UI tweaks */
.leaflet-control-attribution {
  background: rgba(245, 236, 220, .88) !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 9.5px !important;
  color: var(--ink-mute) !important;
  border-top-left-radius: 3px;
}
.leaflet-control-attribution a { color: var(--accent-deep) !important; }

.leaflet-control-zoom {
  border: none !important;
  box-shadow: var(--shadow-sm) !important;
}
.leaflet-control-zoom a {
  background: var(--paper) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
  font-family: 'Fraunces', Georgia, serif !important;
  font-weight: 500 !important;
}
.leaflet-control-zoom a:hover { background: var(--paper-2) !important; }

/* HEADER ----------------------------------------------------- */
.brand {
  position: absolute;
  top: 22px; left: 24px;
  z-index: 500;
  pointer-events: none;
  max-width: 70vw;
}
.brand h1 {
  margin: 0;
  line-height: 1;
  color: var(--ink);
  text-shadow: 0 1px 0 rgba(245, 236, 220, .8);
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}
.brand-name {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: clamp(24px, 3.4vw, 38px);
  letter-spacing: -0.01em;
  line-height: 1;
}
.brand-amp {
  font-family: 'Cormorant Garamond', 'DM Serif Display', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
  font-size: 1.15em;
  margin: 0 0.08em;
  vertical-align: -0.05em;
}
.brand-sub-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(14px, 1.8vw, 20px);
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-soft);
  position: relative;
  top: -0.18em;
}
.brand-the {
  font-style: italic;
  font-weight: 400;
  font-size: 0.55em;
  color: var(--ink-soft);
  letter-spacing: 0;
  vertical-align: 0.15em;
  margin: 0 0.15em;
}
.brand-the:first-child { margin-left: 0; }
.brand-sub {
  margin: 4px 0 0;
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
  text-shadow: 0 1px 0 rgba(245,236,220,.8);
}

/* TOP-NAV (about + contact buttons, top-right) ----------------- */
.top-nav {
  position: absolute;
  top: 26px; right: 24px;
  z-index: 500;
  display: inline-flex;
  gap: 8px;
}

/* ABOUT / CONTACT button ------------------------------------- */
.about-btn {
  background: transparent;
  border: 1px solid var(--ink);
  color: var(--ink);
  padding: 6px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 999px;
  transition: all .18s ease;
  backdrop-filter: blur(2px);
  /* anchor reset */
  display: inline-block;
  text-decoration: none;
  line-height: 1.4;
}
.about-btn:hover {
  background: var(--ink);
  color: var(--paper);
}

/* RESET button ----------------------------------------------- */
.reset-btn {
  position: absolute;
  right: 24px;
  bottom: calc(var(--timeline-h) + 18px);
  z-index: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 7px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
  transition: all .15s ease;
}
.reset-btn:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.reset-btn svg { display: block; }

/* SCROLL CUE — bottom of stage ------------------------------- */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: calc(var(--timeline-h) + 14px);
  transform: translateX(-50%);
  z-index: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: rgba(245,236,220,.85);
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: all .18s ease;
  backdrop-filter: blur(2px);
}
.scroll-cue:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.scroll-cue svg {
  animation: nudge 1.8s ease-in-out infinite;
}
@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(2px); }
}

/* TIMELINE STRIP --------------------------------------------- */
.timeline-wrap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: var(--timeline-h);
  background: var(--paper);
  border-top: 1px solid var(--line);
  z-index: 400;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 24px rgba(26,24,20,.06);
}
.timeline-wrap::before {
  /* deckle / paper edge stripe */
  content: "";
  position: absolute;
  left: 0; right: 0; top: -1px;
  height: 1px;
  background: repeating-linear-gradient(
    to right,
    var(--line) 0 8px,
    transparent 8px 14px
  );
}

.timeline-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 8px 24px 6px;
  border-bottom: 1px solid var(--line-soft);
}
.th-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink-mute);
}
.th-meta {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 13px;
  color: var(--ink-soft);
}

.timeline {
  flex: 1;
  display: flex;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px 24px 12px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  position: relative;
}
.timeline::-webkit-scrollbar { height: 6px; }
.timeline::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.timeline::-webkit-scrollbar-track { background: transparent; }

/* a thin hairline running through all entries */
.timeline::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: 18px;
  top: auto;
  height: 1px;
  background: var(--line-soft);
  pointer-events: none;
  z-index: 0;
}

.entry {
  position: relative;
  flex: 0 0 auto;
  width: 220px;
  margin-right: 14px;
  padding: 4px 14px 16px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  scroll-snap-align: start;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
  z-index: 1;
}
.entry:hover {
  background: var(--paper-2);
  border-color: var(--line);
}
.entry.active {
  background: var(--paper-2);
  border-color: var(--ink);
  transform: translateY(-2px);
}

/* timeline dot, sitting on the hairline */
.entry::before {
  content: "";
  position: absolute;
  left: 14px;
  bottom: -2px;
  top: auto;
  transform: none;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent-2);
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 1px var(--line);
  z-index: 2;
}
.entry.current::before {
  background: var(--accent);
  width: 11px; height: 11px;
  bottom: -3px;
}
.entry.current::after {
  content: "";
  position: absolute;
  left: 9px; bottom: -7px; top: auto;
  width: 19px; height: 19px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  animation: pulse 2.4s ease-out infinite;
  z-index: 1;
}

@keyframes pulse {
  0%   { transform: scale(.55); opacity: .85; }
  100% { transform: scale(1.6);  opacity: 0;   }
}

.entry .e-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  text-transform: uppercase;
  padding-left: 18px;
}
.entry .e-place {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 4px 0 1px;
  line-height: 1.15;
}
.entry .e-country {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 12.5px;
  color: var(--ink-soft);
}
.entry .e-badge {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.16em;
  background: var(--accent);
  color: var(--paper);
  padding: 2px 7px;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: 2px;
  text-transform: uppercase;
}

/* MAP MARKERS ------------------------------------------------ */
.marker-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent-2);
  border: 2.5px solid var(--paper);
  box-shadow: 0 2px 5px rgba(0,0,0,.25);
  cursor: pointer;
  transition: transform .18s ease;
}
.leaflet-marker-icon:hover .marker-dot { transform: scale(1.3); }

.marker-current {
  position: relative;
  width: 18px; height: 18px;
}
.marker-current .dot {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent);
  border: 2.5px solid var(--paper);
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.marker-current .ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  animation: pulseRing 2.2s ease-out infinite;
}
@keyframes pulseRing {
  0%   { transform: scale(.6); opacity: .9; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* POPUP ------------------------------------------------------ */
.leaflet-popup-content-wrapper {
  background: var(--paper) !important;
  border-radius: 4px !important;
  box-shadow: var(--shadow) !important;
  padding: 0 !important;
  border: 1px solid var(--line);
}
.leaflet-popup-tip {
  background: var(--paper) !important;
  border: 1px solid var(--line);
}
.leaflet-popup-content {
  margin: 0 !important;
  width: 290px !important;
  font-family: 'Inter Tight', sans-serif;
}
.leaflet-popup-close-button {
  color: var(--ink-mute) !important;
  font-size: 22px !important;
  font-family: 'Fraunces', serif !important;
  padding: 6px 9px 0 0 !important;
}

.popup { padding: 16px 18px 14px; }
.popup .pop-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  text-transform: uppercase;
}
.popup .pop-place {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 4px 0 1px;
  line-height: 1.1;
}
.popup .pop-country {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.popup .pop-photo {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 3px;
  margin: 4px 0 12px;
  display: block;
  background: var(--paper-2);
  border: 1px solid var(--line-soft);
}
.popup .pop-note {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 14.5px;
  line-height: 1.55;
  font-style: italic;
  color: var(--ink-soft);
  margin: 0 0 12px;
}
.popup .pop-note::before { content: "“ "; color: var(--accent); }
.popup .pop-note::after  { content: " ”"; color: var(--accent); }

.popup .pop-links {
  display: flex; gap: 6px; flex-wrap: wrap;
  border-top: 1px dashed var(--line);
  padding-top: 11px;
}
.popup .pop-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  transition: all .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.popup .pop-link:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

/* ============================================================
   ABOUT SECTION (below the stage)
   ============================================================ */
.about-section {
  position: relative;
  width: 100%;
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding: 80px 24px 60px;
  /* deckle stripe at the top edge — same visual language as the timeline */
}
.about-section::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: -1px;
  height: 1px;
  background: repeating-linear-gradient(
    to right,
    var(--line) 0 8px,
    transparent 8px 14px
  );
  pointer-events: none;
}

.about-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: left;
}

.about-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--accent-deep);
  text-transform: uppercase;
  margin: 0 0 8px;
}
.about-section h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-variation-settings: "opsz" 144;
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: -0.02em;
  margin: 0 0 22px;
  line-height: 1.05;
}
.about-section p {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 0 16px;
}

.about-soft {
  font-size: 13px !important;
  color: var(--ink-mute) !important;
  border-top: 1px dashed var(--line);
  padding-top: 16px;
  margin-top: 22px !important;
}
.about-foot {
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 10.5px !important;
  letter-spacing: 0.1em;
  color: var(--ink-mute) !important;
  margin-top: 20px !important;
  margin-bottom: 0 !important;
  text-transform: uppercase;
}

/* ABOUT — small inline photo between heading and body text */
.about-photo {
  margin: 0 auto 22px;
  max-width: 250px;
  max-height: 250px;
  overflow: hidden;
  border-radius: 4px;
  width: fit-content;
  display: block;
}
.about-photo img {
  display: block;
  max-width: 250px;
  max-height: 250px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: sepia(.18) saturate(.88) contrast(.96);
}

/* ABOUT — social icon links */
.about-socials {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 4px 0 16px;
}
.about-social {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  padding: 6px 11px 6px 9px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  transition: all .15s ease;
}
.about-social:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.about-social svg {
  display: block;
  flex-shrink: 0;
}

/* BACK TO TOP -------------------------------------------------- */
.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  padding: 7px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  text-decoration: none;
  transition: all .18s ease;
}
.back-to-top:hover {
  background: var(--ink);
  color: var(--paper);
}

/* RESPONSIVE -------------------------------------------------- */
@media (max-width: 720px) {
  :root { --timeline-h: 185px; }

  /* Brand: stack the name and subtitle vertically, cap width so it
     never reaches under the top-right buttons. */
  .brand {
    top: 14px;
    left: 16px;
    /* leave a generous corridor on the right for the two pill buttons */
    max-width: calc(100vw - 180px);
  }
  .brand h1 {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .brand-name {
    font-size: 22px;
    line-height: 1.05;
  }
  .brand-sub-title {
    font-size: 10.5px;
    letter-spacing: 0.28em;
    top: 0;          /* cancel the desktop baseline lift */
  }
  .brand-sub {
    font-size: 11px;
    margin-top: 6px;
  }

  /* Top-right nav: keep on one row, smaller pills, tighter gap.
     If it ever needs to wrap (very narrow phone), let it. */
  .top-nav {
    top: 14px;
    right: 12px;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 160px;
  }
  .about-btn {
    padding: 5px 10px;
    font-size: 9px;
    letter-spacing: 0.14em;
  }

  .reset-btn {
    right: 12px;
    bottom: calc(var(--timeline-h) + 12px);
    padding: 6px 10px;
    font-size: 9px;
    letter-spacing: 0.1em;
  }
  .scroll-cue {
    bottom: calc(var(--timeline-h) + 8px);
    font-size: 9px;
    padding: 5px 10px;
    letter-spacing: 0.14em;
  }

  .timeline-head { padding: 10px 16px 6px; }
  .timeline { padding: 12px 16px 16px; }
  .entry { width: 180px; }
  .entry .e-place { font-size: 17px; }

  .leaflet-popup-content { width: 240px !important; }
  .popup .pop-place { font-size: 21px; }

  .about-section { padding: 56px 20px 48px; }
  .about-section h2 { font-size: 26px; }
  .about-section p { font-size: 15.5px; }
}

/* Extra-small phones — iPhone SE, older Androids (~360px wide).
   At this width the two-pill nav can't sit beside the brand, so we
   simplify: tighter pills, smaller brand, and we collapse the
   subtitle row onto its own line. */
@media (max-width: 400px) {
  .brand {
    max-width: calc(100vw - 150px);
  }
  .brand-name { font-size: 20px; }
  .brand-sub-title { font-size: 10px; letter-spacing: 0.24em; }
  .brand-sub { font-size: 10.5px; }

  .top-nav {
    max-width: 140px;
    gap: 4px;
  }
  .about-btn {
    padding: 4px 8px;
    font-size: 8.5px;
    letter-spacing: 0.12em;
  }
}

/* ============================================================
   CONTACT SECTION (mirrors .about-section, with form styling)
   ============================================================ */
.contact-section {
  /* tonal shift to gently distinguish from About — same family,
     a hair warmer/lighter so the eye registers a new beat */
  background: var(--paper-2);
}
.contact-section::before {
  /* same deckle stripe as About, kept consistent */
  background: repeating-linear-gradient(
    to right,
    var(--line) 0 8px,
    transparent 8px 14px
  );
}

/* FORM ------------------------------------------------------- */
.contact-form {
  margin: 8px 0 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cf-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cf-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.cf-opt {
  /* "(optional)" — kept lowercase, in italic serif, to feel like a margin note */
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 11.5px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-mute);
  margin-left: 4px;
}

.cf-input {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 10px 12px;
  outline: none;
  width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  -webkit-appearance: none;
  appearance: none;
}
.cf-input::placeholder { color: var(--ink-mute); }
.cf-input:hover { border-color: var(--ink-mute); }
.cf-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(194, 85, 58, 0.15);
  background: var(--paper);
}
.cf-input:invalid:not(:placeholder-shown):not(:focus) {
  /* gentle, only-after-the-user-has-tried flag */
  border-color: var(--accent-deep);
}

.cf-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.55;
  font-style: italic;
}

/* Honeypot — visually hidden but still in the form */
.cf-hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* SUBMIT BUTTON --------------------------------------------- */
.cf-submit {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 10px 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
  transition: all .18s ease;
}
.cf-submit:hover {
  background: var(--accent);
  border-color: var(--accent);
}
.cf-submit:active { transform: translateY(1px); }
.cf-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: var(--ink-mute);
  border-color: var(--ink-mute);
}

.cf-submit svg { display: block; }

/* STATUS LINE ----------------------------------------------- */
.cf-status {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 14px;
  margin: 4px 0 0 !important;
  min-height: 1.2em;
  color: var(--ink-soft);
}
.cf-status.success { color: var(--accent-2); }
.cf-status.error   { color: var(--accent-deep); }

/* MAILTO link in soft footnote ------------------------------ */
.cf-mailto {
  color: var(--accent-deep);
  border-bottom: 1px solid var(--line);
  transition: border-color .15s ease, color .15s ease;
}
.cf-mailto:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* RESPONSIVE — contact -------------------------------------- */
@media (max-width: 720px) {
  .cf-input { font-size: 15.5px; padding: 9px 11px; }
  .cf-submit { width: 100%; justify-content: center; }
}


/* ============================================================
   SCROLL-TO-TOP — floating button, appears after leaving stage
   ============================================================ */
.scroll-top-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 600;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--shadow);
  /* Hidden by default — JS toggles `.is-visible` once we're scrolled */
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.scroll-top-btn.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.scroll-top-btn:hover {
  background: var(--ink);
  color: var(--paper);
}
.scroll-top-btn:active {
  transform: translateY(1px) scale(0.98);
}
.scroll-top-btn:focus-visible {
  outline: none;
  box-shadow: var(--shadow), 0 0 0 3px rgba(194, 85, 58, 0.25);
}
.scroll-top-btn svg { display: block; }

@media (max-width: 720px) {
  .scroll-top-btn {
    right: 16px;
    bottom: 16px;
    width: 40px;
    height: 40px;
  }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  .scroll-top-btn { transition: opacity .15s ease; }
}