/* Field Story: Satima in the rain. All rules are scoped under .sg-satima. */

/* Tokens */
.sg-satima {
  --color-bg: #f1eee3;
  --color-surface: #fcf9f0;
  --color-text: #20251d;
  --color-divider: #d9d6c6;
  --color-neutral-100: #faf8f1;
  --color-neutral-600: #767a68;
  --color-neutral-700: #626755;
  --color-neutral-800: #3d4438;
  --color-neutral-900: #20251d;
  --color-accent: #9d5233;
  --color-accent-700: #703a24;
  --color-accent-800: #56301f;
  --color-accent-2: #3d7157;
  --color-accent-2-100: #e6ece4;
  --color-accent-2-600: #335f49;
  --color-accent-2-800: #1f3a2c;
  --map-ink: #10540d;
  --map-wash-opacity: 1;
  --map-wash-blend: normal;
  --puck: #e2772b;
  --page-grid: rgba(32, 37, 29, 0.035);
  --font-heading: "Forta", "Jost", system-ui, sans-serif;
  --font-body: "Jost", system-ui, sans-serif;
  --radius-sm: 2px;
  --radius-md: 3px;
  --radius-lg: 4px;
  --shadow-md: 0 2px 10px rgba(32, 37, 29, 0.1);
  --shadow-lg: 0 10px 30px rgba(32, 37, 29, 0.16);
  --pad-x: clamp(20px, 6vw, 96px);
  --pad-top: clamp(72px, 10vw, 128px);
}

