/* ==========================================================================
   base.css — design tokens, reset, typography, utilities
   --------------------------------------------------------------------------
   1. Design tokens (colours, fonts, spacing, motion)
   2. Reset
   3. Typography
   4. Prose (rich text from the editor)
   5. Utilities
   6. Motion start states (only while JS animations are running)
   ========================================================================== */


/* 1. Design tokens
   ========================================================================== */

:root {
	/* Brand colours — taken from the Elementor global kit so nothing shifts. */
	--sst-gold:        #C69A5B;
	--sst-gold-dark:   #A97F44;
	--sst-gold-soft:   rgba(198, 154, 91, .14);
	--sst-ink:         #1F1F1F;   /* main text + dark sections */
	--sst-dark:        #1B1B1B;   /* alternative dark section */
	--sst-night:       #121211;   /* footer */
	--sst-paper:       #F8F8F8;   /* light grey sections */
	--sst-white:       #FFFFFF;
	--sst-muted:       #54595F;   /* secondary text on light */
	--sst-muted-light: rgba(255, 255, 255, .72); /* secondary text on dark */
	--sst-line:        #E0E0E0;
	--sst-line-dark:   rgba(255, 255, 255, .14);

	/* Type */
	--sst-font-head: "RomanRoman", "Cormorant Garamond", Georgia, serif;
	--sst-font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

	/* Fluid type scale: min size on phones → max size on wide screens. */
	--sst-fs-hero:  clamp(1.9rem, 1.45rem + 2.2vw, 3.4375rem); /* hero titles: 55px max */
	--sst-fs-h1:    clamp(1.9rem, 1.45rem + 2.2vw, 3.4375rem); /* page titles: 55px max */
	--sst-fs-h2:    clamp(1.9rem, 1.35rem + 2.1vw, 3.3rem);
	--sst-fs-h3:    clamp(1.35rem, 1.15rem + .7vw, 1.75rem);
	--sst-fs-lead:  clamp(1.05rem, .98rem + .3vw, 1.25rem);
	--sst-fs-body:  1rem;
	--sst-fs-small: .875rem;
	--sst-fs-label: .75rem;

	/* Layout */
	--sst-container:      1320px;
	--sst-container-text: 760px;
	--sst-gutter:         clamp(20px, 4vw, 56px);  /* page side padding */
	--sst-section:        80px; /* section top/bottom padding (60px on phones, below) */
	--sst-gap:            clamp(24px, 3vw, 40px);
	--sst-radius:         14px;
	--sst-radius-sm:      8px;
	--sst-header-h:       88px;

	/* Motion — one easing curve for the whole site keeps it feeling calm and consistent. */
	--sst-ease:     cubic-bezier(.22, 1, .36, 1);
	--sst-fast:     .25s;
	--sst-medium:   .5s;
	--sst-slow:     .9s;
}

@media (max-width: 767px) {
	:root {
		--sst-header-h: 72px;
		--sst-radius:   10px;
		--sst-section:  60px;
	}
}


/* 2. Reset
   ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	/* Lenis handles smooth scrolling; native smooth scroll would fight it. */
	scroll-behavior: auto;
}

body {
	margin: 0;
	background: var(--sst-white);
	color: var(--sst-ink);
	font-family: var(--sst-font-body);
	font-size: var(--sst-fs-body);
	font-weight: 400;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: clip; /* No sideways scroll from off-canvas animations. */
}

img,
svg,
video,
iframe {
	display: block;
	max-width: 100%;
}

img {
	height: auto;
}

a {
	color: inherit;
	text-decoration: none;
	transition: color var(--sst-fast) ease;
}

button {
	font: inherit;
	color: inherit;
	cursor: pointer;
}

ul,
ol {
	margin: 0;
	padding: 0;
}

figure,
blockquote {
	margin: 0;
}

[hidden] {
	display: none !important;
}

:focus-visible {
	outline: 2px solid var(--sst-gold);
	outline-offset: 3px;
}


/* 3. Typography
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0;
	font-family: var(--sst-font-head);
	font-weight: 400;
	line-height: 1.12;
	letter-spacing: -.005em;
	color: inherit;
	text-wrap: balance;
}

p {
	margin: 0 0 1em;
}

p:last-child {
	margin-bottom: 0;
}

/* Small gold label above titles ("2027 SAFARIS", "01"…). */
.sst-eyebrow {
	margin: 0 0 18px;
	font-family: var(--sst-font-body);
	font-size: var(--sst-fs-label);
	font-weight: 500;
	letter-spacing: .22em;
	line-height: 1.4;
	text-transform: uppercase;
	color: var(--sst-gold);
}

.sst-eyebrow--sm {
	margin-bottom: 10px;
	font-size: .6875rem;
}

.sst-eyebrow a:hover {
	color: var(--sst-white);
}

/* "Date · 4 min read" style meta line with gold dot separators. */
.sst-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 14px;
	margin: 0;
	font-size: var(--sst-fs-small);
	color: var(--sst-muted);
}

.sst-meta span + span::before {
	content: "";
	display: inline-block;
	width: 4px;
	height: 4px;
	margin-right: 14px;
	border-radius: 50%;
	background: var(--sst-gold);
	vertical-align: middle;
}

.sst-meta__cat {
	color: var(--sst-gold);
	font-weight: 500;
	letter-spacing: .14em;
	text-transform: uppercase;
	font-size: var(--sst-fs-label);
}


/* 4. Prose — rich text typed in the editor
   ========================================================================== */

.sst-prose {
	color: var(--sst-muted);
	font-size: 1.0625rem;
	line-height: 1.8;
}

