/* Legal page (/legal/). Same document layout as the Joa pages, kept as its own file
   so each can evolve separately. */
@font-face {
  font-family: 'Inter';
  src: url('/Assets/fonts/inter/InterVariable.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  /* Brand values from main.css. No homepage runtime or font-service import. */
  --bg-dark: #161616;
  --bg-card: #1a1a1a;
  --text-primary: #fafafa;
  --text-secondary: #ededed;
  --text-muted: #757575;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --container-max: 1200px;
  --container-padding: clamp(24px, 5vw, 48px);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --transition-fast: 0.15s ease;
  font-family: var(--font-main);
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg-dark); color: var(--text-primary); font-weight: 400; line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
/* Same resting/hover treatment as .copyright a in the home footer. */
a { color: var(--text-muted); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: rgba(255, 255, 255, 0.65); }
a:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 5px; border-radius: 2px; }
::selection { background: var(--text-secondary); color: var(--bg-dark); }
img { display: block; max-width: 100%; height: auto; }
p, li, dd, a { overflow-wrap: anywhere; }
p { margin: 0 0 1.1rem; }
ul, ol { padding-left: 1.3rem; }
li + li { margin-top: 0.6rem; }
main:focus { outline: none; }

.shell {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-left: max(var(--container-padding), env(safe-area-inset-left));
  padding-right: max(var(--container-padding), env(safe-area-inset-right));
}
.skip-link { position: absolute; top: 12px; left: 24px; padding: 12px 18px; background: var(--text-primary); color: var(--bg-dark); transform: translateY(-200%); }
.skip-link:focus { transform: none; z-index: 1; }
/* Compact page header: home logo at left, page title in the former nav position. */
.hero-section { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; padding: calc(var(--container-padding) + var(--safe-top)) var(--container-padding) 24px; align-items: start; line-height: normal; }
.brand { justify-self: start; align-self: start; }
.logo { height: 36px; width: auto; cursor: pointer; transition: opacity var(--transition-fast); }
.brand:hover .logo { opacity: 0.7; }
.hero-title { justify-self: end; max-width: 100%; margin: 0; font-size: clamp(1.5rem, 3vw, 3rem); font-weight: 600; line-height: 1.05; letter-spacing: -0.04em; color: var(--text-primary); text-align: right; overflow-wrap: anywhere; }
.intro { padding-block: 24px 32px; max-width: 800px; }
.eyebrow { color: var(--text-muted); font-size: 0.8125rem; letter-spacing: 0.02em; text-transform: uppercase; font-weight: 400; margin-bottom: 24px; }
.lead { max-width: 650px; color: var(--text-secondary); font-size: clamp(1.0625rem, 1.25vw, 1.25rem); line-height: 1.55; letter-spacing: -0.02em; }
.updated { margin-top: 24px; font-size: 0.8125rem; color: var(--text-muted); }
.layout { display: grid; gap: 40px; padding-bottom: 72px; }
.contents { border-top: 1px solid var(--border-subtle); padding-top: 18px; font-size: 0.8125rem; }
.contents p { font-weight: 500; }
.contents ol { list-style: none; padding: 0; margin: 0; }
.contents li + li { margin: 0; }
.contents a { display: block; min-height: 44px; padding-block: 10px; }
.article { min-width: 0; max-width: 720px; }
.article section { border-top: 1px solid var(--border-subtle); padding-block: 30px 20px; scroll-margin-top: 24px; }
h2 { margin: 0 0 20px; font-size: 1.0625rem; font-weight: 500; line-height: 1.5; letter-spacing: -0.01em; }
h3 { margin: 24px 0 10px; font-size: 1rem; font-weight: 500; letter-spacing: -0.01em; }
.article p, .article li { color: var(--text-secondary); font-size: 0.9375rem; }
.contact-card { border-top: 1px solid var(--border-subtle); padding-block: 30px 20px; margin-bottom: 0; }
.contact-card h2 { margin-bottom: 12px; }
.contact-card p:last-child { margin-bottom: 0; }
.email { display: inline-flex; align-items: center; min-height: 44px; font-weight: 400; font-size: 0.9375rem; }
.article .small { font-size: 0.875rem; }