html[data-theme="dark"] .sg-satima {
  --color-bg: #1b1e19;
  --color-surface: #242822;
  --color-text: #ece9dd;
  --color-divider: #3a3f36;
  --color-neutral-100: #2a2e28;
  --color-neutral-600: #9fa393;
  --color-neutral-700: #b4b7a7;
  --color-neutral-800: #d6d4c7;
  --color-neutral-900: #ece9dd;
  --color-accent: #c9825f;
  --color-accent-700: #e3ab87;
  --color-accent-800: #f0c7ab;
  --color-accent-2: #6fa588;
  --color-accent-2-100: #27352c;
  --color-accent-2-600: #8dbb9f;
  --color-accent-2-800: #c7e0d1;
  --map-ink: #9ccf8a;
  --map-wash-blend: screen;
  --page-grid: rgba(236, 233, 221, 0.035);
  --shadow-md: 0 2px 10px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Page ground */
.sg-satima {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  min-height: 100vh;
  padding: 68px 0 140px;
  background-color: var(--color-bg);
  background-image:
    linear-gradient(var(--page-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--page-grid) 1px, transparent 1px);
  background-size: 28px 28px;
  background-repeat: repeat;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  text-wrap: pretty;
  transition: background-color 1.4s ease, color 1.4s ease;
}

@media (min-width: 768px) {
  .sg-satima {
    padding-top: 88px;
  }
}

.sg-satima.is-cold {
  background-color: oklch(0.24 0.03 250);
  color: var(--color-bg);
}

.sg-satima *,
.sg-satima *::before,
.sg-satima *::after {
  box-sizing: border-box;
}

.sg-satima a {
  color: var(--color-accent-700);
  text-underline-offset: 3px;
}

.sg-satima a:hover {
  color: var(--color-accent-800);
}

.sg-satima__body a:not(.sg-satima__film-placeholder) {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.sg-satima a:focus-visible,
.sg-satima button:focus-visible {
  outline: 2px solid var(--color-accent-2);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.sg-satima h1,
.sg-satima h2,
.sg-satima h3 {
  color: inherit;
  font-family: var(--font-heading);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.05;
}

.sg-satima img,
.sg-satima video {
  max-width: 100%;
}

.sg-satima .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Kickers */
.sg-satima__kicker,
.sg-satima__card-kicker {
  color: var(--color-accent);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sg-satima__kicker--lg {
  font-size: 12px;
}

.sg-satima__kicker--block {
  display: block;
  margin: 0 0 10px;
}

/* Hero */
.sg-satima__hero {
  padding: 4px 12px 0;
}

.sg-satima__hero-image {
  position: relative;
  height: clamp(360px, 64vh, 700px);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.sg-satima__hero-image picture,
.sg-satima__hero-image img {
  display: block;
  width: 100%;
  height: 100%;
}

.sg-satima__hero-image img {
  object-fit: cover;
  object-position: center 62%;
}

.sg-satima__hero-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 760px;
  margin: -72px clamp(12px, 5vw, 84px) 0;
  padding: clamp(22px, 3.5vw, 40px) clamp(22px, 3.5vw, 44px) clamp(18px, 3vw, 32px);
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  color: var(--color-text);
}

.sg-satima__title {
  margin: 0;
  font-size: clamp(42px, 6.6vw, 92px);
  line-height: 1;
}

.sg-satima__subtitle {
  max-width: 600px;
  margin: 0;
  color: var(--color-neutral-800);
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.5;
}

.sg-satima__hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 22px;
  margin-top: 6px;
  color: var(--color-neutral-700);
  font-size: 13px;
}

.sg-satima__hero-meta strong {
  color: var(--color-text);
  font-weight: 700;
}

/* Direction control */
.sg-satima__direction {
  display: inline-flex;
  align-self: flex-start;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--color-bg);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
}

.sg-satima__direction label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 7px 12px;
  color: var(--color-text);
  font-size: 13px;
  cursor: pointer;
}

.sg-satima__direction label + label {
  border-left: 1px solid var(--color-divider);
}

.sg-satima__direction input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.sg-satima__direction label:has(input:checked) {
  background: var(--color-accent-2);
  color: var(--color-bg);
}

.sg-satima__direction label:not(:has(input:checked)):hover {
  background: color-mix(in srgb, var(--color-text) 7%, transparent);
}

.sg-satima__direction label:has(input:focus-visible) {
  outline: 2px solid var(--color-accent-2);
  outline-offset: -2px;
}

/* Story body. Without JavaScript this is a plain article. */
.sg-satima__body {
  padding: 0 var(--pad-x);
}

.sg-satima__body > h2:not(:first-child) {
  margin-top: var(--pad-top);
}

.sg-satima__body > h2:first-child {
  margin-top: var(--pad-top);
}

.sg-satima__body h2 {
  max-width: 760px;
  margin: 0 0 28px;
  font-size: clamp(26px, 3.8vw, 46px);
  letter-spacing: 0.02em;
  scroll-margin-top: 96px;
}

.sg-satima__body h3 {
  margin: 28px 0 10px;
  font-size: 20px;
}

.sg-satima__body p,
.sg-satima__body ul,
.sg-satima__body ol {
  max-width: 640px;
  margin: 0 0 1em;
  font-size: 18px;
  line-height: 1.65;
}

.sg-satima__body hr {
  max-width: 640px;
  margin: var(--pad-top) 0 0;
  border: 0;
  border-top: 1px solid var(--color-divider);
}

.sg-satima__body blockquote {
  max-width: 640px;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  color: inherit;
  font-family: var(--font-body);
  font-size: clamp(22px, 2.4vw, 30px);
  font-style: normal;
  font-weight: 500;
  line-height: 1.3;
}

.sg-satima__body blockquote p {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
}

/* Chapter meta line: the first italic-only paragraph after a chapter heading. */
.sg-satima__body h2 + p:has(> em:only-child),
.sg-satima__body .sg-satima__meta {
  color: var(--color-neutral-700);
  font-size: 12px;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-transform: uppercase;
}

.sg-satima__body h2 + p > em:only-child,
.sg-satima__meta em {
  font-style: normal;
}

.sg-satima__chapter-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.sg-satima__chapter-head .sg-satima__meta {
  margin: 0;
  max-width: none;
}

.sg-satima__numeral {
  color: var(--color-accent-700);
  font-family: var(--font-heading);
  font-size: 15px;
}

/* Journal label: a bold-only paragraph that starts with "Journal ·". */
.sg-satima__journal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}

.sg-satima__body .sg-satima__journal {
  margin: 0 0 14px;
  color: var(--color-neutral-700);
  font-size: 13px;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-transform: uppercase;
}

.sg-satima__journal strong {
  font-weight: 400;
}

.sg-satima__journal::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-neutral-600);
}

.sg-satima__journal.is-tent::before {
  background: var(--color-accent-2-600);
}

/* Figures */
.sg-satima__body figure {
  max-width: 760px;
  margin: 16px 0 32px;
}

