/* ==========================================================================
   Elemenol — site styles
   Dark & sleek, warmed by textured brass and verdigris copper,
   with the faintest whisper of Victorian ornament.
   ========================================================================== */

:root {
  color-scheme: dark;

  --ink: #0f0b09;
  --text: #f3e9d2;
  --text-dim: #d2c1a0;
  --text-faint: #a8977a;

  --brass-dark: #6e4b1c;
  --brass: #c99a48;
  --brass-light: #f1d793;
  --verdigris-dark: #1d4a43;
  --verdigris: #3f9a8a;
  --verdigris-light: #9ee6d3;

  --grad-brass: linear-gradient(135deg, #6e4b1c 0%, #c99a48 18%, #f4dd9e 30%, #b88a3e 46%, #7a5321 62%, #d8b061 80%, #8a6326 100%);
  --grad-brass-text: linear-gradient(180deg, #fff3cc 0%, #f1d793 32%, #c99a48 58%, #8a6326 78%, #d8b061 100%);
  --grad-verdigris: linear-gradient(160deg, #4fb3a1 0%, #2f7f73 45%, #1d4a43 100%);

  /* Fine grain — gives metal a cast, slightly imperfect feel */
  --tex-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  /* Mottled patina blotches for verdigris surfaces */
  --tex-patina: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.035' numOctaves='4' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.62 0 0 0 0 0.92 0 0 0 0 0.83 2.4 0 0 0 -1.1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E");
  /* Brushed-metal striations */
  --tex-brushed: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 1px, rgba(0, 0, 0, 0.05) 1px 2px, transparent 2px 4px);

  --font-display: "Cinzel", "Trajan Pro", Georgia, serif;
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 18px;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.075rem);
  line-height: 1.7;
  color: var(--text);
  /* Fallback sky (also shown before the WebGL sky fades in) */
  background: var(--ink) linear-gradient(180deg, #24170f 0%, #6b4220 36%, #e7b366 58%, #b07a43 68%, #3a2416 100%) fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
}

a {
  color: var(--brass-light);
}

:focus-visible {
  outline: 2px solid var(--verdigris-light);
  outline-offset: 3px;
  border-radius: 4px;
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Sky & atmosphere layers ---------- */

#sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: -3;
  opacity: 0;
  transition: opacity 1.6s ease;
}

#sky.is-ready {
  opacity: 1;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(10, 6, 4, 0.5) 100%),
    linear-gradient(180deg, rgba(12, 8, 6, 0.55) 0%, transparent 18%, transparent 78%, rgba(12, 8, 6, 0.65) 100%);
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--tex-noise);
  opacity: 0.1;
  mix-blend-mode: overlay;
}

/* A tiny airship, drifting very far away */
.airship {
  position: fixed;
  top: 27vh;
  left: 0;
  z-index: -2;
  width: clamp(64px, 7vw, 110px);
  color: #2b1a10;
  opacity: 0.42;
  pointer-events: none;
  filter: blur(0.3px);
  animation: sail 170s linear infinite;
  animation-delay: -55s;
}

.airship svg {
  display: block;
  width: 100%;
  animation: bob 7s ease-in-out infinite alternate;
}

.airship .prop {
  transform-origin: 43px 46.5px;
  animation: prop 0.14s linear infinite alternate;
}

@keyframes sail {
  from { transform: translateX(-20vw); }
  to   { transform: translateX(120vw); }
}

@keyframes bob {
  from { transform: translateY(-4px) rotate(-1deg); }
  to   { transform: translateY(5px) rotate(1deg); }
}

@keyframes prop {
  from { transform: scaleY(1); }
  to   { transform: scaleY(0.15); }
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1.25rem, 4vw, 3rem);
  background: linear-gradient(180deg, rgba(15, 11, 9, 0.72), rgba(15, 11, 9, 0.4));
  -webkit-backdrop-filter: blur(10px) saturate(130%);
  backdrop-filter: blur(10px) saturate(130%);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 154, 72, 0.7) 20%, rgba(241, 215, 147, 0.95) 50%, rgba(201, 154, 72, 0.7) 80%, transparent);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  transition: transform 0.8s var(--ease-out);
}

.brand:hover .brand-mark {
  transform: rotate(60deg);
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  background: var(--grad-brass-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav {
  display: flex;
  gap: clamp(1.1rem, 3vw, 2.25rem);
}

.nav a {
  position: relative;
  padding: 0.4rem 0;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-dim);
  transition: color 0.3s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: 0;
  height: 1px;
  background: var(--brass-light);
  transition: left 0.35s var(--ease-out), right 0.35s var(--ease-out);
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--brass-light);
}

.nav a:hover::after,
.nav a:focus-visible::after,
.nav a[aria-current="page"]::after {
  left: 0;
  right: 0.24em;
}

.nav a[aria-current="page"] {
  color: var(--verdigris-light);
}