/* Space between blocks — also inside wrappers some editors add (e.g. <div class="markdown">). */
.sst-prose > * + *,
.sst-prose :is(p, ul, ol, blockquote, figure, .wp-caption, h2, h3, h4) + :is(p, ul, ol, blockquote, figure, .wp-caption, h2, h3, h4) {
	margin-top: 1.1em;
}

.sst-prose p {
	margin: 0;
}

.sst-prose strong {
	color: var(--sst-ink);
	font-weight: 600;
}

.sst-prose a {
	color: var(--sst-gold-dark);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.sst-prose ul,
.sst-prose ol {
	padding-left: 1.3em;
}

.sst-prose li + li {
	margin-top: .4em;
}

.sst-prose li::marker {
	color: var(--sst-gold);
}

.sst-prose--light {
	color: var(--sst-muted-light);
}

.sst-prose--light strong {
	color: var(--sst-white);
}

.sst-prose--center {
	text-align: center;
}

/* Long-form blog content. */
.sst-prose--article {
	color: #2c2c2c;
	font-size: 1.125rem;
}

.sst-prose--article h2,
.sst-prose--article h3,
.sst-prose--article h4 {
	margin-top: 2.2em;
	margin-bottom: .5em;
	color: var(--sst-ink);
	scroll-margin-top: calc(var(--sst-header-h) + 32px);
}

.sst-prose--article h2 { font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.4rem); }
.sst-prose--article h3 { font-size: var(--sst-fs-h3); }

/* Photos run the full width of the text column. */
.sst-prose--article img {
	display: block;
	width: 100%;
	height: auto;
	margin: 2.2em 0;
	border-radius: var(--sst-radius-sm);
}

.sst-prose--article figure,
.sst-prose--article .wp-caption {
	width: auto !important; /* the classic editor writes a fixed pixel width */
	max-width: 100%;
	margin: 2.2em 0;
}

.sst-prose--article figure img,
.sst-prose--article .wp-caption img {
	margin: 0;
}

/* Caption under a photo: small text with a short gold rule on the left. */
.sst-prose--article figcaption,
.sst-prose--article .wp-caption-text,
.sst-prose--article .wp-element-caption {
	margin-top: 12px;
	padding-left: 12px;
	border-left: 2px solid var(--sst-gold);
	font-size: .8125rem;
	line-height: 1.5;
	color: var(--sst-muted);
	text-align: left;
}

.sst-prose--article blockquote {
	margin: 2em 0;
	padding-left: 24px;
	border-left: 2px solid var(--sst-gold);
	font-family: var(--sst-font-head);
	font-size: 1.5rem;
	line-height: 1.4;
	color: var(--sst-ink);
}


/* 5. Utilities
   ========================================================================== */

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* Skip link becomes visible when focused with the keyboard. */
.sst-skip-link:focus {
	position: fixed !important;
	top: 12px;
	left: 12px;
	z-index: 10000;
	width: auto;
	height: auto;
	padding: 12px 20px;
	clip: auto;
	background: var(--sst-white);
	color: var(--sst-ink);
	border-radius: var(--sst-radius-sm);
}

/* Image that fills its box like a background (parent sets size + position). */
.sst-cover {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Gentle zoom on hover for card images (the image itself carries .sst-cover). */
.sst-zoom {
	overflow: hidden;
}

.sst-zoom img {
	transition: transform 1.1s var(--sst-ease);
	will-change: transform;
}

@media (hover: hover) {
	.sst-zoom:hover img,
	a:hover > .sst-zoom img,
	article:hover .sst-zoom img {
		transform: scale(1.05);
	}
}

.sst-center      { text-align: center; }
.sst-mt-lg       { margin-top: clamp(36px, 5vw, 60px); }
.sst-rotate-180  { transform: rotate(180deg); }
.sst-anchor      { display: block; position: relative; top: calc(-1 * var(--sst-header-h)); }

.sst-empty {
	margin: 0;
	padding: 24px 0;
	text-align: center;
	color: var(--sst-muted);
}

/* Inline SVG icons inherit the text colour and size to 1em by default. */
.sst-icon {
	width: 1.15em;
	height: 1.15em;
	flex: none;
}

/* Honeypot fields (spam trap) — off-screen but still in the form. */
.sst-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Thin gold reading-progress bar at the top of blog posts. */
.sst-progress {
	position: fixed;
	inset: 0 0 auto;
	z-index: 1001;
	height: 3px;
	pointer-events: none;
}

.sst-progress span {
	display: block;
	height: 100%;
	background: var(--sst-gold);
	transform: scaleX(0);
	transform-origin: left center;
}


/* 6. Motion start states
   --------------------------------------------------------------------------
   html.sst-motion is added by assets/js/core.js only once GSAP has loaded
   and the visitor hasn't asked for reduced motion. Without it (no JS,
   reduced motion, a script error) everything simply shows — nothing can
   get stuck invisible.
   ========================================================================== */

.sst-motion [data-reveal],
.sst-motion [data-hero-fade],
.sst-motion [data-stagger] > * {
	opacity: 0;
	transform: translate3d(0, 32px, 0);
}

/* Split headings stay hidden until SplitText has wrapped their lines. */
.sst-motion [data-split],
.sst-motion [data-hero-title] {
	visibility: hidden;
}

/* Hero opening: the photo starts black and fades up (motion.js → heroIntro). */
.sst-motion .sst-hero__media {
	opacity: 0;
}

/* Image reveal: photo is clipped from the bottom and slightly zoomed. */
.sst-motion [data-img-reveal] {
	clip-path: inset(100% 0 0 0);
}

/* Lines produced by SplitText sit inside a mask so they can rise into view. */
.sst-line-mask {
	display: block;
	overflow: hidden;
	padding-bottom: .08em; /* room for descenders (g, y, p) */
	margin-bottom: -.08em;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: .01ms !important;
		transition-duration: .01ms !important;
	}
}