.sg-satima__body figure.kg-width-wide {
  max-width: 960px;
}

.sg-satima__body figure.kg-width-full {
  max-width: 1100px;
}

.sg-satima__body figure img,
.sg-satima__body figure video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
}

.sg-satima__body figure picture {
  display: block;
}

.sg-satima__body figure video {
  background: var(--color-neutral-900);
}

.sg-satima__body figcaption {
  margin-top: 8px;
  color: var(--color-neutral-700);
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
}

.sg-satima__body img[src*="/campsite"] { object-position: center 40%; }
.sg-satima__body img[src*="/nipple-rock"] { object-position: center 55%; }
.sg-satima__body img[src*="/fog-cliffs"] { object-position: center 60%; }
.sg-satima__body img[src*="/moorland-down"] { object-position: center 60%; }

/* Figure grid: wide image cards next to each other. */
.sg-satima__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--grid-min, 280px), 1fr));
  gap: 16px;
  max-width: var(--grid-max, 1100px);
  margin: 16px 0 32px;
}

.sg-satima__body .sg-satima__grid figure {
  max-width: none;
  margin: 0;
}

.sg-satima__grid figure img {
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
}

/* Chapter sections */
.sg-satima__section {
  padding-top: var(--pad-top);
}

.sg-satima__section > :last-child {
  margin-bottom: 0;
}

.sg-satima__section--text {
  padding-bottom: 24px;
}

/* Split: text column beside one figure. */
.sg-satima__split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(20px, 4vw, 56px);
  align-items: start;
  max-width: 1100px;
}

.sg-satima__body .sg-satima__split figure {
  margin: 0;
}

.sg-satima__split-text > :last-child {
  margin-bottom: 0;
}

/* Summit night */
.sg-satima__section--night {
  padding-top: clamp(40px, 6vw, 72px);
  padding-bottom: clamp(40px, 6vw, 72px);
}

.sg-satima__section--night .sg-satima__split {
  align-items: center;
}

.sg-satima__body .sg-satima__section--night .sg-satima__split figure {
  max-width: 520px;
}

.sg-satima__section--night .sg-satima__split-text p {
  margin: 0;
  opacity: 0.85;
}

.sg-satima__body .sg-satima__section--night .sg-satima__split + figure {
  margin: clamp(24px, 4vw, 48px) 0 0;
}

.sg-satima__section--night figcaption,
.sg-satima.is-cold .sg-satima__body figcaption,
.sg-satima.is-cold .sg-satima__body .sg-satima__meta,
.sg-satima.is-cold .sg-satima__body .sg-satima__journal {
  color: inherit;
  opacity: 0.75;
}

/* Practical cards */
.sg-satima__section--cards h2,
.sg-satima__section--film h2 {
  margin-bottom: 12px;
}

.sg-satima__section--cards h2 + p,
.sg-satima__section--film h2 + p {
  max-width: 640px;
  margin: 0 0 28px;
  color: var(--color-neutral-800);
  font-size: 17px;
  line-height: 1.6;
}

.sg-satima__section--film h2 + p {
  margin-bottom: 24px;
}

.sg-satima__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  max-width: 1100px;
}

.sg-satima__card {
  display: flex;
  flex-direction: column;
  gap: 8.8px;
  padding: 22px;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  color: var(--color-text);
}

.sg-satima__body .sg-satima__card h3.sg-satima__card-kicker {
  margin: 0;
  color: var(--color-accent);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.55;
}

.sg-satima__body .sg-satima__card-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 17px;
  line-height: 1.2;
}

.sg-satima__card-title strong {
  font-weight: 400;
}

.sg-satima__body .sg-satima__card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}

.sg-satima__body .sg-satima__card p:not(.sg-satima__card-title):not(.sg-satima__tags):not(.sg-satima__card-link) {
  opacity: 0.8;
}

.sg-satima__body .sg-satima__tags {
  margin-top: auto;
  padding-top: 8px;
}

.sg-satima__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sg-satima__tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: var(--color-neutral-100);
  border-radius: var(--radius-md);
  color: var(--color-neutral-800);
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.sg-satima__tag:first-child {
  background: var(--color-accent-2-100);
  color: var(--color-accent-2-800);
}

.sg-satima__body table {
  width: 100%;
  margin: 0;
  border: 0;
  border-collapse: collapse;
  background: none;
  font-size: 14px;
}

