/* Waifu Bridge website. Colours are taken from the logo and app icon:
   night indigo, a pink-to-violet moon, pale sakura and lavender ink. */
@font-face {
  font-family: "Nunito";
  src: url("assets/nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --night: #12113a;
  --deep: #1a1850;
  --dusk: #272268;
  --moon-a: #ff8fc0;
  --moon-b: #8468ee;
  --sakura: #ffc6df;
  --ink: #f3efff;
  --ink-2: #cdc7f0;
  --muted: #a39dcf;
  --line: rgba(205, 199, 240, 0.18);
  --water: #7f8cff;
  --measure: 62ch;
  --page: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink-2);
  font: 400 1.0625rem/1.65 "Nunito", ui-rounded, "Segoe UI", system-ui, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sakura); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--sakura); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { color: var(--ink); line-height: 1.15; letter-spacing: -0.015em; margin: 0; }
h1 { font-size: clamp(2.4rem, 6.2vw, 4.2rem); font-weight: 900; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); font-weight: 850; }
h3 { font-size: 1.2rem; font-weight: 800; }
p { margin: 0 0 1em; max-width: var(--measure); }
code, pre { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 0.92em; }
code { background: rgba(255, 255, 255, 0.08); padding: 0.1em 0.38em; border-radius: 6px; color: var(--ink); overflow-wrap: anywhere; }
pre { background: #0c0b2b; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; overflow-x: auto; color: var(--ink); line-height: 1.55; margin: 0 0 1.2em; }
pre code { background: none; padding: 0; overflow-wrap: normal; }

.wrap { width: 100%; max-width: var(--page); margin: 0 auto; padding: 0 22px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--night); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 12px; }

/* Header */
.site-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; flex-wrap: wrap; }
.site-head .logo img { width: 190px; }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a { color: var(--ink-2); text-decoration: none; font-weight: 700; padding: 8px 13px; border-radius: 999px; }
.site-nav a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.site-nav a[aria-current="page"] { background: rgba(255, 143, 192, 0.16); color: var(--sakura); }

