/* loophands.cloud: one stylesheet, no inline styles (the site's CSP allows none).
   Brand tokens come from the logo: #16606F, #0E3F4C, #E8A951. Amber is used only on dark teal
   or as a decorative accent, never as text on a light background. */
:root {
  color-scheme: light dark;
  --brand: #16606f;
  --brand-deep: #0e3f4c;
  --brand-accent: #e8a951;
  --bg: #fafaf9;
  --surface: #ffffff;
  --surface-alt: #eef3f4;
  --border: #cbd3d6;
  --text: #1d1c1a;
  --text-muted: #46433f;
  --link: #16606f;
  --focus: #16606f;
  --btn-border: #0e3f4c;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101417;
    --surface: #182024;
    --surface-alt: #141b1f;
    --border: #33444b;
    --text: #eceff0;
    --text-muted: #b7c1c5;
    --link: #7cc4d4;
    --focus: #7cc4d4;
    --btn-border: #7cc4d4;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue',
    Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

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

h1,
h2,
h3 {
  line-height: 1.2;
}

h1 {
  font-size: clamp(1.875rem, 1.2rem + 3.4vw, 3rem);
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem);
  margin: 0 0 0.75rem;
}

h3 {
  font-size: 1.125rem;
  margin: 0 0 0.5rem;
}

p,
li {
  color: var(--text-muted);
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

code {
  font-family: 'Cascadia Code', Consolas, monospace;
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Skip link: off screen until it receives focus. */
.skip-link {
  position: absolute;
  top: -4rem;
  left: 0.5rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: var(--brand-deep);
  color: #ffffff;
}

.skip-link:focus {
  top: 0.5rem;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 2.75rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
  font-size: 1.125rem;
}

.site-nav {
  order: 3;
  flex: 1 0 100%;
}

.site-nav ul,
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a,
.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 0.5rem;
  color: var(--text);
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover {
  text-decoration: underline;
}

.header-cta {
  order: 2;
  margin-left: auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.5rem 1.25rem;
  border: 2px solid transparent;
  border-radius: 0.5rem;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
}

.btn-primary {
  background: var(--brand);
  border-color: var(--btn-border);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--brand-deep);
}

.btn-accent {
  background: var(--brand-accent);
  border-color: var(--brand-accent);
  color: var(--brand-deep);
}

.btn-accent:hover {
  background: #f2c27f;
  border-color: #f2c27f;
}

.btn-outline {
  border-color: #ffffff;
  color: #ffffff;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.14);
}

@media (prefers-reduced-motion: no-preference) {
  .btn {
    transition: background-color 0.15s ease;
  }
}

/* Dark teal bands: hero and waitlist. White text only; amber is allowed here. */
.hero,
.cta-band {
  background-color: var(--brand-deep);
  background-image: linear-gradient(135deg, var(--brand-deep), var(--brand));
  color: #ffffff;
}

.hero p,
.cta-band p {
  color: #e6f1f3;
}

.hero :focus-visible,
.cta-band :focus-visible {
  outline-color: #ffffff;
}

.hero a:not(.btn),
.cta-band a:not(.btn) {
  color: #ffffff;
}

.hero {
  padding: 2.5rem 0 3rem;
}

.hero-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.hero-copy {
  max-width: 40rem;
}

.hero-copy .subhead {
  font-size: 1.125rem;
}

.status {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.25rem 0.875rem;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
}

.hero .status {
  color: #ffffff;
}

.status::before {
  content: '';
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.5rem;
  border-radius: 50%;
  background: var(--brand-accent);
  vertical-align: 0.05em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.hero-art {
  justify-self: center;
}

.hero-logo {
  display: block;
  width: 16rem;
  filter: drop-shadow(0 1rem 1.5rem rgba(0, 0, 0, 0.35));
}

/* Sections */
.section {
  padding: 3rem 0;
}

.section-alt {
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-intro {
  max-width: 44rem;
  margin: 0 0 2rem;
  font-size: 1.0625rem;
}

[id] {
  scroll-margin-top: 1rem;
}

/* Trust strip */
.trust-strip {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.trust {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.trust li {
  padding: 0.5rem 0.75rem;
  border-left: 4px solid var(--brand-accent);
  background: var(--surface);
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 600;
}

/* Cards: features, safety, roadmap */
.grid {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface);
}

.card p {
  margin: 0;
}

/* How it works */
.steps {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: 1rem 1rem 1rem 4rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--brand);
  color: #ffffff;
  font-weight: 700;
}

.steps h3,
.steps p {
  margin: 0;
}

.steps h3 {
  margin-bottom: 0.25rem;
}

/* Safety */
.cols {
  display: grid;
  gap: 1.5rem;
}

.cols p {
  margin: 0;
}

.note {
  margin: 2rem 0 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--brand);
  background: var(--surface);
  color: var(--text);
}

.note p {
  margin: 0 0 0.5rem;
  color: var(--text);
}

.note p:last-child {
  margin-bottom: 0;
}

/* Coming soon */
.roadmap li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--text);
}