.nav a[aria-current="page"]::after {
  background: var(--verdigris-light);
}

/* ---------- Shared type bits ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--verdigris-light);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 2.5rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brass));
}

.eyebrow::after {
  background: linear-gradient(90deg, var(--brass), transparent);
}

.brass-text {
  background: var(--grad-brass-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.divider {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  max-width: 18rem;
  margin: 1.4rem auto 2rem;
  color: var(--brass);
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, currentColor);
}

.divider::after {
  background: linear-gradient(90deg, currentColor, transparent);
}

.divider span {
  width: 9px;
  height: 9px;
  transform: rotate(45deg);
  background: var(--grad-verdigris);
  box-shadow: 0 0 0 1px var(--brass), 0 0 0 4px rgba(201, 154, 72, 0.15);
}

/* ---------- Buttons ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.9rem 1.8rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.25s var(--ease-out), filter 0.25s ease, background-position 0.8s ease, box-shadow 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.btn:active {
  transform: translateY(0);
}

.btn .arrow {
  transition: transform 0.25s var(--ease-out);
}

.btn:hover .arrow {
  transform: translateX(3px);
}

.btn-brass {
  color: #2e1d0a;
  text-shadow: 0 1px 0 rgba(255, 240, 200, 0.5);
  background: var(--tex-noise), var(--tex-brushed), var(--grad-brass);
  background-size: 180px 180px, auto, 220% 100%;
  background-position: 0 0, 0 0, 0% 0;
  background-blend-mode: overlay, normal, normal;
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 210, 0.7),
    inset 0 -2px 0 rgba(60, 35, 10, 0.4),
    0 0 0 1px rgba(30, 18, 6, 0.75),
    0 12px 26px -10px rgba(0, 0, 0, 0.75);
}

.btn-brass:hover {
  background-position: 0 0, 0 0, 100% 0;
}

.btn-verdigris {
  color: #effff9;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.45);
  background: var(--tex-patina), var(--tex-noise), var(--grad-verdigris);
  background-size: 300px 300px, 180px 180px, auto;
  background-blend-mode: normal, overlay, normal;
  box-shadow:
    inset 0 1px 0 rgba(200, 255, 240, 0.35),
    0 0 0 1px rgba(10, 30, 26, 0.85),
    0 0 0 3px rgba(201, 154, 72, 0.35),
    0 12px 26px -10px rgba(0, 0, 0, 0.75);
}

/* ---------- Home / hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(2rem, 6vh, 5rem) 1.25rem clamp(3rem, 8vh, 6rem);
}

/* Soft dark halo so the copy always reads against the bright sky */
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: min(980px, 140vw);
  height: min(680px, 110vh);
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(14, 9, 6, 0.5), rgba(14, 9, 6, 0.22) 55%, transparent);
  pointer-events: none;
}

.emblem {
  width: clamp(112px, 15vw, 150px);
  aspect-ratio: 1;
  margin-bottom: 1.6rem;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.55));
}

.emblem svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.gear-spin {
  transform-origin: 60px 60px;
  animation: spin 90s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.title {
  margin: 0;
  padding-left: 0.08em; /* balance the letter tracking */
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 10vw, 7rem);
  line-height: 1;
  letter-spacing: 0.08em;
  background:
    linear-gradient(110deg, transparent 42%, rgba(255, 250, 232, 0.65) 50%, transparent 58%),
    var(--tex-noise),
    var(--grad-brass-text);
  background-size: 250% 100%, 220px 220px, 100% 100%;
  background-repeat: no-repeat, repeat, no-repeat;
  background-blend-mode: normal, overlay, normal;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 rgba(60, 35, 10, 0.9)) drop-shadow(0 14px 30px rgba(0, 0, 0, 0.45));
  animation: shine 10s ease-in-out 1.5s infinite;
}

@keyframes shine {
  0%        { background-position: 0% 0, 0 0, 0 0; }
  30%, 100% { background-position: 100% 0, 0 0, 0 0; }
}

