/* ==========================================================================
   Kubgak Theme — main.css
   ========================================================================== */

/* ---------- Design Tokens ---------- */
:root {
	--color-ink:        #0A0E1A;
	--color-surface:    #F7F5F0;
	--color-gold:       #C49A3C;
	--color-gold-light: #E8C96A;
	--color-charcoal:   #1E2535;
	--color-muted:      #6B7280;
	--color-white:      #FFFFFF;

	--font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
	--font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

	--text-hero:  clamp(3rem, 7vw, 6rem);
	--text-h1:    clamp(2rem, 4vw, 3.5rem);
	--text-h2:    clamp(1.5rem, 3vw, 2.25rem);
	--text-h3:    1.375rem;
	--text-body:  1rem;
	--text-small: 0.875rem;

	--maxw:           1200px;
	--maxw-narrow:    820px;
	--section-pad:    clamp(4rem, 8vw, 8rem);
	--gap:            2rem;
	--nav-height:     72px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: var(--text-body);
	line-height: 1.6;
	color: var(--color-ink);
	background: var(--color-surface);
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0;
	font-weight: 600;
	line-height: 1.15;
}

p {
	margin: 0 0 1.25rem;
}

a {
	color: var(--color-gold);
	text-decoration: none;
	transition: color 0.25s ease;
}

a:hover {
	color: var(--color-gold-light);
}

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

ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

button {
	font-family: inherit;
	cursor: pointer;
}

/* ---------- Accessibility helpers ---------- */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

.skip-link {
	position: absolute;
	left: -999px;
	top: 0;
	z-index: 1000;
	background: var(--color-gold);
	color: var(--color-ink);
	padding: 0.75rem 1.25rem;
}

.skip-link:focus {
	left: 1rem;
	top: 1rem;
}

/* ---------- Layout ---------- */
.container {
	width: 100%;
	max-width: var(--maxw);
	margin: 0 auto;
	padding-left: 1.5rem;
	padding-right: 1.5rem;
}

.container--narrow {
	max-width: var(--maxw-narrow);
}

.section {
	padding-top: var(--section-pad);
	padding-bottom: var(--section-pad);
}

.section--about {
	background: var(--color-ink);
	color: var(--color-surface);
}

.section__label {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--color-gold);
	font-weight: 600;
	margin: 0 0 0.75rem;
}

.section__title {
	font-family: var(--font-display);
	font-size: var(--text-h2);
	font-weight: 700;
	margin: 0 0 2.5rem;
	letter-spacing: -0.01em;
}

