/* EVOSCA site styles. Hand-rolled, no build step.
   ==========================================================================

   LAYOUT
   Sections are full-bleed: each background spans the whole browser width,
   with the content inside constrained and centred. On tablet and phone the
   horizontal rows stack and the nav collapses to a hamburger.

   COLOUR
   Background is the soft blue of a Google Docs chip (#e8f0fe family). The
   wordmark has to stay readable on it, which constrains the letters more
   than it looks. Measured, not guessed:

     E        #a83527  Oracle red, darkened       5.72:1
     O        #14395a  PostgreSQL blue, darkened 10.40:1
     V S C A  #8a6300  amber                      4.74:1

   All three clear the 4.5:1 readability threshold. The catch worth knowing:
   a BRIGHT yellow (#f2c744) on this background measures 1.41:1 --
   effectively invisible -- so "yellow" here is a deep amber. In dark mode
   the ground is dark and the letters brighten back to a true yellow.

   These approximate each project's brand colour to signal "works with both
   engines". Not official assets, and no font is copied.
   ========================================================================== */

:root {
  --wm-e: #a83527;
  --wm-o: #14395a;
  /* Wordmark yellow. 1.69:1 on the chip blue and 2.05:1 on white -- far
     below any text threshold, and deliberate: WCAG 1.4.3 exempts logotypes
     from contrast requirements entirely.
     Chosen from a side-by-side comparison of eleven candidates. Brighter
     values were tried and rejected: past roughly #f2c744 the letterforms
     dissolve at header size, and on white they go first.
     NEVER reuse this token for body copy. The hero wordmark carries a faint
     darker edge (see .wordmark--hero) which is doing real work at this
     value -- removing it visibly softens the strokes. */
  --wm-y: #e8b22a;
  /* The motto is a tagline, not a logo, so it stays one step behind the
     mark: same hue, enough darker to hold its own as running text. */
  --motto-y: #dda31a;

  --bg: #e8f0fe;
  --bg-deep: #d7e6fb;
  --bg-invert: #12233a;
  --card: #ffffff;
  --fg: #16202c;
  --muted: #52616f;
  --line: #c8d9f0;
  --accent: #14395a;
  --accent-fg: #ffffff;
  --link: #14395a;
  --shadow: 0 1px 2px rgba(16,35,58,.06), 0 10px 30px rgba(16,35,58,.07);

  --evo-broken: rgba(168,53,39,.42);
  --evo-dead: rgba(168,53,39,.65);
  --evo-flow: rgba(20,57,90,.42);
  --evo-flow-strong: rgba(20,57,90,.72);
  --evo-bridge: rgba(138,99,0,.30);
  --evo-n-loose: rgba(168,53,39,.45);
  --evo-n-tight: rgba(20,57,90,.5);
  --evo-n-accent: rgba(138,99,0,.75);
  --evo-change: rgba(82,97,111,.45);
  --evo-n-capture: rgba(169,123,10,.85);
}