/* Buttons */
.btn { display: inline-block; font-weight: 850; text-decoration: none; padding: 14px 24px; border-radius: 999px; background: linear-gradient(135deg, var(--moon-a), #f76aa9); color: #2a0f2c; box-shadow: 0 10px 30px -12px rgba(255, 143, 192, 0.7); }
.btn:hover { color: #2a0f2c; filter: brightness(1.07); }
.btn.quiet { background: none; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn.quiet:hover { color: #fff; box-shadow: inset 0 0 0 2px var(--ink-2); filter: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Hero: the moon rises behind the bridge, as in the app icon. */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--night) 0%, var(--deep) 62%, var(--dusk) 100%); }
.hero-copy { position: relative; z-index: 2; padding-top: clamp(36px, 7vw, 84px); padding-bottom: calc(min(100vw, 1440px) * 0.27 + 12px); }
.hero-copy p { font-size: 1.25rem; color: var(--ink-2); margin-top: 20px; max-width: 34em; }
.hero h1 { max-width: 12em; }
/* The drawing keeps its shape at any width; the water carries on to both edges. */
.hero-scene { position: absolute; inset: auto 0 0 0; height: calc(min(100vw, 1440px) * 0.2986); z-index: 1; pointer-events: none; background: linear-gradient(to top, #1c1a5c 13.5%, transparent 13.5%); }
.hero-scene svg { width: 100%; max-width: 1440px; height: 100%; display: block; margin: 0 auto; }
.petal { position: absolute; top: -30px; width: 16px; height: 11px; background: var(--sakura); border-radius: 80% 10% 80% 10%; opacity: 0; z-index: 1; animation: drift 14s linear infinite; }
.petal:nth-child(1) { left: 58%; animation-delay: 0s; }
.petal:nth-child(2) { left: 72%; animation-delay: 4.5s; width: 12px; height: 8px; }
.petal:nth-child(3) { left: 86%; animation-delay: 9s; }
.petal:nth-child(4) { left: 66%; animation-delay: 11.5s; width: 11px; height: 8px; }
@keyframes drift {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  8% { opacity: 0.9; }
  100% { transform: translate(-170px, 640px) rotate(300deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .petal { animation: none; }
  html { scroll-behavior: auto; }
}

/* Sections */
section { padding: clamp(52px, 8vw, 96px) 0; }
section + section { border-top: 1px solid var(--line); }
.lede { font-size: 1.2rem; margin-top: 16px; }
.band { background: var(--deep); }

/* Two banks and a bridge: what sits on each side. */
.banks { display: grid; grid-template-columns: 1fr auto 1fr; gap: 22px; align-items: center; margin-top: 38px; }
.bank { border: 1px solid var(--line); border-radius: 20px; padding: 22px 24px; background: rgba(255, 255, 255, 0.035); }
.bank h3 { margin-bottom: 10px; }
.bank ul { margin: 0; padding-left: 1.1em; }
.bank li { margin: 4px 0; }
.span { text-align: center; color: var(--sakura); font-weight: 850; }
.span svg { width: 150px; height: 60px; display: block; margin: 0 auto 4px; }
@media (max-width: 820px) {
  .banks { grid-template-columns: 1fr; }
  .span svg { transform: rotate(90deg); width: 90px; margin: 8px auto; }
}

/* Say it, and it happens */
.said { margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 0 34px; }
.said dt, .said dd { margin: 0; padding: 18px 0; border-top: 1px solid var(--line); }
.said dt { color: var(--ink); font-weight: 800; font-size: 1.15rem; }
.said dt::before { content: "“"; color: var(--moon-a); margin-right: 1px; }
.said dt::after { content: "”"; color: var(--moon-a); }
@media (max-width: 720px) {
  .said { grid-template-columns: 1fr; }
  .said dd { border-top: 0; padding-top: 0; }
}

/* Screenshots sit in a plain window frame. */
.shot { margin: 36px 0 0; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: #0b101b; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8); }
.shot figcaption { padding: 12px 18px; font-size: 0.95rem; color: var(--muted); background: var(--deep); border-top: 1px solid var(--line); }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 44px; align-items: center; }
.split .shot { margin-top: 0; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 28px; } }

/* Steps are a real sequence, so they are numbered. */
.steps { list-style: none; counter-reset: step; margin: 34px 0 0; padding: 0; display: grid; gap: 22px; }
.steps > li { counter-increment: step; position: relative; padding-left: 66px; min-height: 46px; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 1.2rem; color: #2a0f2c; background: linear-gradient(135deg, var(--moon-a), var(--moon-b)); }
.steps h3 { margin-bottom: 6px; padding-top: 9px; }
.steps p:last-child { margin-bottom: 0; }

/* Plain lists of facts */
.facts { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 26px 40px; }
.facts h3 { margin-bottom: 6px; }
.facts p { margin: 0; }
.note { border-left: 4px solid var(--moon-a); background: rgba(255, 143, 192, 0.08); padding: 14px 18px; border-radius: 0 12px 12px 0; max-width: var(--measure); margin: 0 0 1.2em; }
.note p:last-child { margin-bottom: 0; }

details { border-top: 1px solid var(--line); padding: 16px 0; max-width: 46em; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; color: var(--ink); font-weight: 800; font-size: 1.1rem; }
details p { margin: 12px 0 0; }

/* Guide pages */
.page-head { padding: clamp(34px, 6vw, 64px) 0 clamp(26px, 4vw, 40px); background: linear-gradient(180deg, var(--night), var(--deep)); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
.page-head p { font-size: 1.2rem; margin: 14px 0 0; }
.guide { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 48px; padding-top: 44px; padding-bottom: 80px; align-items: start; }
.guide nav { position: sticky; top: 18px; font-size: 0.98rem; }
.guide nav ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.guide nav a { display: block; padding: 6px 14px; color: var(--ink-2); text-decoration: none; margin-left: -2px; border-left: 2px solid transparent; }
.guide nav a:hover { color: #fff; border-left-color: var(--moon-a); }
.guide article > section { padding: 0 0 44px; border: 0; }
.guide article h2 { font-size: 1.7rem; margin-bottom: 14px; scroll-margin-top: 18px; }
.guide article h3 { margin: 24px 0 8px; }
.guide article ul, .guide article ol { max-width: var(--measure); padding-left: 1.3em; margin: 0 0 1.1em; }
.guide article li { margin: 6px 0; }
.prose { padding-top: 44px; padding-bottom: 80px; }
.prose h2 { font-size: 1.6rem; margin: 38px 0 12px; }
.prose ul { max-width: var(--measure); padding-left: 1.3em; }
.prose li { margin: 6px 0; }
@media (max-width: 860px) {
  .guide { grid-template-columns: 1fr; gap: 26px; }
  .guide nav { position: static; }
}
table { border-collapse: collapse; width: 100%; max-width: 46em; margin: 0 0 1.2em; }
th, td { text-align: left; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--ink); font-weight: 800; }
.table-scroll { overflow-x: auto; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); background: #0d0c2c; padding: 38px 0 46px; font-size: 0.97rem; color: var(--muted); }
.site-foot .cols { display: flex; flex-wrap: wrap; gap: 20px 48px; justify-content: space-between; }
.site-foot p { margin: 0 0 8px; max-width: 46ch; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.site-foot a { color: var(--ink-2); }

/* The licence text reads as a document, set a little smaller. */
.legal { border: 1px solid var(--line); border-radius: 16px; padding: 8px 24px 14px; background: rgba(255, 255, 255, 0.03); max-width: 48em; font-size: 0.98rem; }
.legal h3 { margin: 22px 0 8px; }
.legal blockquote { margin: 0 0 1em; padding-left: 16px; border-left: 3px solid var(--line); }
