/* KiFF — shared styles. Edit the colours in :root and the whole site follows. */

@font-face {
  font-family: "Orbitron";
  src: url("../fonts/orbitron-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Orbitron";
  src: url("../fonts/orbitron-latin-800-normal.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Share Tech Mono";
  src: url("../fonts/share-tech-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #0a0a0a;
  --panel: #0f1519;
  --line: #1d2a30;
  --text: #d8e4e8;
  --dim: #7f939b;
  --white: #e8fbff;
  --cyan: #00e5ff;
  --magenta: #ff2bd6;
  --amber: #ffb000;
  --green: #39ff88;
  --tabbar: 68px;
  --display: "Orbitron", "Segoe UI", system-ui, sans-serif;
  --mono: "Share Tech Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100svh;
  padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom, 0px));
}

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

a { color: var(--cyan); }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.wrap {
  width: min(100% - 2.5rem, 62rem);
  margin-inline: auto;
}

/* ---------- Header + navigation ---------- */

.site-header {
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.5rem;
}
.brand img { height: 1.35rem; width: auto; }

/* Mobile: the nav becomes a thumb-height bar along the bottom */
.nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(10, 10, 10, 0.96);
  border-top: 1px solid var(--line);
}
.nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--dim);
  text-decoration: none;
  border-top: 2px solid transparent;
}
.nav a[aria-current="page"] {
  color: var(--cyan);
  border-top-color: var(--cyan);
}
.nav a:hover { color: var(--white); }

@media (min-width: 760px) {
  body { padding-bottom: 0; }
  .nav {
    position: static;
    display: flex;
    gap: 2rem;
    height: auto;
    padding: 0;
    background: none;
    border: 0;
  }
  .nav a {
    font-size: 0.8rem;
    padding: 0.4rem 0;
    border-top: 0;
    border-bottom: 2px solid transparent;
  }
  .nav a[aria-current="page"] { border-bottom-color: var(--cyan); }
}

/* ---------- Hero ---------- */

.hero { padding: clamp(3rem, 14vh, 7rem) 0 clamp(2.5rem, 8vh, 4.5rem); }

.hero h1 { margin: 0 0 2rem; line-height: 0; }

.wm {
  width: min(100%, 34rem);
  height: auto;
  color: var(--white);
  overflow: visible;
  filter: drop-shadow(0 0 14px rgba(0, 229, 255, 0.28));
}
.wm .bridge {
  fill: var(--cyan);
  transform-box: fill-box;
  transform-origin: 0 50%;
  animation: bridge-draw 0.9s 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes bridge-draw { from { transform: scaleX(0); } }

.pitch {
  margin: 0 0 0.75rem;
  max-width: 24ch;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.2rem, 4.6vw, 1.75rem);
  line-height: 1.3;
  color: var(--white);
}
.sub { margin: 0 0 2rem; max-width: 46ch; color: var(--dim); }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.btn {
  display: inline-block;
  padding: 0.9rem 1.35rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  color: var(--cyan);
  background: #0e1b20;
  border: 1px solid rgba(0, 229, 255, 0.45);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}
.btn:hover { background: #12262d; color: var(--white); }
.btn--primary { background: var(--cyan); color: #04141a; border-color: var(--cyan); }
.btn--primary:hover { background: var(--white); color: #04141a; }

/* Plywood edge: the layered cut face of the material, used as the one divider */
.ply {
  height: 12px;
  background: repeating-linear-gradient(180deg, #d9c18f 0 2px, #7b6035 2px 3px);
  opacity: 0.6;
}

/* ---------- Sections ---------- */

.section { padding: clamp(2.5rem, 7vh, 4rem) 0; }
.section h2 {
  margin: 0 0 1.25rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--white);
}
.section p { max-width: 58ch; margin: 0 0 1rem; }

.spec { margin: 0; max-width: 40rem; }
.spec div {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}
.spec div:last-child { border-bottom: 1px solid var(--line); }
.spec dt { color: var(--dim); }
.spec dd { margin: 0; color: var(--white); }

.page-head { padding: clamp(2.5rem, 9vh, 4.5rem) 0 1.5rem; }
.page-head h1 {
  margin: 0 0 0.75rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  line-height: 1.15;
  color: var(--white);
}
.page-head p { margin: 0; max-width: 52ch; color: var(--dim); }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2rem;
  color: var(--dim);
  font-size: 0.85rem;
}

/* ---------- Contact panel ---------- */

.contact {
  width: min(92vw, 27rem);
  padding: 1.4rem;
  color: var(--text);
  background: var(--panel);
  border: 1px solid rgba(0, 229, 255, 0.4);
  border-radius: 0;
}
.contact::backdrop { background: rgba(0, 0, 0, 0.78); }
.contact h2 {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--white);
}
.contact .label { display: block; margin-bottom: 0.35rem; color: var(--dim); font-size: 0.85rem; }
.contact .msg {
  margin: 0 0 1.25rem;
  padding: 0.75rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  color: var(--white);
  background: var(--bg);
  border: 1px solid var(--line);
  max-height: 9rem;
  overflow: auto;
}
.channels { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.channels a, .channels button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0.9rem;
  font: inherit;
  color: var(--white);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  background: #0d151a;
  border: 1px solid var(--line);
}
.channels a:hover, .channels button:hover { border-color: var(--cyan); }
.channels small { color: var(--dim); font-size: 0.8rem; }
.contact .none { color: var(--amber); margin: 0 0 1rem; }
.contact .close {
  margin-top: 1rem;
  padding: 0.4rem 0;
  font: inherit;
  color: var(--dim);
  cursor: pointer;
  background: none;
  border: 0;
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  .wm .bridge { animation: none; }
}
