/*
 * Topaz Software brand tokens.
 *
 * Sampled from the source artwork rather than eyeballed:
 *   cover photo   #001130 (deepest) → #0d3a63 (mid) → #cdeff6 (ribbon highlight)
 *   profile mark  #23497a (field)   → #ffffff (ribbon)
 *
 * The identity is a deep navy field with flowing translucent blue ribbons, so the
 * site is dark by default — inverting it to a white page would throw the brand
 * away. A light preference is honoured, but as a lighter navy rather than white,
 * so the logo never sits on a field it was not drawn for.
 */

:root {
  --navy-900: #001130;   /* cover, deepest */
  --navy-800: #071f3f;
  --navy-700: #0d3a63;   /* cover, mid */
  --navy-600: #23497a;   /* profile field */
  --blue-400: #3f8fd6;
  --blue-300: #5cb3ff;
  --blue-200: #9ad4f0;
  --ice:      #cdeff6;   /* ribbon highlight */

  --bg:      var(--navy-900);
  --surface: rgba(255, 255, 255, .04);
  --fg:      #e8f1f8;
  --muted:   #93a9c4;
  --line:    rgba(154, 212, 240, .16);
  --accent:  var(--blue-300);
  --code-bg: rgba(0, 0, 0, .32);
  --danger:  #ff9d9d;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg:      #f4f8fc;
    --surface: #ffffff;
    --fg:      #0b1f3a;
    --muted:   #4a6280;
    --line:    rgba(35, 73, 122, .18);
    --accent:  #1a5fa8;
    --code-bg: #eaf1f8;
    --danger:  #b3261e;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 780px; margin: 0 auto; padding: 0 1.25rem 5rem; }

/* Hero — the cover artwork itself, darkened just enough to keep text legible.
   The gradient fades into the page background so there is no hard seam. */
.hero {
  position: relative;
  background:
    linear-gradient(to bottom, rgba(0,17,48,.55) 0%, rgba(0,17,48,.88) 70%, var(--bg) 100%),
    url("/img/orfa-hero-texture.png") center/cover no-repeat;
  padding: 3rem 1.25rem 2.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
}
@media (prefers-color-scheme: light) {
  .hero {
    background:
      linear-gradient(to bottom, rgba(0,17,48,.72) 0%, rgba(0,17,48,.90) 70%, rgba(0,17,48,.96) 100%),
      url("/img/orfa-hero-texture.png") center/cover no-repeat;
  }
  .hero, .hero h1, .hero .lede { color: #e8f1f8; }
}
.hero-inner { max-width: 780px; margin: 0 auto; }

.brandbar { display: flex; align-items: center; gap: .7rem; margin-bottom: 1.75rem; }
.brandbar img { width: 34px; height: 34px; display: block; }
.brandbar span { font-weight: 600; font-size: .95rem; letter-spacing: .01em; color: #e8f1f8; }

.tag {
  display: inline-block; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--blue-200); border: 1px solid var(--line); border-radius: 99px;
  padding: .22rem .7rem; background: rgba(0,0,0,.25);
}

/* Site nav. Wraps rather than scrolls — on a narrow screen a second row of
   links is readable, a horizontally clipped one is not. */
.nav {
  display: flex; flex-wrap: wrap; gap: .35rem 1.1rem;
  margin: 0 0 1.5rem; font-size: .9rem;
}
.nav a {
  color: var(--blue-200); text-decoration: none; padding: .15rem 0;
  border-bottom: 1px solid transparent;
}
.nav a:hover { border-bottom-color: var(--blue-300); }
.nav a.here { color: #fff; font-weight: 600; border-bottom-color: var(--blue-300); }

h1 { font-size: 2.3rem; margin: .9rem 0 .4rem; letter-spacing: -.025em; line-height: 1.15; }
h2 { font-size: 1.15rem; margin: 2.5rem 0 .7rem; letter-spacing: -.01em; }
h3 { font-size: 1rem; margin: 1.6rem 0 .5rem; color: var(--muted); }
.lede { font-size: 1.12rem; color: var(--blue-200); margin: 0; max-width: 34em; }

a { color: var(--accent); }
ul, ol { padding-left: 1.15rem; }
li { margin: .35rem 0; }

pre {
  background: var(--code-bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 1rem; overflow-x: auto; font-size: .82rem; line-height: 1.55;
}
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .88em;
}
:not(pre) > code {
  background: var(--code-bg); padding: .1rem .35rem; border-radius: 4px;
}

table { border-collapse: collapse; width: 100%; font-size: .92rem; margin: 1rem 0; }
th, td { border: 1px solid var(--line); padding: .5rem .7rem; text-align: left; vertical-align: top; }
th { background: var(--surface); }

.cta {
  display: inline-block; text-decoration: none; font-weight: 600;
  background: linear-gradient(135deg, var(--blue-400), var(--navy-600));
  color: #fff; padding: .65rem 1.2rem; border-radius: 8px; margin-top: .6rem;
  border: 1px solid var(--line);
}
.cta:hover { filter: brightness(1.12); }

.note {
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--blue-300);
  border-radius: 8px; padding: .85rem 1rem; margin: 1.5rem 0; font-size: .93rem;
}

hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

footer {
  margin-top: 3.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line);
  color: var(--muted); font-size: .85rem;
}

/* Diagrams. Inline SVG so they follow the page's own colour tokens and stay crisp
   at any zoom — a fixed-colour raster would be wrong in one of the two themes. */
figure { margin: 1.75rem 0; }
figure svg { display: block; width: 100%; height: auto; }
figcaption {
  color: var(--muted); font-size: .85rem; margin-top: .6rem;
  padding-left: .1rem; line-height: 1.5;
}

/* ---------------------------------------------------------------------------
   Early-access form.

   A card rather than fields loose in the prose: a form that shares the page's
   text flow reads as an afterthought, and this one is the only thing on the
   landing page we are actually asking a visitor to do. Everything below uses the
   existing tokens, so it follows both themes without a second palette.
   --------------------------------------------------------------------------- */
.signup-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.6rem 1.5rem 1.35rem;
  margin: 1.75rem 0 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}