.tag {
  flex: none;
  padding: 0.125rem 0.5rem;
  border: 1px solid var(--text-muted);
  border-radius: 0.25rem;
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footnote {
  margin: 1rem 0 0;
  font-size: 0.9375rem;
}

/* Waitlist */
.cta-band {
  padding: 3rem 0;
}

.cta-band .wrap {
  max-width: 48rem;
}

.cta-band h2 {
  color: #ffffff;
}

.cta-band .address {
  color: #ffffff;
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* FAQ */
.faq {
  max-width: 48rem;
}

details {
  margin: 0 0 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface);
}

summary {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
  color: var(--text);
  font-weight: 650;
  cursor: pointer;
}

details[open] summary {
  border-bottom: 1px solid var(--border);
}

details p {
  margin: 0;
  padding: 0.75rem 1rem 1rem;
}

.signin-note {
  max-width: 48rem;
  margin: 2rem 0 0;
}

/* Prose pages: security, sign-in help, 404 */
.page {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2.5rem 1rem 3rem;
}

.page h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: 1.25rem;
}

.lead {
  font-size: 1.125rem;
  color: var(--text);
}

/* Footer */
.site-footer {
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.9375rem;
}

.site-footer p {
  margin: 0.75rem 0 0;
  padding-left: 0.5rem;
}

@media (min-width: 768px) {
  .wrap {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .site-nav {
    order: 2;
    flex: 1 1 auto;
  }

  .header-cta {
    order: 3;
    margin-left: 0;
  }

  .hero {
    padding: 4rem 0 4.5rem;
  }

  .hero-grid {
    grid-template-columns: 1.4fr 1fr;
    gap: 3rem;
  }

  .hero-logo {
    width: 20rem;
  }

  .section,
  .cta-band {
    padding: 4rem 0;
  }

  .grid,
  .roadmap {
    grid-template-columns: 1fr 1fr;
  }

  .cols {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .page {
    padding-top: 3.5rem;
  }
}

@media (min-width: 1024px) {
  .trust {
    grid-template-columns: repeat(4, 1fr);
  }

  .grid,
  .roadmap {
    grid-template-columns: repeat(3, 1fr);
  }

  .steps {
    grid-template-columns: repeat(4, 1fr);
  }

  .steps li {
    padding: 4.25rem 1.25rem 1.25rem;
  }

  .steps li::before {
    top: 1.25rem;
    left: 1.25rem;
  }
}

@media (min-width: 1280px) {
  .hero-grid {
    gap: 4rem;
  }

  .hero-logo {
    width: 20rem;
  }
}

/* Windows high contrast: let system colours apply, keep structure visible. */
@media (forced-colors: active) {
  .card,
  .steps li,
  .roadmap li,
  .trust li,
  .tag,
  .status,
  details,
  .note {
    border: 1px solid CanvasText;
  }

  .btn {
    border-color: ButtonText;
  }

  .status::before {
    background: CanvasText;
  }

  .hero-logo {
    filter: none;
  }

  .skip-link {
    border: 1px solid CanvasText;
  }
}