/* Footer layout, typography and responsive rules match main.css. */
.footer { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 40px var(--container-padding) 72px; border-top: 1px solid rgba(255, 255, 255, 0.02); }
.copyright { font-size: 0.8125rem; color: var(--text-muted); line-height: 1.6; }

@media (min-width: 800px) {
  .intro { padding-block: 32px 40px; }
  .layout { grid-template-columns: 210px minmax(0, 1fr); gap: 64px; padding-bottom: 104px; }
  .contents { align-self: start; }
}

@media (max-width: 768px) {
  .logo { height: 40px; }
  .footer { flex-direction: column-reverse; align-items: flex-start; gap: 20px; padding: 48px var(--container-padding) 80px; }
  h2 { font-size: 1rem; }
}

@media (max-width: 480px) {
  .footer { padding: 40px var(--container-padding) 72px; }
  .copyright { font-size: 0.75rem; }
  .eyebrow { font-size: 0.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  a, .logo { transition: none; }
}

@media print {
  :root { color-scheme: light; --bg-dark: #fff; --text-primary: #111; --text-secondary: #111; --text-muted: #333; --border-subtle: #aaa; }
  .shell { max-width: none; padding: 0; }
  .brand img { filter: invert(1); }
  .intro { padding-block: 24px; }
  h1 { font-size: 30pt; }
  .layout { display: block; padding-bottom: 0; }
  .hero-section { display: block; min-height: 0; height: auto; padding: 0; }
  .hero-title { position: static; margin: 24px 0; font-size: 30pt; }
  .brand, .contents, .skip-link { display: none; }
  .article { max-width: none; }
  h2, h3 { break-after: avoid; }
}

/* Text keeps the normal arrow cursor (it can still be selected); only fields show the I-beam. */
html { cursor: default; }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="button"]):not([type="submit"]):not([type="file"]):not([type="color"]),
textarea,
[contenteditable="true"] { cursor: text; }
input:disabled, textarea:disabled { cursor: default; }

/* Language switch (EN / ES) — same look as /quote on desktop. */
.legal-lang { display: inline-flex; gap: 1px; padding: 2px; margin: 0 0 20px; border-radius: 9px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border-subtle); }
.legal-lang a { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.06em; line-height: 1; padding: 7px 10px; border-radius: 7px; color: var(--text-muted); }
.legal-lang a:hover { color: var(--text-secondary); }
.legal-lang a[aria-current="true"] { color: var(--text-primary); background: rgba(255, 255, 255, 0.12); }
[data-lang-block][hidden] { display: none !important; }
.article dl { margin: 0 0 1.1rem; display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: 0.9375rem; }
.article dt { color: var(--text-muted); }
.article dd { margin: 0; color: var(--text-secondary); }
@media (max-width: 480px) { .article dl { grid-template-columns: 1fr; gap: 2px; } .article dd { margin-bottom: 8px; } }

/* Footer pieces shared with the home (values from main.css). */
:root { --accent-green: #22c55e; }
.footer-item { white-space: nowrap; }
.footer-sep { color: var(--text-muted); }
.availability { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8125rem; color: var(--text-muted); transition: color var(--transition-fast); }
.availability:hover { color: rgba(255, 255, 255, 0.65); }
.availability-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-green); box-shadow: 0 0 8px var(--accent-green); animation: legal-pulse 2s ease-in-out infinite; }
@keyframes legal-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.availability.unavailable { pointer-events: none; }
.availability.unavailable .availability-dot { background: var(--text-muted); box-shadow: none; animation: none; }
@media (max-width: 480px) { .availability { font-size: 0.75rem; } }

/* ASCII fluid background (js/ascii-bg.js): its canvas sits at z-index -1,
   so the dark colour lives on <html> and <body> stays transparent. */
html { background-color: var(--bg-dark); }
body { background-color: transparent; }
@media print { html { background: #fff; } }
.footer .copyright { display: flex; flex-wrap: wrap; align-items: baseline; min-width: 0; }
.footer-sep { white-space: pre; }