@media (prefers-color-scheme: dark) {
  :root {
    --wm-e: #f0705a;
    --wm-o: #7fb6e8;
    --wm-y: #f2c744;
    --motto-y: #f2c744;

    --bg: #101a26;
    --bg-deep: #16222f;
    --bg-invert: #0a121c;
    --card: #17222f;
    --fg: #e7edf4;
    --muted: #9fb0c2;
    --line: #26364a;
    --accent: #7fd1b4;
    --accent-fg: #0a1a15;
    --link: #7fd1b4;
    --shadow: 0 1px 2px rgba(0,0,0,.35), 0 10px 30px rgba(0,0,0,.3);

    --evo-broken: rgba(240,112,90,.4);
    --evo-dead: rgba(240,112,90,.7);
    --evo-flow: rgba(127,182,232,.42);
    --evo-flow-strong: rgba(127,209,180,.8);
    --evo-bridge: rgba(242,199,68,.28);
    --evo-n-loose: rgba(240,112,90,.5);
    --evo-n-tight: rgba(127,182,232,.55);
    --evo-n-accent: rgba(242,199,68,.85);
    --evo-change: rgba(159,176,194,.45);
    --evo-n-capture: rgba(242,199,68,.9);
}
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

.wrap { width: 100%; max-width: 78rem; margin: 0 auto; padding: 0 1.5rem; }
.wrap.narrow { max-width: 52rem; }

section { padding: 4rem 0; }
section.band-deep { background: var(--bg-deep); }
section.band-card { background: var(--card); }
section.band-dark { background: var(--bg-invert); color: #e7edf4; }
section.band-dark .muted { color: #9fb0c2; }
section.band-dark .card { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12); }

/* --- wordmark ------------------------------------------------------------ */

.wordmark { font-weight: 800; letter-spacing: .04em; font-size: 1.2rem; white-space: nowrap; }
.wordmark .wm-e { color: var(--wm-e); }
.wordmark .wm-o { color: var(--wm-o); }
.wordmark .wm-y { color: var(--wm-y); }
.wordmark--hero { font-size: clamp(3rem, 11vw, 6rem); letter-spacing: .01em; line-height: 1; display: block; }
/* A hairline darker edge on the light theme only. At 1.96:1 the yellow is
   the colour we want but the strokes lose definition against the pale blue;
   this holds the letterform without darkening the fill. Dark mode needs
   none of it -- the yellow already reads at 9:1 there. */
@media (prefers-color-scheme: light) {
  .wordmark--hero { text-shadow: 0 0 1px rgba(90,60,0,.45), 0 1px 0 rgba(90,60,0,.18); }
}

.motto {
  font-size: clamp(1.2rem, 2.2vw, 1.45rem); font-weight: 700;
  color: var(--motto-y); margin: .7rem 0 0; letter-spacing: .005em;
}
.motto .motto-e { color: var(--wm-e); }

/* --- preview banner ------------------------------------------------------ */

.preview-bar { background: var(--wm-y); color: #fffdf7; font-size: .88rem; padding: .55rem 0; border-bottom: 1px solid rgba(0,0,0,.18); }
.preview-bar strong { font-weight: 700; }
@media (prefers-color-scheme: dark) { .preview-bar { color: #15161a; } }

/* --- header / nav -------------------------------------------------------- */

header.site {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; position: relative; }
a.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--fg); }

nav.site { display: flex; gap: .2rem; align-items: center; }
nav.site a { color: var(--muted); text-decoration: none; font-size: .94rem; font-weight: 500; padding: .45rem .8rem; border-radius: 7px; }
nav.site a:hover { color: var(--fg); background: color-mix(in srgb, var(--fg) 7%, transparent); }
nav.site a[aria-current="page"] { color: var(--fg); font-weight: 650; }
nav.site .nav-item {
  color: var(--muted); font-size: .94rem; font-weight: 500;
  padding: .45rem .8rem; border-radius: 7px; cursor: default; user-select: none;
}
nav.site .pending { opacity: .65; }
nav.site .pending::after {
  content: "soon"; font-size: .6rem; text-transform: uppercase; letter-spacing: .06em;
  margin-left: .35rem; padding: .05rem .3rem; border: 1px solid var(--line); border-radius: 4px;
}

.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: .55rem .6rem; cursor: pointer; color: var(--fg); line-height: 0; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; }
.nav-toggle span + span { margin-top: 4px; }

@media (max-width: 54rem) {
  .nav-toggle { display: block; }
  /* Defined before the collapsed styles below so the desktop rule cannot
     leak: above this breakpoint the nav is always flex. */
  nav.site {
    position: absolute; top: 100%; right: 0; left: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--card); border-bottom: 1px solid var(--line);
    padding: .25rem 1.5rem .75rem; box-shadow: var(--shadow);
  }
  nav.site { display: none; }
  nav.site.open { display: flex; }
  nav.site a, nav.site .nav-item { padding: .8rem .4rem; border-radius: 0; border-bottom: 1px solid var(--line); }
  nav.site a:last-child, nav.site .nav-item:last-child { border-bottom: 0; }
}

/* --- typography ---------------------------------------------------------- */

h1 { font-size: clamp(1.85rem, 4vw, 2.6rem); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .8rem; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .6rem; }
h3 { font-size: 1.05rem; margin: 0 0 .45rem; letter-spacing: -.01em; }
p { margin: 0 0 1rem; }
.lead { font-size: clamp(1.05rem, 1.55vw, 1.2rem); color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }

/* Content links. Without this they fall back to the browser default
   blue/purple, which is unreadable on both the chip blue and the dark
   ground -- and "visited" purple especially so. */
main a:not(.btn):not(.brand) {
  color: var(--link); text-decoration: underline; text-underline-offset: 2px;
  text-decoration-thickness: 1px; text-decoration-color: color-mix(in srgb, var(--link) 45%, transparent);
}
main a:not(.btn):not(.brand):hover { text-decoration-color: currentColor; }
main a:visited:not(.btn):not(.brand) { color: var(--link); }

.eyebrow {
  display: inline-block; text-transform: uppercase; letter-spacing: .1em;
  font-size: .74rem; font-weight: 700; color: var(--accent);
  background: var(--bg-deep); border: 1px solid var(--line);
  border-radius: 999px; padding: .32rem .85rem; margin: 0 0 1rem;
}
section.band-dark .eyebrow { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); color: var(--wm-y); }
section.band-card .eyebrow { background: var(--bg); }