.plaque {
  position: relative;
  display: inline-block;
  margin: 1.75rem 0 1.5rem;
  padding: 0.85rem calc(2.7rem - 0.5em) 0.8rem 2.7rem;
  font-family: var(--font-display);
  font-size: clamp(0.85rem, 1.6vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: #3a2610;
  text-shadow: 0 1px 0 rgba(255, 241, 200, 0.55), 0 -1px 0 rgba(0, 0, 0, 0.25);
  border-radius: 4px;
  background:
    radial-gradient(circle at 13px 50%, #fff2c8 0 1px, #c99a48 1.6px, #5a3c14 3.6px, transparent 4.4px),
    radial-gradient(circle at calc(100% - 13px) 50%, #fff2c8 0 1px, #c99a48 1.6px, #5a3c14 3.6px, transparent 4.4px),
    var(--tex-noise),
    var(--tex-brushed),
    var(--grad-brass);
  background-size: auto, auto, 180px 180px, auto, 200% 100%;
  background-blend-mode: normal, normal, overlay, normal, normal;
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 210, 0.7),
    inset 0 -2px 0 rgba(60, 35, 10, 0.45),
    inset 0 0 0 1px rgba(90, 60, 20, 0.6),
    0 0 0 1px rgba(20, 12, 6, 0.6),
    0 0 0 5px rgba(20, 12, 6, 0.25),
    0 12px 26px -8px rgba(0, 0, 0, 0.6);
}

.tagline {
  max-width: 36ch;
  margin: 0 auto 2.2rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  line-height: 1.45;
  color: var(--text);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* ---------- Content pages (About) ---------- */

.page {
  flex: 1;
  padding: clamp(2rem, 6vh, 4.5rem) 1.25rem clamp(3rem, 8vh, 6rem);
}

.panel {
  position: relative;
  max-width: 54rem;
  margin: 0 auto;
  padding: clamp(2.25rem, 5vw, 4rem);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(201, 154, 72, 0.09), transparent 60%),
    linear-gradient(180deg, rgba(24, 17, 13, 0.82), rgba(14, 10, 8, 0.9));
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  backdrop-filter: blur(16px) saturate(120%);
  box-shadow:
    0 30px 80px -20px rgba(0, 0, 0, 0.6),
    0 10px 30px -10px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 230, 180, 0.06);
}

/* Brass frame */
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1.5px;
  border-radius: inherit;
  background: var(--grad-brass);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Inner hairline */
.panel::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(201, 154, 72, 0.16);
  border-radius: calc(var(--radius) - 7px);
  pointer-events: none;
}

.corner {
  position: absolute;
  width: 44px;
  height: 44px;
  color: var(--brass-light);
  opacity: 0.8;
  pointer-events: none;
}

.corner.tl { top: 7px; left: 7px; }
.corner.tr { top: 7px; right: 7px; transform: scaleX(-1); }
.corner.bl { bottom: 7px; left: 7px; transform: scaleY(-1); }
.corner.br { bottom: 7px; right: 7px; transform: scale(-1); }

.panel-head {
  text-align: center;
}

.panel h1 {
  margin: 0.25rem 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.6vw, 3rem);
  line-height: 1.15;
  letter-spacing: 0.03em;
  background: linear-gradient(180deg, #fff3cc 0%, #f1d793 45%, #d8b061 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.panel h2 {
  margin: 3rem 0 0;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  letter-spacing: 0.14em;
  color: var(--brass-light);
}

.panel h2 + .divider {
  margin-top: 1rem;
}

.panel p {
  margin: 0 0 1.15rem;
  color: var(--text-dim);
}

.panel .lead {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.3rem, 2.5vw, 1.65rem);
  line-height: 1.45;
  color: var(--text);
}

.prose {
  max-width: 40rem;
  margin: 0 auto;
}

.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.feature {
  padding: 1.6rem 1.4rem 1.4rem;
  border-radius: 14px;
  border: 1px solid rgba(201, 154, 72, 0.22);
  background: linear-gradient(180deg, rgba(255, 236, 190, 0.05), rgba(255, 236, 190, 0.012));
  transition: transform 0.3s var(--ease-out), border-color 0.3s ease, box-shadow 0.3s ease;
}

.feature:hover {
  transform: translateY(-3px);
  border-color: rgba(241, 215, 147, 0.45);
  box-shadow: 0 18px 32px -20px rgba(0, 0, 0, 0.9);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 1rem;
  border-radius: 50%;
  color: #effff9;
  background: var(--tex-patina), var(--grad-verdigris);
  background-size: 200px 200px, auto;
  box-shadow:
    0 0 0 2px #2a1c0c,
    0 0 0 3.5px var(--brass),
    inset 0 2px 4px rgba(255, 255, 255, 0.2),
    inset 0 -3px 6px rgba(0, 0, 0, 0.35);
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.feature h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text);
}

.panel .feature p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

.panel-foot {
  margin-top: 2.25rem;
  text-align: center;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 1.4rem 1rem 1.8rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-faint);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}

.site-footer .sep {
  margin: 0 0.7em;
  color: var(--brass);
}

/* ---------- Entrance motion ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.9s var(--ease-out) forwards;
  animation-delay: calc(var(--i, 0) * 120ms + 150ms);
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 480px) {
  .brand-name { font-size: 1rem; letter-spacing: 0.16em; }
  .brand-mark { width: 32px; height: 32px; }
  .nav a { font-size: 0.72rem; letter-spacing: 0.18em; }
  .eyebrow { letter-spacing: 0.3em; font-size: 0.7rem; }
  .eyebrow::before, .eyebrow::after { width: 1.5rem; }
  .plaque { letter-spacing: 0.35em; padding-left: 2.2rem; padding-right: calc(2.2rem - 0.35em); }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .airship {
    display: none;
  }
}