.sg-satima__body thead,
.sg-satima__body tbody,
.sg-satima__body tr,
.sg-satima__body th,
.sg-satima__body td {
  border: 0;
  background: none;
  text-align: left;
  vertical-align: middle;
  word-break: normal;
}

.sg-satima__body th {
  padding: 8.8px;
  border-bottom: 1px solid var(--color-divider);
  color: var(--color-neutral-700);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sg-satima__body td {
  padding: 8.8px;
  border-bottom: 1px solid color-mix(in srgb, var(--color-text) 8%, transparent);
}

.sg-satima__body tbody tr:hover {
  background: color-mix(in srgb, var(--color-text) 4%, transparent);
}

/* Film */
.sg-satima__film-placeholder {
  display: block;
  max-width: 1100px;
  color: inherit;
  text-decoration: none;
}

.sg-satima__body a.sg-satima__film-placeholder:hover {
  color: inherit;
}

.sg-satima__film-frame {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-neutral-900);
  border-radius: var(--radius-lg);
}

.sg-satima__film-frame picture {
  display: block;
  height: 100%;
}

.sg-satima__film-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.sg-satima__film-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  color: var(--color-bg);
  text-align: center;
}

.sg-satima__film-play {
  flex: none;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  background: var(--color-accent-2);
  border-radius: 50%;
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease;
}

.sg-satima__film-play svg,
.sg-satima__film-play svg * {
  fill: none;
  stroke: currentColor;
}

.sg-satima__film-placeholder:hover .sg-satima__film-play {
  transform: scale(1.06);
}

.sg-satima__film-title {
  font-family: var(--font-heading);
  font-size: clamp(20px, 2.6vw, 30px);
  letter-spacing: 0.03em;
  line-height: 1.1;
}

.sg-satima__film-sub {
  font-size: 14px;
  opacity: 0.85;
}

.sg-satima__body .kg-embed-card {
  display: block;
  max-width: 1100px;
  aspect-ratio: 16 / 9;
  margin: 0;
  overflow: hidden;
  background: var(--color-neutral-900);
  border-radius: var(--radius-lg);
}

.sg-satima__body .kg-embed-card iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.sg-satima__body .sg-satima__film-link {
  margin-top: 12px;
  font-size: 14px;
}

/* Colophon */
.sg-satima__section--colophon {
  padding-top: clamp(48px, 6vw, 80px);
}

.sg-satima__section--colophon hr {
  display: none;
}

.sg-satima__body .sg-satima__section--colophon p {
  margin: 0;
  color: var(--color-neutral-700);
  font-size: 13px;
  line-height: 1.6;
}

.sg-satima__section--night > hr {
  display: none;
}