/* "Oracle & PostgreSQL" is two product names, so it keeps their own casing
   and their own colours rather than being flattened into one uppercase
   label. */
.eyebrow--brands { text-transform: none; letter-spacing: .02em; font-size: .95rem; padding: .38rem 1rem; }
.eyebrow--brands .b-oracle { color: var(--wm-e); font-weight: 800; }
.eyebrow--brands .b-postgres { color: var(--wm-o); font-weight: 800; }
.eyebrow--brands .b-amp { color: var(--muted); font-weight: 600; }
.section-head { max-width: 48rem; margin-bottom: 2.2rem; }
.pull { border-left: 3px solid var(--wm-o); padding-left: 1.1rem; margin: 1.3rem 0; font-size: 1.06rem; font-style: italic; }
section.band-dark .pull { border-left-color: var(--wm-y); }

/* --- hero ---------------------------------------------------------------- */

.hero { position: relative; padding: 4.5rem 0 4rem; overflow: hidden; }
.hero .wrap { position: relative; z-index: 1; }
.evo-bg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .6; pointer-events: none; z-index: 0; }
@media (max-width: 54rem) { .evo-bg { opacity: .3; } }

/* Left half: broken wiring -- crossings, severed ends, dangling runs.
   Right half: directed flow -- lanes converging, arrowheads carrying the
   direction. Two visual languages rather than one gradient, because the
   whole point is that the two sides differ in KIND, not just in tidiness. */
.evo-broken { fill: none; stroke: var(--evo-broken); stroke-width: 1.4; stroke-linecap: round; }
.evo-dead   { fill: none; stroke: var(--evo-dead); stroke-width: 2.2; stroke-linecap: round; }
.evo-bridge { fill: none; stroke: var(--evo-bridge); stroke-width: 1.3; stroke-dasharray: 5 6; }
.evo-flow   { fill: none; stroke: var(--evo-flow); stroke-width: 1.8; stroke-linecap: round; }
.evo-flow-strong { fill: none; stroke: var(--evo-flow-strong); stroke-width: 2.6; stroke-linecap: round; }
.evo-arrowhead { fill: var(--evo-flow); }
.evo-arrowhead-strong { fill: var(--evo-flow-strong); }
.evo-n-loose  { fill: var(--evo-n-loose); }
.evo-n-tight  { fill: var(--evo-n-tight); }
.evo-n-accent { fill: var(--evo-n-accent); }
.evo-change { fill: none; stroke: var(--evo-change); stroke-width: 1.5; stroke-linecap: round; }
.evo-arrowhead-soft { fill: var(--evo-change); }
/* Capture schemas: where EVOSCA picks the change up. Ringed so the eye can
   follow them into the dashed bridges. */
.evo-n-capture { fill: var(--evo-n-capture); }
.evo-n-capture-ring { fill: none; stroke: var(--evo-n-capture); stroke-width: 1.2; opacity: .55; }

.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 62rem) { .hero-grid { grid-template-columns: 1.1fr .9fr; } }

.trust-line { margin-top: 1.8rem; padding-top: 1.3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .92rem; max-width: 42rem; }

/* --- components ---------------------------------------------------------- */

