/* ============================================================
   EBONO INSTITUTE — ebono.au
   Core scheme: rough silver on black, edged with navy.
   Three UVP strands each carry their own accent + hover colour:
     ArtIE   (artificial intelligence)  — silver / ice-blue
     ArchIE  (archived intelligence)    — wood / leather
     YLYP    (post-collapse civilisation) — earthy yellow / green
   ============================================================ */

:root {
  /* -- core palette -- */
  --black:      #05070a;
  --navy:       #0c1424;
  --navy-edge:  #16264a;
  --silver:     #c7ccd1;
  --silver-dim: #7c838b;
  --white:      #ffffff;
  --ice-blue:   #a9dcef;

  /* -- strobe cycle (idle state of the UVP text) -- */
  --strobe-1: var(--white);
  --strobe-2: var(--silver);
  --strobe-3: var(--ice-blue);

  /* -- per-strand hover colours -- */
  --hover-artie:   #ffcBA4; /* peach   */
  --hover-archie:  #f2a65a; /* apricot */
  --hover-ylyp:    #ff8a3d; /* orange  */

  /* -- per-strand accent schemes (image stage border/glow) -- */
  --artie-a:  #aee3f2;
  --artie-b:  #c7ccd1;
  --archie-a: #a9835a;
  --archie-b: #6e4726;
  --ylyp-a:   #c9a227;
  --ylyp-b:   #3f5a34;

  /* -- type -- */
  --font-display: 'Fraunces', 'Georgia', serif;
  --font-body:    'IBM Plex Sans', system-ui, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, monospace;

  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--black);
  color: var(--silver);
  font-family: var(--font-body);
  min-height: 100%;
}

body {
  background:
    radial-gradient(ellipse 900px 600px at 50% -10%, rgba(22,38,74,0.35), transparent 60%),
    linear-gradient(180deg, var(--black) 0%, #06090d 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 6vh 6vw 10vh;
}

/* subtle brushed-silver noise edge along the top */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--silver-dim), var(--ice-blue), var(--silver-dim), transparent);
  opacity: 0.5;
}

/* ---------------- header ---------------- */

.site-header {
  width: 100%;
  max-width: 980px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 9vh;
}

.logo-mark {
  height: 58px;
  width: auto;
  filter: drop-shadow(0 0 14px rgba(169, 220, 239, 0.15));
}

/* ---------------- UVP headline (the signature element) ---------------- */

.uvp {
  width: 100%;
  max-width: 980px;
  font-family: var(--font-display);
  font-weight: 480;
  font-size: clamp(1.9rem, 4.6vw, 3.6rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin: 0 0 6vh;
}

.uvp .lead-in {
  color: var(--silver-dim);
  font-weight: 380;
}

.strand {
  --idle: var(--white);
  --hover: var(--white);
  cursor: pointer;
  text-decoration: none;
  background: none;
  border: none;
  color: var(--idle);
  font: inherit;
  padding: 0 0.06em;
  position: relative;
  transition: color 0.35s ease;
  animation: strobe 6s ease-in-out infinite;
}

.strand:nth-of-type(1) { animation-delay: 0s; }
.strand:nth-of-type(2) { animation-delay: -2s; }
.strand:nth-of-type(3) { animation-delay: -4s; }

.strand[data-strand="artie"]  { --hover: var(--hover-artie); }
.strand[data-strand="archie"] { --hover: var(--hover-archie); }
.strand[data-strand="ylyp"]   { --hover: var(--hover-ylyp); }

.strand:hover,
.strand:focus-visible,
.strand.is-active {
  color: var(--hover);
  animation-play-state: paused;
}

.strand::after {
  content: "";
  position: absolute;
  left: 0.06em; right: 0.06em; bottom: -0.06em;
  height: 1px;
  background: currentColor;
  opacity: 0;
  transform: scaleX(0.4);
  transform-origin: left;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.strand:hover::after,
.strand:focus-visible::after,
.strand.is-active::after {
  opacity: 0.6;
  transform: scaleX(1);
}

@keyframes strobe {
  0%, 100% { color: var(--strobe-1); }
  33%      { color: var(--strobe-2); }
  66%      { color: var(--strobe-3); }
}

.strand:hover, .strand:focus-visible, .strand.is-active { animation-name: none; }

/* ---------------- image stage ---------------- */

.stage {
  width: 100%;
  max-width: 460px;
  aspect-ratio: 3 / 4;
  position: relative;
  border-radius: 2px;
  border: 1px solid var(--navy-edge);
  overflow: hidden;
  background: var(--navy);
  transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

.stage[data-active="artie"]  { border-color: var(--artie-a);  box-shadow: 0 0 40px -12px rgba(174,227,242,0.35); }
.stage[data-active="archie"] { border-color: var(--archie-a); box-shadow: 0 0 40px -12px rgba(169,131,90,0.35); }
.stage[data-active="ylyp"]   { border-color: var(--ylyp-a);   box-shadow: 0 0 40px -12px rgba(201,162,39,0.35); }

.stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.stage img.is-visible { opacity: 1; }

.stage-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0.7rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.75));
  color: var(--silver);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.stage-caption.is-visible { opacity: 1; }

.stage-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--silver-dim);
  text-align: center;
  padding: 2rem;
  opacity: 1;
  transition: opacity 0.4s ease;
}

