/* sqsl / Seqsual - shared styles. Mobile first, dark theme (the logo is white). */

/* Vesta W01 Regular (Linotype web font, licensed by the site owner) - self-hosted, regular weight only.
   Has no Latin Extended letters (c-caron etc.), so those fall back to Inter. */
@font-face {
  font-family: "Vesta";
  src: url("fonts/VestaW01-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Inter (SIL Open Font License, see fonts/OFL.txt) - self-hosted, fallback font */
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0f0f11;
  --surface: #1a1a1e;
  --text: #e4e4e7;
  --muted: #9a9aa3;
  --accent: #6cb6ff;
  --line: #2a2a30;
  --line-strong: #44444d;
  --max-width: 64rem;
  --text-width: 44rem;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: "Vesta", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.65;
  letter-spacing: 0.03em;
  color: var(--text);
  background: var(--bg);
}

/* No bold anywhere: headings use the regular weight */
h1, h2, h3, h4, h5, h6 {
  font-weight: 400;
}

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

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

a:hover {
  text-decoration: none;
}

/* ---------- Header and navigation ---------- */

.site-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}

.logo img {
  width: 5rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  color: var(--text);
}

.site-nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* ---------- Page content ---------- */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

.app-intro {
  text-align: center;
  max-width: var(--text-width);
  margin: 0 auto 2rem;
}

.app-intro h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.2;
}

.app-intro .tagline {
  margin: 0.5rem 0 1.25rem;
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--muted);
}

.button {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  text-decoration: none;
}

.button:hover {
  background: var(--accent);
  color: var(--bg);
}

.text {
  max-width: var(--text-width);
  margin: 0 auto;
}

.text h2 {
  margin: 2.5rem 0 0.5rem;
  font-size: 1rem;
  line-height: 1.65;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.text h3 {
  margin: 1.5rem 0 0.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.text ul {
  padding-left: 1.25rem;
}

.text li {
  margin-bottom: 0.4rem;
}

hr {
  max-width: var(--text-width);
  margin: 2.5rem auto;
  border: 0;
  border-top: 1px solid var(--line-strong);
}

/* ---------- Image gallery ---------- */

.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 0 0 2.5rem;
}

.gallery a {
  display: block;
  background: var(--surface);
}

.gallery img {
  width: 100%;
}

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

.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1rem 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

/* ---------- Wider screens ---------- */

@media (min-width: 40rem) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .app-intro h1 {
    font-size: 2.5rem;
  }
}

@media (min-width: 52rem) {
  .site-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  main {
    padding-top: 3rem;
  }
}

@media (min-width: 64rem) {
  .gallery.three {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Lightbox (see gallery.js) ---------- */

.lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 1rem;
  border: 0;
  background: transparent;
  cursor: zoom-out;
}

.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox::backdrop {
  background: rgba(15, 15, 17, 0.96);
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

body:has(.lightbox[open]) {
  overflow: hidden;
}

/* ---------- Additions for the remaining pages ---------- */

/* Extra space above a gallery that directly follows a text block (all pages) */
.text + .gallery {
  margin-top: 1.5rem;
}

.gallery.single {
  grid-template-columns: 1fr;
  max-width: var(--text-width);
  margin-left: auto;
  margin-right: auto;
}

.video {
  max-width: var(--text-width);
  margin: 0 auto 2.5rem;
  aspect-ratio: 16 / 9;
  background: var(--surface);
}

.video iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Pages holding several apps (Etc..., Retired) */
.page-title {
  max-width: var(--text-width);
  margin: 0 auto 2rem;
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.2;
}

.app + .app {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--line-strong);
}

.app-intro h2 {
  margin: 0;
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.2;
}

.text p .button,
.text > p > .button {
  margin: 0.5rem 0;
}

/* Contact page */
.contact-form label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.4rem;
}

.contact-form textarea {
  min-height: 10rem;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.contact-form button.button {
  font: inherit;
  background: transparent;
  cursor: pointer;
}

.contact-form button.button:hover {
  background: var(--accent);
  color: var(--bg);
}

.contact-form button.button:disabled {
  opacity: 0.5;
  cursor: wait;
}

.form-status.ok {
  color: var(--text);
}

.form-status.error {
  color: #ff8a80;
}

/* Spam trap: off-screen, not display:none (bots would skip that) */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