/* Background map */
.sg-satima__map {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.sg-satima__map svg {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0.62;
  transition: opacity 1.2s ease;
}

.sg-satima[data-direction="calm"] .sg-satima__map svg {
  opacity: 0.72;
}

.sg-satima__map .is-framed {
  transition: transform 1.2s ease;
}

.sg-satima__map .sg-satima__puck {
  transition: transform 0.6s ease;
}

.sg-satima__map .sg-satima__wash {
  opacity: var(--map-wash-opacity);
  mix-blend-mode: var(--map-wash-blend);
}

.sg-satima__map .sg-satima__contour {
  fill: none;
  stroke: var(--map-ink);
  stroke-width: 1;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.sg-satima__map text {
  fill: var(--map-ink);
  font-family: var(--font-body);
}

.sg-satima__map .sg-satima__waypoint text {
  font-size: 12.5px;
  font-weight: 600;
  paint-order: stroke;
  stroke: var(--color-bg);
  stroke-width: 4px;
  stroke-linejoin: round;
}

.sg-satima__map .sg-satima__pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: sg-pulse 2.4s ease-out infinite;
}

/* Weather layers */
.sg-satima__rain {
  position: fixed;
  inset: 0;
  z-index: 45;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 2.4s ease;
}

.sg-satima__rain i {
  position: absolute;
  top: 0;
  width: 1px;
  border-radius: 2px;
  animation-name: sg-rain;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.sg-satima__mist {
  position: fixed;
  inset: -20%;
  z-index: 44;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(ellipse 48% 38% at 28% 38%, rgba(236, 232, 226, 0.75), transparent 70%),
    radial-gradient(ellipse 44% 34% at 74% 66%, rgba(236, 232, 226, 0.6), transparent 70%);
  animation: sg-drift 48s ease-in-out infinite alternate;
  transition: opacity 2.2s ease;
}

.sg-satima[data-direction="calm"] .sg-satima__rain,
.sg-satima[data-direction="calm"] .sg-satima__mist {
  opacity: 0 !important;
}

/* Data strip, desktop */
.sg-satima__strip {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  display: none;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 0 clamp(14px, 2vw, 28px);
  align-items: center;
  height: 84px;
  padding: 0 22px 0 24px;
  background: color-mix(in srgb, var(--color-surface) 92%, transparent);
  backdrop-filter: blur(10px);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  color: var(--color-text);
  transform: translateY(140%);
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.sg-satima.is-ready .sg-satima__strip {
  display: grid;
}

.sg-satima.is-past .sg-satima__strip,
.sg-satima.is-past .sg-satima__progress {
  transform: translateY(0);
}

.sg-satima__strip-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 92px;
}

.sg-satima__strip-stat--hr {
  min-width: 84px;
}

.sg-satima__strip-label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--color-neutral-700);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sg-satima__strip-label svg {
  color: var(--color-accent);
  fill: none;
  stroke: currentColor;
}

.sg-satima__strip-value {
  font-family: var(--font-heading);
  font-size: 26px;
  line-height: 1;
}

.sg-satima__profile {
  position: relative;
  height: 64px;
  min-width: 0;
}

.sg-satima__profile svg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: block;
  width: 100%;
  height: 50px;
  overflow: visible;
}

.sg-satima__profile svg path,
.sg-satima__profile svg line {
  vector-effect: non-scaling-stroke;
}

.sg-satima__profile svg rect {
  transition: width 0.25s ease;
}

.sg-satima__profile-dot {
  position: absolute;
  left: 0;
  top: 25px;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--puck);
  box-shadow: 0 0 0 2px var(--color-surface);
  pointer-events: none;
  transition: left 0.25s ease, top 0.25s ease;
}

.sg-satima__profile-labels {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 14px;
  color: var(--color-neutral-700);
  font-size: 10px;
  letter-spacing: 0.04em;
  pointer-events: none;
}

.sg-satima__profile-labels span {
  position: absolute;
  white-space: nowrap;
}

.sg-satima__profile-labels .is-start { left: 0; }
.sg-satima__profile-labels .is-teeth { left: 34.7%; transform: translateX(-50%); }
.sg-satima__profile-labels .is-summit { left: 51.4%; transform: translateX(-50%); }
.sg-satima__profile-labels .is-end { right: 0; }

/* Progress line, phone */
.sg-satima__progress {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: none;
  height: 5px;
  background: color-mix(in srgb, var(--map-ink) 18%, var(--color-surface));
  transform: translateY(140%);
  transition: transform 0.6s ease;
}

.sg-satima__progress div {
  width: 0;
  height: 100%;
  background: var(--map-ink);
  transition: width 0.3s ease;
}

@media (max-width: 640px) {
  .sg-satima.is-ready .sg-satima__strip {
    display: none;
  }

  .sg-satima.is-ready .sg-satima__progress {
    display: block;
  }
}

/* Motion */
@keyframes sg-breathe {
  0%, 100% { stroke-opacity: 0.32; }
  50% { stroke-opacity: 0.6; }
}

@keyframes sg-pulse {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(3.2); opacity: 0; }
}

@keyframes sg-rain {
  from { transform: translate3d(0, -140px, 0); }
  to { transform: translate3d(-40px, 110vh, 0); }
}

@keyframes sg-drift {
  from { transform: translate3d(-4%, -2%, 0) scale(1); }
  to { transform: translate3d(4%, 2%, 0) scale(1.08); }
}

/* Trail ticket and park card: app links in the practical section of "Satima in the rain".
   All rules are scoped under .sg-satima. */

.sg-satima {
  --color-neutral-400: #b9bbab;
  --shadow-sm: 0 1px 2px rgba(32, 37, 29, 0.08);
}

