/*
Theme Name: Tribal Expedition
Theme URI: https://example.com/tribal-expedition
Author: Tribal Expedition
Description: An adventure-travel theme for small-group expeditions in Mongolia and Central Asia. Full-bleed hero, flagship expedition banner, culture story, expedition cards, "why travel with us" features and a call-to-action band. Every text, image and link on the home page is editable under Appearance → Customize.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tribal-expedition
Tags: travel, one-column, custom-menu, custom-logo, featured-images, theme-options
*/

:root {
	--te-orange: #e87722;
	--te-orange-dark: #c9611a;
	--te-gold: #e9a23b;
	--te-dark: #2a241e;
	--te-dark-2: #3a3129;
	--te-cream: #f5efe6;
	--te-cream-2: #efe7da;
	--te-ink: #1f1b17;
	--te-muted: #5d554c;
	--te-olive: #6b6640;
	--te-line: #cfc4b3;
	--te-serif: "Libre Caslon Text", Georgia, "Times New Roman", serif;
	--te-sans: "DM Sans", "Helvetica Neue", Arial, sans-serif;
	--te-brand: "Saira", "Arial Black", sans-serif;
	--te-wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--te-sans);
	font-size: 17px;
	line-height: 1.6;
	color: var(--te-ink);
	background: var(--te-cream);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--te-orange-dark); }