.stage-hint.is-hidden { opacity: 0; }

/* ---------------- footer ---------------- */

.site-footer {
  margin-top: 8vh;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--silver-dim);
  text-align: center;
}

/* ---------------- contact FAB ---------------- */

.contact-fab {
  position: fixed;
  right: clamp(16px, 4vw, 40px);
  bottom: clamp(16px, 4vw, 40px);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--navy-edge);
  background: linear-gradient(135deg, var(--navy), var(--black));
  color: var(--silver);
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 30px -10px rgba(0,0,0,0.7);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  z-index: 40;
}

.contact-fab:hover, .contact-fab:focus-visible {
  border-color: var(--ice-blue);
  transform: translateY(-2px);
  box-shadow: 0 10px 34px -8px rgba(169,220,239,0.25);
}

.contact-fab svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ---------------- contact modal ---------------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3,5,8,0.72);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vh 5vw;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 50;
}

.modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  width: 100%;
  max-width: 460px;
  background: var(--navy);
  border: 1px solid var(--navy-edge);
  border-radius: 4px;
  padding: 2rem;
  transform: translateY(12px);
  transition: transform 0.35s ease;
}

.modal-overlay.is-open .modal { transform: translateY(0); }

.modal h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.4rem;
  margin: 0 0 0.4rem;
  color: var(--white);
}

.modal p.modal-sub {
  margin: 0 0 1.4rem;
  font-size: 0.85rem;
  color: var(--silver-dim);
}

.modal label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--silver-dim);
  margin: 1rem 0 0.35rem;
}

.modal input,
.modal textarea {
  width: 100%;
  background: var(--black);
  border: 1px solid var(--navy-edge);
  border-radius: 2px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0.65rem 0.75rem;
  resize: vertical;
}

.modal input:focus,
.modal textarea:focus {
  outline: none;
  border-color: var(--ice-blue);
}

.modal-actions {
  margin-top: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.modal-submit {
  background: linear-gradient(135deg, var(--ice-blue), var(--silver));
  color: var(--black);
  border: none;
  border-radius: 999px;
  padding: 0.65rem 1.4rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.modal-submit:hover { transform: translateY(-1px); box-shadow: 0 6px 20px -6px rgba(169,220,239,0.4); }

.modal-close {
  background: none;
  border: none;
  color: var(--silver-dim);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.modal-close:hover { color: var(--silver); }

.modal-status {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  min-height: 1em;
}

.modal-status[data-state="ok"]  { color: #9fe6b0; }
.modal-status[data-state="err"] { color: #ff9d8a; }

/* ---------------- reduced motion ---------------- */

@media (prefers-reduced-motion: reduce) {
  .strand { animation: none; color: var(--silver); }
  .stage img, .contact-fab, .modal, .modal-overlay { transition: none; }
}

/* ---------------- responsive ---------------- */

/* ---------------- legal / support pages ---------------- */

.legal-page {
  align-items: stretch;
  padding: 6vh 6vw 10vh;
}

.legal-header {
  width: 100%;
  max-width: 720px;
  margin: 0 auto 5vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.legal-header .logo-mark {
  height: 46px;
}

.legal-header a.home-link {
  display: inline-block;
  margin-bottom: 1.4rem;
}

.legal-nav {
  width: 100%;
  max-width: 720px;
  margin: 0 auto 3vh;
  display: flex;
  gap: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-nav a {
  color: var(--silver-dim);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.legal-nav a:hover, .legal-nav a[aria-current="page"] {
  color: var(--ice-blue);
  border-color: var(--ice-blue);
}

.legal-content {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--silver);
}

.legal-content h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--white);
  margin: 0 0 0.4rem;
}

.legal-content .legal-updated {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--silver-dim);
  text-transform: uppercase;
  margin: 0 0 3rem;
}

.legal-content h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.25rem;
  color: var(--ice-blue);
  margin: 2.6rem 0 0.9rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--navy-edge);
}

.legal-content h2:first-of-type { border-top: none; padding-top: 0; }

.legal-content h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--white);
  margin: 1.6rem 0 0.5rem;
}

.legal-content p { margin: 0 0 1.1rem; }

.legal-content ul, .legal-content ol {
  margin: 0 0 1.1rem;
  padding-left: 1.3rem;
}

.legal-content li { margin-bottom: 0.5rem; }

.legal-content a { color: var(--ice-blue); }

.legal-content strong { color: var(--white); }

.legal-callout {
  border: 1px solid var(--navy-edge);
  border-left: 3px solid var(--ice-blue);
  background: rgba(169, 220, 239, 0.05);
  padding: 1rem 1.2rem;
  margin: 0 0 2rem;
  font-size: 0.88rem;
  color: var(--silver);
}

.legal-footer {
  width: 100%;
  max-width: 720px;
  margin: 5vh auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--navy-edge);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--silver-dim);
  text-align: center;
}

@media (max-width: 620px) {
  .legal-page { padding: 5vh 6vw 10vh; }
}

