/* MLH Client Portal — base.css
   Reset + typography + topbar + universal page chrome.
   Imports tokens.css.
*/

/* -------- Reset -------- */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* 2026-05-10 — global no-horizontal-scroll guard for mobile.
     index.html and projects/style.css already do this; pulling it into base.css
     means EVERY page (cameron, signin, contact, privacy, etc.) inherits the
     same protection. iOS Safari especially needs both html + body. */
  overflow-x: hidden;
  max-width: 100%;
}
html, body { -webkit-text-size-adjust: 100%; }
img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 1px; text-underline-offset: 4px; transition: color 200ms ease, text-decoration-color 200ms ease, border-color 200ms ease, background-color 200ms ease; }
a:hover { text-decoration-color: var(--gold); }
button, input, select, textarea { font: inherit; color: inherit; }

/* -------- Typography -------- */
h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.005em;
  color: var(--ink);
}
h1 { font-size: clamp(48px, 11vw, 168px); line-height: 0.92; }
h2 { font-size: clamp(36px, 5.6vw, 84px); line-height: 0.98; }
h3 { font-size: clamp(22px, 2.4vw, 32px); line-height: 1.1; }
h4 { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.2; }
em { font-style: italic; font-weight: 400; }
p { margin: 0 0 1em; }
strong { font-weight: 600; color: var(--ink); }

.eyebrow,
.section-tag,
.cover-eyebrow,
.feature-num,
.project-meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.section-tag { display: inline-block; margin: 0 0 1.6rem; }
.section-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.6rem, 6.4vw, 5.4rem); line-height: 1; margin: 0 0 2rem; max-width: 22ch; }
.lead { font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: clamp(20px, 2.2vw, 28px); line-height: 1.45; color: var(--ink); margin: 0 0 1.4rem; max-width: 36rem; }
.body p { font-size: 1rem; line-height: 1.72; color: var(--ink); margin: 0 0 1em; }
.pull-quote { font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.3; color: var(--accent); margin: 0 0 2rem; max-width: 32ch; }
.note { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--subtle); }

.rule { height: 1px; background: var(--rule); margin: 1rem 0 1.4rem; max-width: 18rem; }
.rule-strong { height: 1px; background: var(--rule-strong); margin: 1.2rem 0; }

/* -------- Buttons -------- */
.btn-gold,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 44px;
  padding: 0 1.4rem;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--gold);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}
.btn-gold:hover,
.button:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  text-decoration: none;
}
.btn-gold.primary,
.button.primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn-gold.primary:hover,
.button.primary:hover {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}

/* -------- Topbar -------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  min-height: var(--topbar-h);
  padding: 0 var(--outer);
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(8px);
}
.topbar .brand,
.topbar .topbar-brand {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
}
.topbar .topbar-crumb {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--subtle);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar .topbar-crumb a { color: var(--subtle); transition: color 200ms ease; }
.topbar .topbar-crumb a:hover { color: var(--accent); text-decoration: none; }
.topbar .topbar-cta {
  justify-self: end;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--gold);
  padding: 0 0 2px;
  transition: color 200ms ease, border-color 200ms ease;
}
.topbar .topbar-cta:hover { color: var(--accent); text-decoration: none; }

/* -------- Footer prev/next -------- */
.page-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  border-top: 1px solid var(--rule);
  margin: var(--section) 0 0;
}
.page-nav a {
  padding: 2.4rem var(--outer);
  border-right: 1px solid var(--rule);
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--subtle);
  transition: background-color 240ms ease, color 240ms ease;
}
.page-nav a:last-child { border-right: 0; text-align: right; }
.page-nav a:hover { background: var(--paper-warm); color: var(--ink); text-decoration: none; }
.page-nav .pn-label { display: block; font-size: 10px; color: var(--light); margin-bottom: 0.5rem; }
.page-nav .pn-title { display: block; font-family: var(--font-display); font-style: italic; font-size: clamp(20px, 2.4vw, 28px); letter-spacing: 0; text-transform: none; color: var(--ink); }

.footer {
  padding: 4rem var(--outer);
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--subtle);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

/* -------- Print -------- */
@media print {
  .topbar, .page-nav, .footer { display: none !important; }
  body { background: var(--paper); color: var(--ink); }
  a { color: var(--ink); text-decoration: none; }
  .image-break, .cover .cover-hero { background: var(--paper) !important; }
  .page--navy, .closing { background: var(--paper) !important; color: var(--ink) !important; }
  .page--navy *, .closing * { color: var(--ink) !important; }
  img { break-inside: avoid; }
  section { break-inside: avoid; }
}

/* -------- Reduced motion -------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0s !important;
    transition-duration: 0s !important;
  }
}

/* -------- Mobile -------- */
@media (max-width: 720px) {
  .topbar { grid-template-columns: 1fr auto; }
  .topbar .topbar-crumb { display: none; }
  .page-nav { grid-template-columns: 1fr; }
  .page-nav a { border-right: 0; border-bottom: 1px solid var(--rule); text-align: left !important; }
}

/* -------- Touch-device hover reset — prevents tap-stick on iOS/iPad -------- */
@media (hover: none) {
  a:hover, button:hover,
  .lp-cta:hover, .lp-nav-links a:hover, .lp-mark:hover,
  .pub-wordmark:hover, .pub-signin:hover, .pub-nav a:hover,
  .cam-brand:hover, .cam-user:hover, .cam-out:hover, .cam-link:hover,
  .idx-entry:hover .idx-photo, .g-item:hover .g-frame img,
  .doc-row:hover, .doc-card:hover,
  [class*="-link"]:hover, [class*="-btn"]:hover, [class*="-cta"]:hover {
    transition: none !important;
    transform: none !important;
    background-color: inherit !important;
    color: inherit !important;
    border-color: inherit !important;
    filter: none !important;
    text-decoration: none !important;
    box-shadow: none !important;
  }
}