h1, h2, h3, h4 { font-family: var(--te-serif); font-weight: 400; line-height: 1.15; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
.te-wrap { width: min(var(--te-wrap), 100% - 48px); margin-inline: auto; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 999; background: #fff; padding: 10px 16px; clip: auto; width: auto; height: auto; }

/* ---------- Buttons ---------- */
.te-btn {
	display: inline-flex; align-items: center; gap: 12px;
	padding: 12px 22px;
	font-family: var(--te-sans); font-size: 15px; font-weight: 500;
	text-decoration: none; border-radius: 3px;
	border: 1px solid transparent;
	transition: background .2s, color .2s, border-color .2s, transform .2s;
	cursor: pointer; line-height: 1.2;
}
.te-btn:hover { transform: translateY(-1px); }
.te-btn .te-arrow { width: 16px; height: 16px; flex: none; }
.te-btn--primary { background: var(--te-orange); color: #fff; box-shadow: 0 6px 18px rgba(232,119,34,.25); }
.te-btn--primary:hover { background: var(--te-orange-dark); color: #fff; }
.te-btn--ghost { color: #fff; border-color: rgba(255,255,255,.75); background: rgba(0,0,0,.08); }
.te-btn--ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.te-btn--outline { color: var(--te-ink); border-color: var(--te-ink); background: transparent; }
.te-btn--outline:hover { background: var(--te-ink); color: #fff; }
.te-btn--olive { background: rgba(107,102,64,.85); color: #fff; padding: 8px 16px; font-size: 14px; }
.te-btn--olive:hover { background: var(--te-orange); color: #fff; }
.te-btn--cta { color: #fff; border: 1.5px solid var(--te-orange); background: rgba(232,119,34,.15); font-size: 17px; padding: 13px 28px; }
.te-btn--cta:hover { background: var(--te-orange); color: #fff; }

/* ---------- Header ---------- */
.te-header {
	position: absolute; top: 0; left: 0; right: 0; z-index: 50;
	padding: 14px 0;
}
.admin-bar .te-header { top: 32px; }
.te-header--solid { position: relative; background: var(--te-dark); }
.admin-bar .te-header--solid { top: 0; }
.te-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; width: min(1320px, 100% - 48px); margin-inline: auto; }
.te-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.te-brand__mark { width: 66px; height: 50px; flex: none; }
.te-brand__text { display: flex; flex-direction: column; line-height: 1; }
.te-brand__name {
	font-family: var(--te-brand); font-weight: 800; font-size: 25px;
	letter-spacing: .12em; text-transform: uppercase;
	background: linear-gradient(180deg, #f6b24a, #e8771f);
	-webkit-background-clip: text; background-clip: text; color: transparent;
}
.te-brand__tag {
	font-family: var(--te-brand); font-weight: 700; font-size: 12.5px;
	letter-spacing: .42em; text-transform: uppercase; color: var(--te-gold);
	margin-top: 7px; padding-left: 28px;
}
.custom-logo-link img { max-height: 60px; width: auto; }

.te-nav { display: flex; align-items: center; gap: 28px; }
.te-menu { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; }
.te-menu li { position: relative; }
.te-menu > li > a {
	display: flex; align-items: center; gap: 6px;
	padding: 10px 12px; color: #fff; text-decoration: none; font-size: 15px;
	text-shadow: 0 1px 6px rgba(0,0,0,.35);
}
.te-menu > li.menu-item-has-children > a::after {
	content: ""; width: 6px; height: 6px; margin-top: -3px;
	border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg);
}
.te-menu a:hover, .te-menu .current-menu-item > a { color: var(--te-gold); }
.te-menu .sub-menu {
	list-style: none; margin: 0; padding: 8px 0; position: absolute; top: 100%; left: 0;
	min-width: 220px; background: var(--te-dark); border-top: 2px solid var(--te-orange);
	box-shadow: 0 12px 30px rgba(0,0,0,.3);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s;
}
.te-menu li:hover > .sub-menu, .te-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.te-menu .sub-menu a { display: block; padding: 9px 18px; color: #eee; text-decoration: none; font-size: 14.5px; }
.te-menu .sub-menu a:hover { background: rgba(255,255,255,.06); color: var(--te-gold); }
.te-header .te-btn--primary { padding: 10px 16px; box-shadow: none; }

.te-burger { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.te-burger span { display: block; width: 26px; height: 2px; background: #fff; margin: 5px 0; transition: .25s; }

/* ---------- Hero ---------- */
.te-hero {
	position: relative; min-height: 540px; height: 76vh; max-height: 660px;
	display: flex; align-items: center; color: #fff;
	background: var(--te-dark) right center/cover no-repeat;
}
.te-hero::before {
	content: ""; position: absolute; inset: 0;
	background:
		linear-gradient(180deg, rgba(20,24,32,.65) 0%, rgba(20,24,32,0) 22%),
		linear-gradient(90deg, rgba(25,22,20,.72) 0%, rgba(25,22,20,.45) 38%, rgba(25,22,20,0) 62%),
		linear-gradient(0deg, rgba(25,20,15,.35) 0%, rgba(25,20,15,0) 30%);
}
.te-hero__content { position: relative; width: min(1320px, 100% - 48px); margin: 70px auto 0; padding-left: 22px; }
.te-hero h1 { font-size: clamp(36px, 5vw, 64px); max-width: 15em; margin-bottom: 22px; text-shadow: 0 2px 20px rgba(0,0,0,.3); }
.te-hero p { font-size: clamp(16px, 1.5vw, 19px); max-width: 30em; margin-bottom: 34px; opacity: .95; }
.te-hero__actions { display: flex; flex-wrap: wrap; gap: 18px; }

/* ---------- Flagship ---------- */
.te-flagship { position: relative; display: grid; grid-template-columns: 50% 50%; min-height: 340px; background: var(--te-dark); overflow: hidden; }
.te-flagship__media { background: center/cover no-repeat; min-height: 300px; }
.te-flagship__panel {
	position: relative; color: #fff;
	background: linear-gradient(135deg, #3b3128 0%, #2b241d 100%);
	padding: 42px 56px 46px 40px;
	margin-left: -140px; padding-left: 180px;
	clip-path: polygon(140px 0, 100% 0, 100% 100%, 0 100%);
	display: flex; flex-direction: column; justify-content: center;
}
.te-flagship__panel::before {
	content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 140px; z-index: 2;
	background: linear-gradient(to top right, transparent calc(50% - 1.5px), var(--te-gold) calc(50% - 1px), var(--te-gold) calc(50% + 1px), transparent calc(50% + 1.5px));
	pointer-events: none;
}
.te-flagship__panel::after {
	content: ""; position: absolute; right: -40px; top: 10%; width: 360px; height: 220px; opacity: .035;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 120'%3E%3Cpath d='M0 120 60 30l25 35 30-55 85 110z' fill='%23fff'/%3E%3C/svg%3E") no-repeat center/contain;
	pointer-events: none;
}
.te-flagship__panel > * { position: relative; z-index: 1; }
.te-footer .te-menu { display: block; }
.te-footer .te-menu a { padding: 0; text-shadow: none; color: #e2d8cb; }
.te-badge {
	align-self: flex-start; display: inline-block;
	background: linear-gradient(90deg, var(--te-gold), var(--te-orange));
	color: #2b1a08; font-weight: 700; font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase;
	padding: 5px 18px; margin-bottom: 16px;
	clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}
.te-flagship h2 { font-size: clamp(28px, 3vw, 38px); margin-bottom: 14px; }
.te-flagship p { color: #e8e2d9; max-width: 34em; }
.te-meta { display: flex; flex-wrap: wrap; gap: 14px 38px; margin: 6px 0 26px; padding: 0; list-style: none; font-size: 15px; }
.te-meta li { display: flex; align-items: center; gap: 10px; }
.te-meta svg { width: 22px; height: 22px; color: var(--te-gold); }
.te-flagship .te-btn { align-self: flex-start; }

/* ---------- Culture ---------- */
.te-culture { padding: 24px 0 36px; }
.te-culture__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.te-culture__img { border-radius: 3px; overflow: hidden; box-shadow: 0 12px 32px rgba(40,30,20,.15); aspect-ratio: 505 / 236; }
.te-culture__img img { width: 100%; height: 100%; object-fit: cover; }
.te-culture__text::before { content: ""; display: block; width: 36px; height: 2px; background: var(--te-olive); margin-bottom: 18px; }
.te-culture h2 { font-size: clamp(28px, 3vw, 36px); }
.te-culture p { color: var(--te-muted); max-width: 26em; margin-bottom: 26px; }

/* ---------- Section titles ---------- */
.te-rule-title { display: flex; align-items: center; gap: 28px; margin: 0 0 28px; }
.te-rule-title::before, .te-rule-title::after { content: ""; flex: 1; height: 1px; background: var(--te-line); }
.te-rule-title--caps { font-family: var(--te-sans); font-size: 15px; font-weight: 500; letter-spacing: .38em; text-transform: uppercase; }
.te-rule-title--serif { font-size: clamp(24px, 2.6vw, 30px); padding-inline: 4%; }

/* ---------- Expedition cards ---------- */
.te-expeditions { padding: 14px 0 38px; }
.te-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.te-card {
	position: relative; aspect-ratio: 300 / 222; overflow: hidden; border-radius: 3px; color: #fff;
	background: #333 center/cover no-repeat; box-shadow: 0 10px 24px rgba(40,30,20,.18);
	display: flex; flex-direction: column; justify-content: flex-end; padding: 22px;
	text-decoration: none;
}
.te-card__bg { position: absolute; inset: 0; background: inherit; background-size: cover; transition: transform .6s ease; }
.te-card:hover .te-card__bg { transform: scale(1.05); }
.te-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(20,18,14,.85) 0%, rgba(20,18,14,.45) 42%, rgba(20,18,14,0) 70%); }
.te-card > *:not(.te-card__bg) { position: relative; z-index: 1; }
.te-card h3 { font-size: clamp(22px, 2.2vw, 27px); margin-bottom: 10px; }
.te-card__tags { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 14px; opacity: .95; }
.te-card__tags span + span::before { content: "•"; margin: 0 9px; }
.te-card .te-btn { align-self: flex-start; }

/* ---------- Features ---------- */
.te-why { padding: 8px 0 40px; }
.te-features { display: grid; grid-template-columns: repeat(4, 1fr); }
.te-feature { text-align: center; padding: 6px 22px; }
.te-feature + .te-feature { border-left: 1px solid var(--te-line); }
.te-feature svg { width: 46px; height: 40px; color: var(--te-olive); margin: 0 auto 10px; }
.te-feature h3 { font-family: var(--te-sans); font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.te-feature p { font-size: 14.5px; color: var(--te-muted); line-height: 1.4; margin: 0; }

/* ---------- CTA ---------- */
.te-cta {
	position: relative; padding: 44px 0 64px; text-align: center; color: #fff;
	background: #6b3b22 center/cover no-repeat;
}
.te-cta::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(60,30,20,.15), rgba(25,18,14,.45)); }
.te-cta > * { position: relative; }
.te-cta h2 { font-size: clamp(28px, 3.2vw, 38px); margin-bottom: 22px; text-shadow: 0 2px 14px rgba(0,0,0,.25); }

/* ---------- Footer ---------- */
.te-footer { background: #1e1915; color: #bdb3a6; padding: 46px 0 26px; font-size: 15px; }
.te-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.te-footer h4 { font-family: var(--te-sans); font-weight: 600; color: #fff; font-size: 15px; letter-spacing: .1em; text-transform: uppercase; }
.te-footer a { color: #e2d8cb; text-decoration: none; }
.te-footer a:hover { color: var(--te-gold); }
.te-footer ul { list-style: none; margin: 0; padding: 0; }
.te-footer li { margin-bottom: 6px; }
.te-footer__bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 32px; padding-top: 18px; font-size: 13.5px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Inner pages ---------- */
.te-page-hero { background: var(--te-dark) center/cover; color: #fff; padding: 70px 0 56px; position: relative; }
.te-page-hero::before { content: ""; position: absolute; inset: 0; background: rgba(25,20,16,.55); }
.te-page-hero .te-wrap { position: relative; }
.te-page-hero h1 { font-size: clamp(32px, 4vw, 52px); margin: 0; }
.te-content { padding: 56px 0 72px; }
.te-content .te-wrap { max-width: 800px; }
.te-content img { border-radius: 3px; }
.te-content .alignwide { margin-inline: -80px; max-width: calc(100% + 160px); }
.te-content .alignfull { margin-inline: calc(50% - 50vw); max-width: 100vw; width: 100vw; }
.te-post-list article { padding: 28px 0; border-bottom: 1px solid var(--te-line); }
.te-post-list h2 a { color: var(--te-ink); text-decoration: none; }
.te-post-list h2 a:hover { color: var(--te-orange-dark); }
.te-post-meta { font-size: 14px; color: var(--te-muted); margin-bottom: 10px; }
.wp-block-button__link { background: var(--te-orange); border-radius: 3px; }
.nav-links { display: flex; gap: 12px; margin-top: 32px; }
.nav-links a, .nav-links span { padding: 8px 14px; border: 1px solid var(--te-line); text-decoration: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
	.te-burger { display: block; position: relative; z-index: 60; }
	.te-nav {
		position: fixed; inset: 0 0 0 auto; width: min(340px, 86vw); z-index: 55;
		flex-direction: column; align-items: stretch; gap: 20px;
		background: var(--te-dark); padding: 90px 26px 30px; overflow-y: auto;
		transform: translateX(100%); transition: transform .3s ease;
	}
	.te-nav-open .te-nav { transform: none; box-shadow: -10px 0 40px rgba(0,0,0,.4); }
	.te-nav-open .te-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
	.te-nav-open .te-burger span:nth-child(2) { opacity: 0; }
	.te-nav-open .te-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
	.te-menu { flex-direction: column; }
	.te-menu > li > a { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
	.te-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: none; padding: 0 0 0 14px; }
	.te-flagship { grid-template-columns: 1fr; }
	.te-flagship__panel::before { display: none; }
	.te-flagship__panel { padding: 40px 28px; margin-left: 0; clip-path: none; }
	.te-culture__grid { grid-template-columns: 1fr; gap: 28px; }
	.te-features { grid-template-columns: repeat(2, 1fr); row-gap: 30px; }
	.te-feature:nth-child(3) { border-left: 0; }
}
@media (max-width: 760px) {
	.te-brand__name { font-size: 16px; white-space: nowrap; letter-spacing: .08em; }
	.te-brand__tag { font-size: 10px; padding-left: 18px; }
	.te-brand__mark { width: 50px; height: 38px; }
	.te-hero { height: auto; min-height: 600px; }
	.te-hero__content { padding-left: 0; }
	.te-hero::before { background: linear-gradient(180deg, rgba(20,22,26,.6), rgba(20,22,26,.35) 50%, rgba(20,22,26,.55)); }
	.te-cards { grid-template-columns: 1fr; }
	.te-features { grid-template-columns: 1fr; }
	.te-feature + .te-feature { border-left: 0; border-top: 1px solid var(--te-line); padding-top: 26px; }
	.te-footer__grid { grid-template-columns: 1fr; }
	.te-rule-title--caps { letter-spacing: .22em; }
	.te-content .alignwide { margin-inline: 0; max-width: 100%; }
}
@media (max-width: 782px) { .admin-bar .te-header { top: 46px; } }