html[data-theme="dark"] .sg-satima {
  --color-neutral-400: #5a6054;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* The trail ticket and the park card sit side by side on wide screens and stack on narrow screens. */
.sg-satima__tickets {
  display: grid;
  gap: 24px;
  align-items: start;
  max-width: 1100px;
  margin-top: 24px;
}

@media (min-width: 900px) {
  .sg-satima__tickets {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  }
}

.sg-satima__ticket {
  display: flex;
  color: var(--color-text);
  text-decoration: none;
  filter: drop-shadow(var(--shadow-sm));
  transition: transform 0.25s ease, filter 0.25s ease;
}

.sg-satima__body a.sg-satima__ticket,
.sg-satima__body a.sg-satima__ticket:hover {
  color: var(--color-text);
  text-decoration: none;
}

.sg-satima__ticket:hover {
  transform: translateY(-2px);
  filter: drop-shadow(var(--shadow-md));
}

.sg-satima__ticket:hover .sg-satima__ticket-stub {
  background: var(--color-accent-2-600);
}

.sg-satima__ticket:active {
  transform: translateY(0);
}

/* Main part. Two notches at the perforation make a full circle with the stub notches. */
.sg-satima__ticket-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 26px 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-right: 2px dashed var(--color-neutral-400);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  -webkit-mask-image:
    radial-gradient(circle 13px at 100% 0, transparent 98%, #000 100%),
    radial-gradient(circle 13px at 100% 100%, transparent 98%, #000 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    radial-gradient(circle 13px at 100% 0, transparent 98%, #000 100%),
    radial-gradient(circle 13px at 100% 100%, transparent 98%, #000 100%);
  mask-composite: intersect;
}

.sg-satima__ticket-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}

.sg-satima__body .sg-satima__ticket-kicker {
  margin: 0;
  color: var(--color-accent);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sg-satima__ticket-serial {
  color: var(--color-neutral-600);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sg-satima__body .sg-satima__ticket-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(24px, 3.2vw, 38px);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.05;
  text-wrap: pretty;
}

.sg-satima__ticket-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 14px 20px;
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--color-divider);
}

.sg-satima__ticket-fields > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sg-satima__ticket-fields dt {
  color: var(--color-neutral-600);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sg-satima__ticket-fields dd {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

.sg-satima__body .sg-satima__ticket-note {
  margin: 0;
  color: var(--color-neutral-700);
  font-size: 13px;
  line-height: 1.5;
}

/* Tear-off stub */
.sg-satima__ticket-stub {
  flex: 0 0 108px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  background: var(--color-accent-2);
  color: var(--color-bg);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  transition: background 0.25s ease;
  -webkit-mask-image:
    radial-gradient(circle 13px at 0 0, transparent 98%, #000 100%),
    radial-gradient(circle 13px at 0 100%, transparent 98%, #000 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    radial-gradient(circle 13px at 0 0, transparent 98%, #000 100%),
    radial-gradient(circle 13px at 0 100%, transparent 98%, #000 100%);
  mask-composite: intersect;
}

.sg-satima__ticket-stub-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--font-heading);
  font-size: 22px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sg-satima__ticket-barcode {
  width: 36px;
  flex: 1 1 auto;
  min-height: 60px;
  max-height: 140px;
  opacity: 0.85;
  background: repeating-linear-gradient(
    180deg,
    currentColor 0 2px, transparent 2px 5px,
    currentColor 5px 6px, transparent 6px 10px,
    currentColor 10px 13px, transparent 13px 16px,
    currentColor 16px 17px, transparent 17px 21px
  );
}

.sg-satima__ticket-stub svg {
  flex: 0 0 auto;
}

@media (max-width: 400px) {
  .sg-satima__ticket-main {
    padding: 18px 18px 16px;
  }
  .sg-satima__ticket-stub {
    flex-basis: 88px;
  }
  .sg-satima__ticket-fields {
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  }
}

/* Park card. It mirrors the park share page at /links/parks/<id>: brand bar, photo, name, and a stub in the park colour. */
.sg-satima__park {
  --park: #b446db;
  --park-ink: #f1eee3;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 420px;
  color: var(--color-text);
  text-decoration: none;
  filter: drop-shadow(var(--shadow-sm));
  transition: transform 0.25s ease, filter 0.25s ease;
}

.sg-satima__body a.sg-satima__park,
.sg-satima__body a.sg-satima__park:hover {
  color: var(--color-text);
  text-decoration: none;
}

.sg-satima__park:hover {
  transform: translateY(-2px);
  filter: drop-shadow(var(--shadow-md));
}

.sg-satima__park:active {
  transform: translateY(0);
}

.sg-satima__park-head,
.sg-satima__park-body {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
}

.sg-satima__park-head {
  padding-bottom: 14px;
  border-top: 8px solid var(--park);
  border-bottom: 0;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  -webkit-mask-image:
    radial-gradient(circle 12px at 0 100%, transparent 98%, #000 100%),
    radial-gradient(circle 12px at 100% 100%, transparent 98%, #000 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    radial-gradient(circle 12px at 0 100%, transparent 98%, #000 100%),
    radial-gradient(circle 12px at 100% 100%, transparent 98%, #000 100%);
  mask-composite: intersect;
}

.sg-satima__park-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px 10px 12px;
}

.sg-satima__park-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sg-satima__body .sg-satima__park-brand img {
  display: block;
  width: 26px;
  height: 26px;
  margin: 0;
  border-radius: 50%;
  background: var(--map-ink);
}

.sg-satima__park-tag {
  padding: 5px 12px;
  color: var(--park-ink);
  background: var(--park);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sg-satima__body .sg-satima__park-photo {
  display: block;
  width: calc(100% - 24px);
  height: auto;
  margin: 0 12px;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius-lg);
  background: var(--color-divider);
}

.sg-satima__park-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px 18px;
  border-top: 2px dashed var(--color-neutral-400);
  border-bottom: 2px dashed var(--color-neutral-400);
  -webkit-mask-image:
    radial-gradient(circle 12px at 0 0, transparent 98%, #000 100%),
    radial-gradient(circle 12px at 100% 0, transparent 98%, #000 100%),
    radial-gradient(circle 12px at 0 100%, transparent 98%, #000 100%),
    radial-gradient(circle 12px at 100% 100%, transparent 98%, #000 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    radial-gradient(circle 12px at 0 0, transparent 98%, #000 100%),
    radial-gradient(circle 12px at 100% 0, transparent 98%, #000 100%),
    radial-gradient(circle 12px at 0 100%, transparent 98%, #000 100%),
    radial-gradient(circle 12px at 100% 100%, transparent 98%, #000 100%);
  mask-composite: intersect;
}

.sg-satima__park-kicker {
  color: var(--color-neutral-700);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sg-satima__body .sg-satima__park-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.05;
}

.sg-satima__body .sg-satima__park-lede {
  margin: 0;
  color: var(--color-neutral-700);
  font-size: 15px;
  line-height: 1.5;
}

.sg-satima__park-stub {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px 14px;
  color: var(--park-ink);
  background: var(--park);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  -webkit-mask-image:
    radial-gradient(circle 12px at 0 0, transparent 98%, #000 100%),
    radial-gradient(circle 12px at 100% 0, transparent 98%, #000 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    radial-gradient(circle 12px at 0 0, transparent 98%, #000 100%),
    radial-gradient(circle 12px at 100% 0, transparent 98%, #000 100%);
  mask-composite: intersect;
}

.sg-satima__park-cta {
  font-family: var(--font-heading);
  font-size: 24px;
  letter-spacing: 0.03em;
  line-height: 1.1;
  text-transform: uppercase;
}

.sg-satima__park-note {
  font-size: 13px;
  line-height: 1.45;
  opacity: 0.85;
}

.sg-satima__park-serial {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--park-ink) 22%, transparent);
  font-size: 10px;
  letter-spacing: 0.08em;
  line-height: 1.3;
}

.sg-satima__park-barcode {
  height: 22px;
  background: repeating-linear-gradient(
    90deg,
    currentColor 0 2px, transparent 2px 5px,
    currentColor 5px 6px, transparent 6px 10px,
    currentColor 10px 13px, transparent 13px 16px,
    currentColor 16px 17px, transparent 17px 21px,
    currentColor 21px 22px, transparent 22px 24px
  );
}

@media (prefers-reduced-motion: reduce) {
  .sg-satima * {
    animation: none !important;
    transition: none !important;
  }

  .sg-satima__rain,
  .sg-satima__mist {
    display: none;
  }
}
