/* ================================================================
   TANTRA THEME — BASE STYLES
   ================================================================ */

/* ── Reset ────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background-color: var(--bg-1);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  font-weight: var(--weight-regular);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── Scrollbar ────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dim); }

/* ── Typography ───────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--weight-regular);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-snug);
  color: var(--text-primary);
}

h1 { font-size: clamp(var(--text-3xl), 6vw, var(--text-5xl)); }
h2 { font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl)); }
h3 { font-size: clamp(var(--text-xl), 3vw, var(--text-3xl)); }
h4 { font-size: clamp(var(--text-lg), 2.5vw, var(--text-2xl)); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  line-height: var(--leading-normal);
  color: var(--text-secondary);
  max-width: 70ch;
}

a {
  color: var(--gold-light);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

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

a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

strong, b { font-weight: var(--weight-semibold); color: var(--text-primary); }
em { font-style: italic; }

small { font-size: var(--text-sm); }

::selection {
  background: var(--gold);
  color: var(--text-inverse);
}

/* ── Lists ────────────────────────────────────────────────────── */
ul, ol { padding-left: var(--space-6); }
li { line-height: var(--leading-normal); margin-bottom: var(--space-1); color: var(--text-secondary); }

/* ── Images ───────────────────────────────────────────────────── */
img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

img[loading="lazy"] { background: var(--bg-3); }

/* ── Form Elements ────────────────────────────────────────────── */
input, textarea, select, button {
  font-family: var(--font-body);
  font-size: var(--text-base);
}

input, textarea, select {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--surface-2);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  width: 100%;
  outline: none;
  transition:
    border-color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
}

input::placeholder, textarea::placeholder {
  color: var(--text-muted);
}

input:focus, textarea:focus, select:focus {
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 3px rgba(196,151,74,0.15);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a09880' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  padding-right: var(--space-10);
}

input[type="checkbox"], input[type="radio"] {
  width: auto;
  accent-color: var(--gold);
}

label {
  display: block;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

/* ── HR ───────────────────────────────────────────────────────── */
hr {
  border: none;
  border-top: var(--border);
  margin: var(--space-8) 0;
}

/* ── Code ─────────────────────────────────────────────────────── */
code, pre {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

code {
  background: var(--bg-3);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  color: var(--gold-light);
}

/* ── Skip Link ────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: var(--space-4);
  z-index: 9999;
  padding: var(--space-3) var(--space-6);
  background: var(--gold);
  color: var(--text-inverse);
  border-radius: var(--radius-md);
  font-weight: var(--weight-semibold);
}

.skip-link:focus { left: var(--space-4); }

/* ── Visually hidden ──────────────────────────────────────────── */
.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;
}

/* ── Content area spacing under header ──────────────────────────*/
.site-main {
  min-height: 60vh;
  padding-top: var(--header-height);
}

/* ── Section spacing ─────────────────────────────────────────── */
.section {
  padding: clamp(var(--space-16), 8vw, var(--space-32)) 0;
  position: relative;
}

.section--sm {
  padding: clamp(var(--space-10), 5vw, var(--space-20)) 0;
}

/* ── Container ────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

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

/* ── Section heading ─────────────────────────────────────────── */
.section-heading {
  margin-bottom: clamp(var(--space-10), 4vw, var(--space-16));
}

.section-heading .eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  font-family: var(--font-body);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-3);
}

.section-heading h2 {
  margin-bottom: var(--space-4);
}

.section-heading p {
  font-size: var(--text-md);
  max-width: 55ch;
}

/* ── Utility ─────────────────────────────────────────────────── */
.text-gold { color: var(--gold); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: var(--text-sm); }
.text-xs { font-size: var(--text-xs); }

.uppercase {
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
}

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.hidden { display: none !important; }
.invisible { visibility: hidden; }

@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
}
@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
}