.btn { display: inline-block; padding: .8rem 1.4rem; border-radius: 9px; font-weight: 650; font-size: .96rem; text-decoration: none; cursor: pointer; border: 1px solid transparent; font-family: inherit; }
.btn-primary { background: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { filter: brightness(1.15); }
.btn-secondary { background: transparent; color: var(--fg); border-color: var(--line); }
.btn-secondary:hover { background: color-mix(in srgb, var(--fg) 6%, transparent); }
section.band-dark .btn-secondary { color: #e7edf4; border-color: rgba(255,255,255,.25); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.6rem; align-items: center; }

.grid { display: grid; gap: 1.4rem; }
.grid-3, .grid-2 { grid-template-columns: 1fr; }
@media (min-width: 48rem) { .grid-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 62rem) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1.5rem; box-shadow: var(--shadow); }
.card h3 { margin-top: 0; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card .n { display: inline-flex; align-items: center; justify-content: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--bg-deep); color: var(--accent); font-size: .8rem; font-weight: 700; margin-bottom: .7rem; }
section.band-dark .card .n { background: rgba(255,255,255,.1); color: #e7edf4; }

.notice { border: 1px solid var(--line); border-left: 3px solid var(--wm-y); background: var(--card); border-radius: 10px; padding: 1.1rem 1.25rem; margin: 1.5rem 0; }

/* --- promotion chain: horizontal on desktop, stacked on phone ------------ */

.chain { display: grid; gap: .75rem; margin: 2rem 0 1rem; }
@media (min-width: 62rem) { .chain { grid-template-columns: repeat(5, 1fr); } }
.chain-step { position: relative; text-align: center; padding: .5rem .6rem; }
.chain-step .n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: var(--accent); color: var(--accent-fg);
  font-size: 1rem; font-weight: 700; margin-bottom: .85rem;
}
.chain-step b { display: block; margin-bottom: .35rem; font-size: 1rem; }
.chain-step span { font-size: .88rem; color: var(--muted); display: block; }
@media (min-width: 62rem) {
  .chain-step:not(:last-child)::after { content: "\2192"; position: absolute; right: -.62rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 1rem; z-index: 1; }
}

/* --- lists / pills ------------------------------------------------------- */

ul.checks { list-style: none; padding: 0; margin: .6rem 0; }
ul.checks li { padding-left: 1.6rem; position: relative; margin: .5rem 0; }
ul.checks li::before { content: "\2713"; position: absolute; left: 0; color: var(--wm-o); font-weight: 700; }
section.band-dark ul.checks li::before { color: var(--wm-y); }

.pill-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }
.pill { font-size: .85rem; padding: .35rem .8rem; border-radius: 999px; background: var(--bg-deep); border: 1px solid var(--line); }
section.band-dark .pill { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.14); color: #e7edf4; }

/* --- tables -------------------------------------------------------------- */

.table-scroll { overflow-x: auto; margin: 1.4rem 0; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: .93rem; }
th, td { text-align: left; padding: .75rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .73rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
td.price { font-weight: 700; white-space: nowrap; }

/* --- forms --------------------------------------------------------------- */

form.inline { display: flex; gap: .65rem; flex-wrap: wrap; align-items: flex-start; }
input[type=email], input[type=text] { flex: 1 1 15rem; min-width: 0; padding: .75rem .85rem; font: inherit; color: var(--fg); background: var(--card); border: 1px solid var(--line); border-radius: 9px; }
input:focus-visible, .btn:focus-visible, a:focus-visible, .nav-toggle:focus-visible { outline: 2px solid var(--wm-o); outline-offset: 2px; }
@media (prefers-color-scheme: dark) { input:focus-visible, .btn:focus-visible, a:focus-visible { outline-color: var(--wm-y); } }
.status { font-size: .9rem; margin: .8rem 0 0; color: var(--muted); }
.status.err { color: var(--wm-e); }
.status.ok { color: var(--accent); }

/* --- footer -------------------------------------------------------------- */

footer.site { background: var(--bg-invert); color: #b8c6d6; padding: 3rem 0 2.5rem; font-size: .92rem; }
footer.site .cols { display: grid; gap: 2rem; }
@media (min-width: 48rem) { footer.site .cols { grid-template-columns: 2fr 1fr 1.6fr; } }
footer.site a { color: #d5e0ec; }
footer.site nav { display: flex; flex-direction: column; gap: .4rem; }
footer.site .wordmark .wm-e { color: #f0705a; }
footer.site .wordmark .wm-o { color: #7fb6e8; }
footer.site .wordmark .wm-y { color: #f2c744; }
