/* Shared look for the project pages and the admin page.
   Colors and fonts mirror the main page so everything feels like one site. */

:root {
  --night: #050608;
  --night-2: #0a0c10;
  --panel: rgba(12, 14, 19, 0.82);
  --silver: #cfd3d9;
  --bright: #f1f3f6;
  --mist: #7f8792;
  --mist-dim: #4a515b;
  --line: rgba(207, 211, 217, 0.12);
  --line-strong: rgba(207, 211, 217, 0.22);
  --red: #e00b1c;
  --red-glow: #ff2e3f;
  --accent: #cfd3d9;           /* replaced per project */
  --sans: "Josefin Sans", "Montserrat", "Segoe UI", system-ui, sans-serif;
  --serif: "Cormorant Garamond", "Georgia", serif;
  --measure: 46rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: dark; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--night); color: var(--mist);
  font-family: var(--serif); font-size: 18px; line-height: 1.6;
  min-height: 100vh; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, video, iframe { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: rgba(224, 11, 28, 0.35); color: #fff; }
:focus-visible { outline: 1px solid var(--silver); outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- atmosphere (a calmer version of the main page) ---------- */
#rain { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; pointer-events: none; opacity: 0.55; }
.glow {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(70% 45% at 50% -5%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%);
}
.vignette {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
}
.grain {
  position: fixed; inset: -50%; width: 200%; height: 200%; z-index: 3; pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.8 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.page { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem clamp(1rem, 4vw, 2.5rem);
}
.brand { display: inline-flex; align-items: center; gap: 0.8rem; color: var(--mist); transition: color .5s; }
.brand:hover { color: var(--silver); }
.brand .mark { height: 34px; width: auto; --bar: var(--red); }
.brand .name { font-family: var(--sans); font-weight: 300; font-size: 0.62rem; letter-spacing: 0.42em; text-transform: uppercase; }
.topbar nav { display: flex; gap: 1.6rem; align-items: center; }
.topbar nav a, .topbar nav button {
  font-style: italic; font-size: 1rem; color: var(--mist); border-bottom: 1px solid transparent;
  background: none; border-top: 0; border-left: 0; border-right: 0; cursor: pointer; padding: 0; line-height: 1.3;
  transition: color .4s, border-color .4s;
}
.topbar nav a:hover, .topbar nav button:hover { color: var(--silver); border-bottom-color: var(--mist-dim); }

/* ---------- typography helpers ---------- */
.label {
  font-family: var(--sans); font-weight: 300; font-size: 0.7rem; letter-spacing: 0.42em; text-indent: 0.42em;
  text-transform: uppercase; color: var(--mist);
}
.kicker { font-family: var(--sans); font-weight: 300; font-size: 0.64rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--mist); }
.divider { display: flex; align-items: center; justify-content: center; gap: 1.2rem; padding: 0 8vw; }
.divider .hair { flex: 1; height: 1px; background: linear-gradient(to right, transparent, var(--line-strong), transparent); }
.divider .gem { width: 5px; height: 5px; transform: rotate(45deg); background: var(--mist); opacity: 0.7; }

/* ---------- buttons & fields ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--sans); font-weight: 300; font-size: 0.72rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--silver); background: transparent; border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 0.8rem 1.5rem 0.68rem; cursor: pointer; transition: border-color .4s, color .4s, background .4s, box-shadow .4s;
  text-indent: 0.24em; white-space: nowrap;
}
.btn:hover { border-color: var(--accent); color: var(--bright); box-shadow: 0 0 24px -10px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn:disabled { opacity: 0.45; cursor: default; box-shadow: none; }
.btn.primary { border-color: color-mix(in srgb, var(--accent) 70%, transparent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.btn.danger:hover { border-color: var(--red-glow); color: #ffd3d7; box-shadow: 0 0 24px -10px rgba(255, 46, 63, 0.7); }
.btn.small { padding: 0.55rem 1rem 0.45rem; font-size: 0.62rem; }
.btn.ghost { border-color: transparent; color: var(--mist); }
.btn.ghost:hover { color: var(--silver); border-color: var(--line-strong); box-shadow: none; }

.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field > span { font-family: var(--sans); font-weight: 300; font-size: 0.64rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--mist); }
.field input, .field textarea, .field select {
  width: 100%; background: rgba(255, 255, 255, 0.025); border: 1px solid var(--line); border-radius: 10px;
  padding: 0.75rem 0.9rem; color: var(--bright); font-family: var(--serif); font-size: 1.1rem; line-height: 1.5;
  transition: border-color .3s, background .3s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: rgba(255, 255, 255, 0.04); }
.field textarea { min-height: 12rem; resize: vertical; }
.field select option { background: #0c0e13; }
.field input::placeholder, .field textarea::placeholder { color: var(--mist-dim); font-style: italic; }
.help { font-size: 0.95rem; font-style: italic; color: var(--mist-dim); }
.msg { font-family: var(--sans); font-weight: 300; font-size: 0.8rem; letter-spacing: 0.06em; padding: 0.7rem 1rem; border-radius: 10px; border: 1px solid var(--line); }
.msg.error { color: #ffc9ce; border-color: rgba(255, 46, 63, 0.4); background: rgba(224, 11, 28, 0.08); }
.msg.ok { color: #cfe9d9; border-color: rgba(36, 165, 124, 0.4); background: rgba(36, 165, 124, 0.08); }
.msg:empty { display: none; }

/* ---------- footer ---------- */
.foot { margin-top: auto; padding: 2.6rem 1.5rem 3.2rem; display: flex; flex-direction: column; align-items: center; gap: 1.3rem; }
.foot .mark { height: 44px; width: auto; color: var(--mist); --bar: var(--red); opacity: 0.85; }
.foot nav { display: flex; gap: 2.2rem; flex-wrap: wrap; justify-content: center; }
.foot nav a { font-style: italic; font-size: 1.05rem; color: var(--mist); border-bottom: 1px solid transparent; transition: color .5s, border-color .5s; }
.foot nav a:hover { color: var(--silver); border-color: var(--mist-dim); }
.foot .fine { font-family: var(--sans); font-weight: 300; font-size: 0.6rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--mist-dim); }

@media (prefers-reduced-motion: reduce) { #rain { display: none; } }
@media (max-width: 600px) {
  body { font-size: 17px; }
  .topbar nav { gap: 1rem; }
  .brand .name { display: none; }
}