/* Two columns where the fields are naturally short, one where they are not.
   Collapses to a single column on a phone, which is where a cramped two-column
   form does the most damage. */
.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.1rem;
}
.field-grid .full { grid-column: 1 / -1; }

@media (max-width: 560px) {
  .field-grid { grid-template-columns: minmax(0, 1fr); }
  .signup-card { padding: 1.25rem 1.1rem; }
}

.field { display: flex; flex-direction: column; gap: .35rem; }

.field label {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.field label .req { color: var(--accent); font-weight: 700; }

.field input,
.field textarea {
  font: inherit;
  font-size: .95rem;
  color: var(--fg);
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .6rem .7rem;
  width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; min-height: 4.5rem; }

.field input::placeholder,
.field textarea::placeholder { color: var(--muted); opacity: .7; }

/* A visible focus ring, not just a colour shift: this form will be filled in by
   people tabbing through it, and the browser default is removed by the border
   change alone. */
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(92, 179, 255, .22);
}

.signup-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

button.cta { font: inherit; font-weight: 600; cursor: pointer; margin-top: 0; }
button.cta[disabled] { opacity: .55; cursor: progress; filter: none; }

.form-status { font-size: .9rem; color: var(--muted); margin: 0; }
.form-status.error { color: var(--danger); }
.form-status.ok { color: var(--accent); }

.signup-done {
  display: flex; gap: .75rem; align-items: flex-start;
  font-size: .98rem; line-height: 1.5;
}
.signup-done .tick {
  flex: 0 0 auto; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: .9rem;
}

.privacy-line { font-size: .84rem; color: var(--muted); margin-top: .9rem; }

/* Off-screen rather than display:none — a bot that skips hidden fields is
   exactly the bot we are trying to catch. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
