/* Ottawa Studios — shared site styles.
   Palette tokens match the /submit_project pages in src/index.js. */

:root {
  --bg: #0f1115;
  --panel: #171a21;
  --border: #2a2f3a;
  --input-bg: #0f1218;
  --text: #e7e9ee;
  --muted: #9aa1ad;
  --accent: #5b8cff;
  --accent-hover: #6f9bff;
  --radius: 14px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f5f7;
    --panel: #ffffff;
    --border: #dce0e6;
    --input-bg: #ffffff;
    --text: #1a1d23;
    --muted: #626873;
    --accent: #3b6fe0;
    --accent-hover: #2f5fce;
  }
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-tap-highlight-color: rgba(91, 140, 255, 0.2);
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.wrap {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 max(20px, env(safe-area-inset-left)) 0 max(20px, env(safe-area-inset-right));
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  padding: calc(18px + env(safe-area-inset-top)) 0 18px;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
}

/* The mark carries the header on its own — no wordmark.
   logo.png is a black silhouette on transparency, so it's used as an alpha mask
   and painted with a theme token. That way it follows dark/light mode and can
   shift colour on hover, which a filter on an <img> can't do to pure black. */
.brand .mark {
  display: block;
  width: 46px;
  aspect-ratio: 600 / 524;
  background-color: var(--text);
  -webkit-mask: url("/logo.png") no-repeat center / contain;
  mask: url("/logo.png") no-repeat center / contain;
  transform-origin: left center;
  transition: transform 0.25s ease, background-color 0.25s ease;
}

.brand:hover .mark,
.brand:focus-visible .mark {
  transform: scale(1.06);
  background-color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  .brand .mark { transition: background-color 0.25s ease; }
  .brand:hover .mark,
  .brand:focus-visible .mark { transform: none; }
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.95rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover { color: var(--text); }

.site-nav a.current {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* ---------- main ---------- */

main { flex: 1 0 auto; padding: 56px 0 72px; }

h1 {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: clamp(2rem, 5vw, 2.9rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 20px;
}

h2 {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  margin: 40px 0 12px;
}

p { margin: 0 0 18px; max-width: 62ch; }

.lead { font-size: 1.15rem; color: var(--text); }
.muted { color: var(--muted); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}

.card h3 {
  font-size: 1rem;
  margin: 0 0 8px;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}

/* ---------- portfolio ---------- */

.work { list-style: none; margin: 32px 0 0; padding: 0; }
.work li { margin-bottom: 16px; }

/* The whole card is the link. Art is a clip of the product screenshot, dark
   enough that the copy sits on it in light or dark mode without changing. */
.work-card {
  display: block;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: #06080c;
  color: #eef1f6;
  text-decoration: none;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.work-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--art) no-repeat right center / cover;
  opacity: 0.85;
  transform: scale(1.02);
  transform-origin: right center;
  transition: transform 0.45s ease, opacity 0.25s ease;
}

.work-card--vamp { --art: url("/vamp-card.jpg"); }
.work-card--reactionweb { --art: url("/reactionweb-card.jpg"); }
.work-card--nucleus { --art: url("/nucleus-card.jpg"); }

/* ReactionWeb's UI is light. At the shared opacity its art washes the whole
   card pale grey next to the dark ones, so it's knocked back much further —
   the molecules still read, the card still belongs to the set. */
.work-card--reactionweb::before { opacity: 0.24; }

.work-card--reactionweb:hover::before,
.work-card--reactionweb:focus-visible::before { opacity: 0.36; }

/* Scrim: heaviest where the copy sits, thinning out over the artwork. */
.work-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(6, 8, 12, 0.96) 0%,
    rgba(6, 8, 12, 0.9) 38%,
    rgba(6, 8, 12, 0.48) 70%,
    rgba(6, 8, 12, 0.25) 100%
  );
}

.work-card:hover,
.work-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
}

.work-card:hover::before,
.work-card:focus-visible::before {
  transform: scale(1.07);
  opacity: 1;
}

/* Banner proportions: short, wide, copy kept to a couple of lines so the
   artwork carries the right-hand side. */
.work-body {
  position: relative;
  z-index: 1;
  padding: 22px 26px;
  max-width: 56ch;
}

.work-card h2 {
  margin: 0 0 2px;
  font-size: 1.5rem;
  color: #fff;
}

.work-tagline {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 1rem;
  color: #cfd6e2;
  margin: 0 0 10px;
}

.work-card p {
  color: #c2c9d6;
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0 0 12px;
}

.work-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.work-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.work-tags li {
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 3px 11px;
  font-size: 0.78rem;
  color: #d3d9e4;
}

.work-visit {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #7ea6ff;
  overflow-wrap: anywhere;
  transition: gap 0.25s ease, color 0.25s ease;
}

.work-card:hover .work-visit,
.work-card:focus-visible .work-visit {
  color: #a8c4ff;
  gap: 12px;
}

@media (max-width: 620px) {
  .work-body { padding: 20px 20px; }
  .work-card::after {
    background: linear-gradient(
      120deg,
      rgba(6, 8, 12, 0.96) 0%,
      rgba(6, 8, 12, 0.92) 60%,
      rgba(6, 8, 12, 0.78) 100%
    );
  }
}

@media (prefers-reduced-motion: reduce) {
  .work-card,
  .work-card::before,
  .work-visit { transition: border-color 0.25s ease, color 0.25s ease; }
  .work-card:hover,
  .work-card:focus-visible { transform: none; }
  .work-card:hover::before,
  .work-card:focus-visible::before { transform: scale(1.02); }
}

/* ---------- contact form ---------- */

.form-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
  max-width: 620px;
  margin-top: 28px;
}

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--text);
}

.field input,
.field textarea {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  padding: 12px 13px;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.15);
}

.field textarea { resize: vertical; min-height: 150px; }

/* Honeypot: hidden from people, tempting to bots. Not display:none, which
   some bots skip. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-card button {
  width: 100%;
  min-height: 48px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  padding: 13px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
  transition: background 0.15s ease;
}

.form-card button:hover:not(:disabled) { background: var(--accent-hover); }
.form-card button:disabled { opacity: 0.6; cursor: not-allowed; }

#status {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  display: none;
}

#status.show { display: block; }
#status.ok { background: rgba(58, 173, 106, 0.15); border: 1px solid #2f8f5a; }
#status.err { background: rgba(214, 78, 78, 0.15); border: 1px solid #a63b3b; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0 calc(24px + env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
