/* ============================================================
   DeepRock — site layer
   Everything that is NOT part of the approved design export.
   Loaded after styles.css and pages.css so it can only add.
   ============================================================ */

/* ---- Mobile navigation -------------------------------------
   The design export hides .nav-links below 880px and offers no
   replacement, which leaves a phone with no way off the page it
   landed on. The toggle is absolutely positioned so it never
   enters the desktop nav grid (1fr auto 1fr) and cannot shift it. */
/* The toggle and drawer hang off `.nav`, which styles.css already makes
   position:relative — deliberately NOT off `.nav-inner`. An absolutely
   positioned child of a grid container resolves left/right against its grid
   AREA, not the container, so anchoring to .nav-inner sized the drawer to the
   last 1fr column (measured: 183px instead of the full 342px).

   styles.css also positions the nav with `.nav-inner > :first-child` and
   `:last-child`; the drawer displaces the "Start a project" pill from
   :last-child, so that rule's intent is restated explicitly here. */
.nav-inner > .btn { justify-self: end; width: max-content; }
/* ...and that same rule would otherwise hand the drawer `width: max-content`,
   which makes the browser drop one of its left/right offsets. */
.nav-inner > .nav-drawer { width: auto; justify-self: stretch; }

.nav-toggle {
  display: none;
  position: absolute; top: 50%; right: 24px; transform: translateY(-50%);
  width: 42px; height: 42px; padding: 0; border-radius: 12px;
  background: var(--glass); border: 1px solid var(--hair); color: var(--fg);
  cursor: pointer; align-items: center; justify-content: center;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: border-color .2s, background .2s;
}
.nav-toggle:hover { border-color: var(--accent); }
.nav-toggle span { display: block; width: 18px; height: 1.5px; background: currentColor; border-radius: 2px;
  transition: transform .28s var(--ease), opacity .18s linear; }
.nav-toggle span + span { margin-top: 5px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-drawer {
  display: none;
  position: absolute; top: calc(100% + 6px); left: 24px; right: 24px; z-index: 60;
  padding: 14px; border-radius: 18px; border: 1px solid var(--hair);
  background: linear-gradient(135deg, rgba(20,42,64,0.96) 0%, rgba(12,28,46,0.96) 100%);
  box-shadow: 0 24px 64px rgba(0,0,0,0.55);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  opacity: 0; transform: translateY(-8px); pointer-events: none;
  transition: opacity .22s var(--ease), transform .22s var(--ease);
}
.nav-drawer.open { opacity: 1; transform: none; pointer-events: auto; }
.nav-drawer a {
  display: block; padding: 14px 16px; border-radius: 12px;
  font-size: 16px; font-weight: 500; color: var(--fg); opacity: .82;
}
.nav-drawer a:hover, .nav-drawer a.active { opacity: 1; color: var(--accent-2); background: rgba(127,238,251,0.07); }
/* `display` is restated because `.nav-drawer a` outranks `.btn`, which would
   otherwise turn the pill into a block and drop the flex gap before its arrow. */
.nav-drawer .btn { display: inline-flex; width: 100%; justify-content: center; margin-top: 8px; }

@media (max-width: 880px) {
  .nav-toggle { display: flex; }
  .nav-drawer { display: block; }
  /* the desktop "Start a project" pill would collide with the toggle;
     the same action lives at the bottom of the drawer instead */
  .nav-inner > .btn { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-drawer, .nav-toggle span { transition: none; }
}

/* ---- Footer legal line -------------------------------------
   Two mono lines that must not collide on a narrow screen. */
.footer-bottom { flex-wrap: wrap; gap: 14px 28px; }
.footer-bottom .mono-tag { line-height: 1.7; }
.footer-bottom a { color: inherit; text-decoration: none; transition: color .2s; }
.footer-bottom a:hover { color: var(--accent-2); }
/* .mono-tag uppercases everything. The registered name is spelled "Deeprock"
   with one capital (Company/company-registration-2026-08-07.md) and the line is
   long, so it opts out of the transform and the wide tracking. */
.legal-line { max-width: 62ch; text-transform: none; letter-spacing: .04em; font-size: 11.5px; }

/* ---- Contact form states ----------------------------------- */
.dr-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.dr-note { margin: 16px 0 0; font-size: 13.5px; line-height: 1.55; text-align: center; display: none; }
.dr-note.show { display: block; }
.dr-note.ok { color: var(--accent-2); }
.dr-note.warn { color: var(--amber-2); }
.dr-note.err { color: #ff9e9e; }
.dr-note a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
button[disabled] { opacity: .6; cursor: progress; }

/* ---- Legal / long-form page -------------------------------- */
.legal { max-width: 74ch; }
.legal h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin: 44px 0 14px; }
.legal h2:first-of-type { margin-top: 8px; }
.legal p, .legal li { font-size: 15.5px; line-height: 1.72; color: var(--fg); opacity: .8; }
.legal p { margin: 0 0 16px; }
.legal ul { margin: 0 0 16px; padding-left: 20px; }
.legal li { margin-bottom: 10px; }
.legal strong { opacity: 1; font-weight: 600; }
.legal .updated { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--faint); }
.legal .identity { margin: 18px 0 8px; padding: 20px 22px; border-radius: 14px;
  border: 1px solid var(--hair); background: var(--panel); }
.legal .identity p { margin: 0; font-size: 14.5px; }