/* ---------- Navigation ---------- */
.nav {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 100;
	background: var(--color-ink);
	transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav--scrolled {
	background: rgba(10, 14, 26, 0.82);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	box-shadow: 0 1px 0 rgba(196, 154, 60, 0.25);
}

.nav__inner {
	max-width: var(--maxw);
	margin: 0 auto;
	height: var(--nav-height);
	padding: 0 1.5rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.nav__logo {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 1.6rem;
	color: var(--color-gold);
	letter-spacing: 0.18em;
}

.nav__logo:hover {
	color: var(--color-gold-light);
}

.nav__links {
	display: flex;
	gap: 2rem;
	align-items: center;
}

.nav__links a,
.nav__link {
	color: rgba(247, 245, 240, 0.78);
	font-size: var(--text-small);
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.nav__links a:hover,
.nav__link:hover {
	color: var(--color-gold);
}

.nav__toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 40px;
	height: 40px;
	background: transparent;
	border: 0;
	padding: 0;
}

.nav__toggle-bar {
	display: block;
	width: 24px;
	height: 2px;
	background: var(--color-gold);
	margin: 0 auto;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

body.menu-open .nav__toggle-bar:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

body.menu-open .nav__toggle-bar:nth-child(2) {
	opacity: 0;
}

body.menu-open .nav__toggle-bar:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Mobile menu overlay ---------- */
.mobile-menu {
	position: fixed;
	inset: 0;
	z-index: 90;
	background: var(--color-ink);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-12px);
	transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s ease;
}

body.menu-open .mobile-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.mobile-menu__links {
	display: flex;
	flex-direction: column;
	gap: 1.75rem;
	text-align: center;
}

.mobile-menu__links a {
	font-family: var(--font-display);
	font-size: 2rem;
	color: var(--color-surface);
	font-weight: 600;
}

.mobile-menu__links a:hover {
	color: var(--color-gold);
}

/* ---------- Buttons ---------- */
.btn {
	display: inline-block;
	font-family: var(--font-body);
	font-size: var(--text-small);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	padding: 0.95rem 2.25rem;
	border-radius: 0;
	border: 1px solid transparent;
	transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
	cursor: pointer;
}

.btn--primary {
	background: var(--color-gold);
	color: var(--color-ink);
	border-color: var(--color-gold);
}

.btn--primary:hover {
	background: var(--color-gold-light);
	border-color: var(--color-gold-light);
	color: var(--color-ink);
}

.btn--outline {
	background: transparent;
	color: var(--color-gold);
	border-color: var(--color-gold);
}

.btn--outline:hover {
	background: var(--color-gold);
	color: var(--color-ink);
}

/* ---------- Hero ---------- */
.hero {
	position: relative;
	min-height: 100vh;
	display: flex;
	align-items: center;
	background: var(--color-ink);
	color: var(--color-surface);
	overflow: hidden;
	padding-top: var(--nav-height);
}

.hero--inner {
	min-height: 56vh;
}

.hero__pattern {
	position: absolute;
	inset: 0;
	opacity: 0.03;
	pointer-events: none;
	background-image:
		linear-gradient(var(--color-gold) 1px, transparent 1px),
		linear-gradient(90deg, var(--color-gold) 1px, transparent 1px),
		linear-gradient(45deg, transparent 48%, var(--color-gold) 48%, var(--color-gold) 52%, transparent 52%);
	background-size: 64px 64px, 64px 64px, 32px 32px;
}

.hero__inner {
	position: relative;
	z-index: 2;
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 4rem 1.5rem;
	width: 100%;
}

.hero__subline {
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.3em;
	color: var(--color-gold);
	font-weight: 600;
	margin: 0 0 1.5rem;
}

.hero__subline--bottom {
	margin: 1.5rem 0 0;
	letter-spacing: 0.18em;
	color: rgba(247, 245, 240, 0.72);
}

.hero__title {
	font-family: var(--font-display);
	font-size: var(--text-hero);
	font-weight: 700;
	line-height: 1.02;
	letter-spacing: -0.02em;
	color: var(--color-gold);
	margin: 0 0 2.5rem;
}

.hero__title em {
	font-style: italic;
	font-weight: 600;
}

.hero__title--inner {
	margin-bottom: 0;
}

/* ---------- Grid ---------- */
.grid {
	display: grid;
	gap: var(--gap);
}

.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }

/* ---------- Cards ---------- */
.card {
	position: relative;
	background: var(--color-charcoal);
	color: var(--color-surface);
	border-radius: 2px;
	border-left: 3px solid var(--color-gold);
	padding: 2rem;
}

.card__index {
	display: block;
	font-family: var(--font-display);
	font-size: 2rem;
	font-weight: 700;
	color: var(--color-gold);
	margin-bottom: 0.5rem;
	line-height: 1;
}

.card__title {
	font-family: var(--font-display);
	font-size: var(--text-h3);
	font-weight: 600;
	margin: 0 0 0.85rem;
	color: var(--color-white);
}

.card__body {
	color: rgba(247, 245, 240, 0.72);
	font-size: var(--text-small);
	line-height: 1.7;
	margin: 0;
}

.card__tagline {
	font-family: var(--font-display);
	font-style: italic;
	font-size: 1.15rem;
	color: var(--color-gold-light);
	margin: 0 0 1.5rem;
}

.card--link {
	display: flex;
	flex-direction: column;
	transition: border-color 0.25s ease, transform 0.25s ease;
}

.card--link:hover {
	border-left-color: var(--color-gold-light);
	transform: translateY(-4px);
	color: var(--color-surface);
}

.card__cta {
	margin-top: auto;
	font-size: var(--text-small);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--color-gold);
}

/* ---------- About teaser ---------- */
.about-teaser__content {
	max-width: 760px;
}

.about-teaser__body {
	font-size: 1.15rem;
	line-height: 1.8;
	color: rgba(247, 245, 240, 0.82);
	margin-bottom: 2.25rem;
}

.section--about .section__title {
	color: var(--color-white);
}

/* ---------- Prose (About / Policies) ---------- */
.prose__block {
	margin-bottom: 3.5rem;
}

.prose__block:last-child {
	margin-bottom: 0;
}

.prose__block p {
	font-size: 1.05rem;
	line-height: 1.85;
	color: #2b3242;
}

.prose .section__title {
	margin-bottom: 1rem;
}

/* ---------- Policies ---------- */
.policy {
	margin-bottom: 4rem;
	padding-bottom: 4rem;
	border-bottom: 1px solid rgba(10, 14, 26, 0.12);
}

.policy:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: 0;
}

.policy__heading {
	font-family: var(--font-body);
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--color-ink);
	margin: 2rem 0 0.75rem;
}

.policy p {
	color: #2b3242;
	line-height: 1.8;
}

.policy__list {
	list-style: disc;
	padding-left: 1.25rem;
	margin: 0 0 1.25rem;
	color: #2b3242;
}

.policy__list li {
	margin-bottom: 0.5rem;
	line-height: 1.7;
}

/* ---------- CTA banner ---------- */
.cta-banner {
	background: var(--color-charcoal);
	padding: clamp(3rem, 6vw, 5rem) 0;
}

.cta-banner__inner {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1.75rem;
}

.cta-banner__title {
	font-family: var(--font-display);
	font-size: var(--text-h2);
	font-weight: 600;
	color: var(--color-surface);
	margin: 0;
	max-width: 32ch;
}

