/* ==========================================================================
   Cyram — Base Styles, Tanned-Leather Grain Surface & Institutional Buttons
   ========================================================================== */

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

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

body {
  position: relative;
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background-color: #060b12;
  background-image:
    var(--grain-fine),
    var(--grain),
    var(--sheen-1),
    var(--sheen-2),
    linear-gradient(180deg, #070c13, #0a131d 55%, #0b1522);
  background-blend-mode: overlay, soft-light, screen, screen, normal;
  background-size: 96px 96px, 180px 180px, 150% 125%, 150% 125%, cover;
  background-repeat: repeat, repeat, no-repeat, no-repeat, no-repeat;
  line-height: 1.65;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Tactile tanned-leather micro-grain film across the viewport (GPU-composited, zero scroll jank) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  background-image: var(--grain-fine), var(--leather-pores), var(--vignette);
  background-size: 96px 96px, 140px 140px, 100% 100%;
  background-repeat: repeat, repeat, no-repeat;
  opacity: 0.19;
  mix-blend-mode: overlay;
}

main { overflow-x: clip; position: relative; z-index: 1; }

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

a { color: inherit; }

/* Accessible Focus States */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Skip Link */
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 18px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: top 0.2s ease;
}
.skip-link:focus { top: 16px; }

/* Container */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 56px);
}

/* Typography */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 30px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

/* ---------- Institutional Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Primary: dark tanned obsidian + brushed gold framing & embossed inner rim; fills matte gold on hover */
.btn-primary {
  padding: 14px 26px;
  background:
    linear-gradient(180deg, rgba(237, 204, 74, 0.17) 0%, rgba(237, 204, 74, 0.07) 100%),
    rgba(11, 21, 33, 0.84);
  color: var(--ink);
  border: 1px solid rgba(237, 204, 74, 0.78);
  box-shadow:
    inset 0 1px 0 rgba(237, 204, 74, 0.32),
    inset 0 -1px 0 rgba(0, 0, 0, 0.45),
    0 8px 24px rgba(3, 6, 11, 0.38);
}
.btn-primary .arrow { color: var(--accent); }
.btn-primary:hover,
.btn-primary:focus-visible {
  background: linear-gradient(180deg, #eed25e 0%, #dfc042 100%);
  color: var(--accent-ink);
  border-color: var(--accent);
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 224, 0.45),
    0 12px 28px rgba(237, 204, 74, 0.18);
}
.btn-primary:hover .arrow,
.btn-primary:focus-visible .arrow {
  color: var(--accent-ink);
}

/* Secondary / Ghost: quiet dark hairline, subtle leather sheen */
.btn-ghost {
  padding: 14px 26px;
  background: rgba(11, 21, 33, 0.42);
  color: var(--muted);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 var(--edge-top);
}
.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--accent-line);
  color: var(--ink);
  background: rgba(16, 27, 39, 0.78);
}

.btn .arrow {
  font-size: 0.9rem;
  line-height: 1;
  transition: transform 0.3s var(--ease), color 0.25s ease;
}
.btn:hover .arrow { transform: translate(3px, -2px); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--accent-line);
  padding-bottom: 5px;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.text-link:hover {
  color: var(--accent-hover);
  border-color: var(--accent-hover);
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: center;
  margin-top: 26px;
}
.section-actions .text-link { margin-top: 0; }

/* ---------- Sections & Textured Leather Bands ---------- */
section { position: relative; }

.section {
  padding: clamp(64px, 8.5vh, 116px) 0;
}

.band {
  background-color: #08111b;
  background-image:
    var(--grain-fine),
    var(--leather-pores),
    var(--sheen-1),
    var(--patina-warm),
    linear-gradient(180deg, #0a141f 0%, #0b1623 52%, #09121c 100%);
  background-blend-mode: overlay, soft-light, screen, screen, normal;
  background-size: 96px 96px, 140px 140px, 150% 130%, 100% 100%, cover;
  background-repeat: repeat, repeat, no-repeat, no-repeat, no-repeat;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 var(--edge-top),
    inset 0 -1px 0 rgba(0, 0, 0, 0.55);
}

.section-head { max-width: 740px; }
.section-head h2 {
  margin: 18px 0 0;
  font-size: clamp(1.85rem, 3.5vw, 3.1rem);
  line-height: 1.08;
}
.section-head p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}

/* Progressive Reveal (only hidden when JS is confirmed active) */
.js-ready .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.js-ready .reveal.in {
  opacity: 1;
  transform: none;
}
.js-ready .reveal[data-delay="1"] { transition-delay: 0.08s; }
.js-ready .reveal[data-delay="2"] { transition-delay: 0.16s; }
.js-ready .reveal[data-delay="3"] { transition-delay: 0.24s; }
.js-ready .reveal[data-delay="4"] { transition-delay: 0.32s; }

@media (max-width: 960px) {
  body::before { opacity: 0.13; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .js-ready .reveal { opacity: 1; transform: none; }
}
