/* ═══════════════════════════════════════════════════════════════════
   legal-style.css — shared styling for Privacy Policy, Licensing,
   and any other plain text page. Matches the dark theme used on
   index.html and portfolio.html.
   ═══════════════════════════════════════════════════════════════════ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --ivory: #f5f7fa;
  --charcoal: #0b0f14;
  --surface: #13161a;
  --mid: #8c929a;
  --muted: #52575f;
  --blue: #3da9fc;
  --blue-dark: #1a85d6;
  --border: rgba(255, 255, 255, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Montserrat", sans-serif;
  background: var(--charcoal);
  color: var(--ivory);
  overflow-x: hidden;
  cursor: none;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Custom cursor (matches the rest of the site) ─────────────────── */
.cursor {
  position: fixed;
  width: 10px;
  height: 10px;
  background: var(--blue);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition:
    width 0.25s,
    height 0.25s;
}
.cursor-ring {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 1px solid var(--blue);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  opacity: 0.5;
  transition:
    width 0.25s,
    height 0.25s,
    opacity 0.25s;
}
body:has(a:hover) .cursor,
body:has(button:hover) .cursor {
  width: 20px;
  height: 20px;
}
body:has(a:hover) .cursor-ring,
body:has(button:hover) .cursor-ring {
  width: 54px;
  height: 54px;
  opacity: 0.25;
}

/* ── Nav ──────────────────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 4rem;
  transition:
    background 0.4s,
    padding 0.4s;
}
nav.scrolled {
  background: rgba(11, 15, 20, 0.93);
  backdrop-filter: blur(12px);
  padding: 1rem 4rem;
  border-bottom: 1px solid var(--border);
}
.logo {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.6rem;
  font-weight: 300;
  letter-spacing: 0.25em;
  color: var(--ivory);
  text-decoration: none;
  display: flex;
  align-items: center;
}
.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}
.nav-links a {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mid);
  text-decoration: none;
  transition: color 0.25s;
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 100%;
  height: 1px;
  background: var(--blue);
  transition: right 0.3s;
}
.nav-links a:hover {
  color: var(--ivory);
}
.nav-links a:hover::after {
  right: 0;
}
.nav-cta {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  text-decoration: none;
  border: 1px solid var(--blue);
  padding: 0.65rem 1.5rem;
  transition:
    background 0.25s,
    color 0.25s;
}
.nav-cta:hover {
  background: var(--blue);
  color: var(--charcoal);
}

/* ── Page header ──────────────────────────────────────────────────── */
.legal-header {
  padding: 12rem 5rem 3rem;
  position: relative;
  overflow: hidden;
}
.legal-header::before {
  /* Oversized watermark word, same treatment as the portfolio header.
     Set per-page with the --watermark custom property. */
  content: var(--watermark, "");
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: "Cormorant Garamond", serif;
  font-size: 22vw;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.025);
  white-space: nowrap;
  pointer-events: none;
  letter-spacing: -0.02em;
}
.legal-header-inner {
  position: relative;
  z-index: 2;
  max-width: 70ch;
}
.eyebrow {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 2.5rem;
  height: 1px;
  background: var(--blue);
  flex-shrink: 0;
}
.legal-title {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.6rem, 5vw, 4.5rem);
  font-weight: 300;
  line-height: 1.05;
  color: var(--ivory);
}
.legal-title em {
  font-style: italic;
  color: var(--blue);
}
.legal-updated {
  margin-top: 1.5rem;
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Body copy ────────────────────────────────────────────────────── */
.legal-body {
  flex: 1;
  padding: 2rem 5rem 8rem;
  max-width: 75ch;
}

/* A section is one heading plus its paragraphs. */
.legal-section {
  padding-top: 3.5rem;
}
.legal-section:first-child {
  padding-top: 1rem;
}

.legal-body h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--ivory);
  margin-bottom: 1.25rem;
  line-height: 1.25;
}
.legal-body h3 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 2.25rem 0 1rem;
}
.legal-body p {
  font-size: 0.82rem;
  font-weight: 300;
  line-height: 2;
  color: var(--mid);
  letter-spacing: 0.02em;
  margin-bottom: 1.35rem;
}
.legal-body p:last-child {
  margin-bottom: 0;
}
.legal-body strong {
  color: var(--ivory);
  font-weight: 500;
}
.legal-body em {
  font-style: italic;
  color: var(--ivory);
}
.legal-body a {
  color: var(--blue);
  text-decoration: none;
  border-bottom: 1px solid rgba(61, 169, 252, 0.3);
  transition: border-color 0.2s;
}
.legal-body a:hover {
  border-bottom-color: var(--blue);
}