/* ---------- Contact ---------- */
.contact {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(2.5rem, 5vw, 4.5rem);
}

.contact-form .form-row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
}

.form-field {
	margin-bottom: 1.25rem;
	display: flex;
	flex-direction: column;
}

.form-field label {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	font-weight: 600;
	color: var(--color-ink);
	margin-bottom: 0.5rem;
}

.form-field input,
.form-field textarea {
	font-family: var(--font-body);
	font-size: 1rem;
	padding: 0.85rem 1rem;
	border: 1px solid rgba(10, 14, 26, 0.2);
	border-radius: 2px;
	background: var(--color-white);
	color: var(--color-ink);
	transition: border-color 0.25s ease;
	width: 100%;
}

.form-field input:focus,
.form-field textarea:focus {
	outline: none;
	border-color: var(--color-gold);
}

.form-field textarea {
	resize: vertical;
}

.form-message {
	padding: 1rem 1.25rem;
	border-radius: 2px;
	margin-bottom: 1.75rem;
	font-size: var(--text-small);
	border-left: 3px solid;
}

.form-message--success {
	background: rgba(196, 154, 60, 0.12);
	border-color: var(--color-gold);
	color: #6b5418;
}

.form-message--error {
	background: rgba(178, 34, 34, 0.08);
	border-color: #b22222;
	color: #8a1f1f;
}

.contact-details {
	margin-bottom: 2.5rem;
}

.contact-details li {
	margin-bottom: 1.5rem;
}

.contact-details__label {
	display: block;
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-weight: 600;
	color: var(--color-muted);
	margin-bottom: 0.35rem;
}

.contact-social__links {
	display: flex;
	flex-wrap: wrap;
	gap: 1.25rem;
	margin-top: 0.5rem;
}

.contact-social__links a {
	font-weight: 500;
}

/* ---------- Annex footer ---------- */
.annex__footer {
	margin-top: 3.5rem;
	text-align: center;
}

/* ---------- Footer ---------- */
.footer {
	background: var(--color-ink);
	color: rgba(247, 245, 240, 0.7);
	padding-top: 4rem;
}

.footer__inner {
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 0 1.5rem 3rem;
	display: grid;
	grid-template-columns: 1fr;
	gap: 2.5rem;
}

.footer__logo {
	font-family: var(--font-display);
	font-size: 1.6rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	color: var(--color-gold);
	display: inline-block;
	margin-bottom: 0.75rem;
}

.footer__tagline {
	font-family: var(--font-display);
	font-style: italic;
	font-size: 1.15rem;
	color: rgba(247, 245, 240, 0.65);
	margin: 0;
}

.footer__heading {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--color-gold);
	margin: 0 0 1.25rem;
}

.footer__links li,
.footer__contact li {
	margin-bottom: 0.7rem;
}

.footer__links a,
.footer__contact a {
	color: rgba(247, 245, 240, 0.7);
	font-size: var(--text-small);
}

.footer__links a:hover,
.footer__contact a:hover {
	color: var(--color-gold);
}

.footer__contact li {
	font-size: var(--text-small);
	line-height: 1.6;
}

.footer__social {
	display: flex;
	gap: 1rem;
	margin-top: 1.5rem;
}

.footer__social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid rgba(196, 154, 60, 0.4);
	border-radius: 2px;
	color: rgba(247, 245, 240, 0.75);
	transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.footer__social a:hover {
	background: var(--color-gold);
	border-color: var(--color-gold);
	color: var(--color-ink);
}

.footer__bottom {
	border-top: 1px solid rgba(247, 245, 240, 0.1);
	padding: 1.75rem 1.5rem;
	text-align: center;
}

.footer__copyright {
	margin: 0;
	font-size: var(--text-small);
	color: rgba(247, 245, 240, 0.5);
}

/* ---------- Posts / pagination ---------- */
.post-list {
	display: grid;
	gap: var(--gap);
}

.pagination {
	margin-top: 3rem;
}

.pagination a,
.pagination .current {
	display: inline-block;
	padding: 0.5rem 0.9rem;
	margin-right: 0.4rem;
	border: 1px solid rgba(10, 14, 26, 0.2);
}

/* ---------- Tablet ---------- */
@media (min-width: 768px) {
	.grid--2 { grid-template-columns: repeat(2, 1fr); }
	.grid--3 { grid-template-columns: repeat(3, 1fr); }
	.grid--4 { grid-template-columns: repeat(2, 1fr); }

	.contact-form .form-row {
		grid-template-columns: 1fr 1fr;
	}

	.contact {
		grid-template-columns: 1.1fr 0.9fr;
	}

	.cta-banner__inner {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}

	.footer__inner {
		grid-template-columns: 1.4fr 1fr 1.4fr;
	}
}

/* ---------- Desktop ---------- */
@media (min-width: 1024px) {
	.grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Mobile nav visibility ---------- */
@media (max-width: 767px) {
	.nav__menu {
		display: none;
	}

	.nav__toggle {
		display: flex;
	}
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}