.legal-body ul,
.legal-body ol {
  margin: 0 0 1.5rem 0;
  padding-left: 0;
  list-style: none;
}
.legal-body ol {
  counter-reset: legal-counter;
}
.legal-body li {
  font-size: 0.82rem;
  font-weight: 300;
  line-height: 2;
  color: var(--mid);
  letter-spacing: 0.02em;
  padding-left: 2rem;
  position: relative;
  margin-bottom: 0.5rem;
}
.legal-body ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1rem;
  width: 16px;
  height: 1px;
  background: var(--blue);
}
.legal-body ol li {
  counter-increment: legal-counter;
}
.legal-body ol li::before {
  content: counter(legal-counter) ".";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 500;
}

/* Divider between major sections */
.legal-divider {
  width: 2.5rem;
  height: 1px;
  background: var(--blue);
  margin: 3.5rem 0;
}

/* Callout box for anything that needs emphasis */
.legal-note {
  background: var(--surface);
  border-left: 2px solid var(--blue);
  padding: 1.75rem 2rem;
  margin: 2rem 0;
}
.legal-note p {
  margin-bottom: 0;
}

/* Contact block at the end */
.legal-contact {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.legal-contact-item {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
.legal-contact-label {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
  width: 5rem;
  flex-shrink: 0;
  margin-top: 0.35rem;
}
.legal-contact-value {
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--mid);
  letter-spacing: 0.02em;
}

/* ── Back link ────────────────────────────────────────────────────── */
.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 4rem;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  border: none;
  transition: color 0.2s;
}
.legal-back::before {
  content: "←";
  font-family: serif;
  font-size: 0.9rem;
}
.legal-back:hover {
  color: var(--blue);
  border: none;
}

/* ── Footer ───────────────────────────────────────────────────────── */
footer {
  background: #060810;
  padding: 3rem 5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
}
.footer-copy {
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.footer-links {
  display: flex;
  gap: 2rem;
}
.footer-links a {
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover {
  color: var(--blue);
}
.footer-social {
  display: flex;
  gap: 1.5rem;
}
.footer-social a {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-social a:hover {
  color: var(--blue);
}

/* ── Hamburger / mobile menu ──────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 201;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ivory);
  transition: all 0.3s;
}
.hamburger.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--charcoal);
  z-index: 199;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  padding: 2rem;
}
.mobile-menu.open {
  display: flex;
}
.mobile-menu a {
  font-size: 1.8rem;
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  color: var(--ivory);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}
.mobile-menu a:hover {
  color: var(--blue);
}
.mobile-menu .mobile-cta {
  font-family: "Montserrat", sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
  border: 1px solid var(--blue);
  padding: 0.9rem 2.5rem;
  margin-top: 0.5rem;
}

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  nav {
    padding: 1.2rem 2.5rem;
  }
  nav.scrolled {
    padding: 0.9rem 2.5rem;
  }
  .legal-header {
    padding: 10rem 2.5rem 2.5rem;
  }
  .legal-body {
    padding: 2rem 2.5rem 6rem;
  }
  footer {
    padding: 2.5rem;
  }
}

@media (max-width: 768px) {
  body {
    cursor: auto;
  }
  .cursor,
  .cursor-ring {
    display: none;
  }
  .hamburger {
    display: flex;
  }
  nav {
    padding: 1rem 1.5rem;
  }
  nav.scrolled {
    padding: 0.8rem 1.5rem;
  }
  .nav-links,
  .nav-cta {
    display: none;
  }
  .logo {
    font-size: 1.3rem;
  }
  .legal-header {
    padding: 8rem 1.5rem 2rem;
  }
  .legal-header::before {
    font-size: 34vw;
  }
  .legal-body {
    padding: 1.5rem 1.5rem 5rem;
  }
  .legal-body h2 {
    font-size: 1.45rem;
  }
  .legal-section {
    padding-top: 2.75rem;
  }
  .legal-contact-item {
    flex-direction: column;
    gap: 0.35rem;
  }
  .legal-contact-label {
    width: auto;
    margin-top: 0;
  }
  footer {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
    padding: 2.5rem 1.5rem;
  }
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .legal-title {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }
  .legal-body p,
  .legal-body li {
    font-size: 0.78rem;
    line-height: 1.95;
  }
}

/* Printing a legal page should produce readable black-on-white. */
@media print {
  body {
    background: #fff;
    color: #000;
    cursor: auto;
  }
  nav,
  footer,
  .cursor,
  .cursor-ring,
  .legal-back,
  .mobile-menu,
  .hamburger {
    display: none !important;
  }
  .legal-header::before {
    display: none;
  }
  .legal-header,
  .legal-body {
    padding: 0 0 1rem;
    max-width: 100%;
  }
  .legal-title,
  .legal-body h2,
  .legal-body strong {
    color: #000;
  }
  .legal-body p,
  .legal-body li {
    color: #222;
  }
  .legal-body h3,
  .eyebrow {
    color: #444;
  }
}
