/* ─────────────────────────────────────────────
   QUIROZ ENTERPRISE  ·  Apple.com-inspired
   Ported verbatim from Claude Design's
   Quiroz Enterprise.html target, then extended
   for legal chrome, articles, sign-in, dashboard.
   ───────────────────────────────────────────── */

/* ─── tokens ─── */
:root {
  --white:    #ffffff;
  --paper:    #fbfbfd;
  --grey-bg:  #f5f5f7;
  --ink:      #1d1d1f;
  --ink-2:    #424245;
  --grey:     #6e6e73;
  --grey-2:   #86868b;
  --rule:     #d2d2d7;
  --link:     #0066cc;
  --black-bg: #000000;
}

* { box-sizing: border-box; -webkit-font-smoothing: antialiased; }
html, body { margin: 0; padding: 0; background: var(--white); }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, sans-serif;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.022em;
}
img { display: block; max-width: 100%; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }

/* ─── display type ─── */
/* Display type — emulating SF Pro Display weights with Inter */
.display-xl, .display-lg, .display-md, .display-sm {
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--ink);
}
.display-xl { font-size: clamp(48px, 8vw, 96px); letter-spacing: -0.045em; line-height: 1.05; }
.display-lg { font-size: clamp(40px, 5.5vw, 64px); letter-spacing: -0.04em; }
.display-md { font-size: clamp(32px, 4vw, 48px); letter-spacing: -0.035em; }
.display-sm { font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -0.025em; line-height: 1.1; }

.lede {
  font-size: clamp(19px, 1.6vw, 24px);
  font-weight: 400;
  line-height: 1.38;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.eyebrow {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--grey);
}

/* ─── ctas / buttons ─── */
/* CTA links — Apple style */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--link);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.022em;
}
.cta:hover { text-decoration: underline; }
.cta::after {
  content: '\203A';
  font-size: 21px;
  line-height: 1;
  transform: translateY(-1px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--link);
  color: #fff;
  border: 0;
  border-radius: 980px;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.022em;
  padding: 12px 22px;
  transition: background 200ms ease;
}
.btn:hover { background: #0077ed; text-decoration: none; }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-secondary:hover { background: var(--ink); color: #fff; }
.btn-on-dark { background: #fff; color: var(--ink); }
.btn-on-dark:hover { background: #f0f0f0; }
.btn-secondary-on-dark { background: transparent; color: #fff; border: 1px solid #fff; }
.btn-secondary-on-dark:hover { background: #fff; color: var(--ink); }

/* ─── nav ─── */
/* Top nav — Apple's frosted bar */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.nav-inner {
  max-width: 1024px;
  margin: 0 auto;
  height: 44px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.nav-mark {
  color: var(--ink);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.06em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  color: var(--ink);
  opacity: 0.88;
  font-size: 12px;
  transition: opacity 160ms ease;
}
.nav-links a:hover { opacity: 1; text-decoration: none; }
.nav-actions { display: flex; align-items: center; gap: 18px; }
.nav-actions a { color: var(--ink); opacity: 0.88; font-size: 12px; }
.nav-actions .signin {
  color: var(--ink);
  opacity: 1;
  font-weight: 500;
}
@media (max-width: 833px) {
  .nav-links { display: none; }
}

/* Sub-nav — Apple's secondary product strip */
.subnav {
  position: sticky; top: 44px; z-index: 90;
  background: rgba(245,245,247,0.94);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.subnav-inner {
  max-width: 1024px; margin: 0 auto; padding: 0 22px;
  height: 52px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 14px;
}
.subnav-name { font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.subnav-links {
  display: flex; gap: 28px; list-style: none; margin: 0; padding: 0;
  color: var(--grey);
}
.subnav-links a { color: var(--grey); }
.subnav-links a:hover { color: var(--ink); text-decoration: none; }
.subnav .buy { font-size: 14px; }
@media (max-width: 720px) {
  .subnav-links { display: none; }
}

/* ─── hero ─── */
.hero {
  text-align: center;
  padding: 64px 22px 0;
  background: var(--white);
}
.hero h1 {
  margin: 0 auto 6px;
  max-width: 14ch;
}
.hero .subhead {
  margin: 6px auto 0;
  max-width: 32ch;
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1.14;
}
.hero .meta {
  margin: 26px auto 0;
  color: var(--grey);
  font-size: 17px;
  font-weight: 400;
  max-width: 40ch;
}
.hero .meta strong { color: var(--ink); font-weight: 500; }
.hero .ctas {
  margin: 22px auto 0;
  display: flex; gap: 24px;
  justify-content: center;
}
.hero-stage {
  margin: 56px auto 0;
  max-width: 1440px;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(900px 600px at 30% 30%, #2a2a2d 0%, #0a0a0c 60%, #000 100%);
  position: relative;
  overflow: hidden;
  display: grid; place-items: center;
}
.hero-stage::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(600px 300px at 80% 80%, rgba(120,80,40,0.25), transparent 60%),
    radial-gradient(800px 400px at 10% 90%, rgba(40,80,120,0.18), transparent 60%);
}
.hero-stage .qe-mark {
  position: relative;
  color: rgba(255,255,255,0.94);
  font-size: clamp(140px, 22vw, 360px);
  font-weight: 200;
  letter-spacing: -0.06em;
  line-height: 1;
  text-shadow: 0 0 80px rgba(255,255,255,0.05);
}
.hero-stage .qe-sub {
  position: absolute;
  bottom: 36px; left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.55);
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}
@media (max-width: 720px) {
  .hero { padding-top: 48px; }
  .hero .ctas { flex-direction: column; gap: 12px; align-items: center; }
}

/* ─── stacked product panels ─── */
/* Two-up section (Apple's "two products on grey") */
.stack { display: grid; gap: 12px; padding: 12px; background: var(--white); }
.panel {
  background: var(--grey-bg);
  border-radius: 24px;
  overflow: hidden;
  position: relative;
}
.panel-content {
  text-align: center;
  padding: 64px 22px 0;
}
.panel-content .eyebrow {
  color: var(--grey);
  font-size: 16px;
  font-weight: 500;
}
.panel-content h2 {
  margin: 8px 0 12px;
}
.panel-content .panel-sub {
  margin: 0 auto;
  color: var(--ink);
  max-width: 36ch;
  font-size: 21px;
  font-weight: 400;
  line-height: 1.28;
  letter-spacing: -0.02em;
}
.panel-content .ctas {
  margin: 20px auto 0;
  display: flex; gap: 22px; justify-content: center;
}
.panel.dark { background: #1d1d1f; color: #f5f5f7; }
.panel.dark .panel-content h2 { color: #f5f5f7; }
.panel.dark .panel-content .panel-sub { color: #f5f5f7; }
.panel.dark .panel-content .eyebrow { color: #a1a1a6; }

.two-up {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 833px) {
  .two-up { grid-template-columns: 1fr; }
}

/* Visual blocks (replace these with real product photography) */
.visual {
  height: 360px;
  margin: 36px 0 0;
  position: relative;
  overflow: hidden;
}
.visual-tall { height: 480px; }
.visual .logo-mark {
  position: absolute;
  inset: 0;
  display: grid; place-items: center;
}
.visual .logo-mark img {
  max-width: 56%;
  max-height: 60%;
  object-fit: contain;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.18));
}
.panel.dark .visual .logo-mark img {
  filter: invert(1) drop-shadow(0 30px 60px rgba(0,0,0,0.6));
}

/* Hero feature panel — full-bleed */
.feature {
  background: var(--grey-bg);
  border-radius: 0;
  overflow: hidden;
  position: relative;
}
.feature-content {
  text-align: center;
  padding: 96px 22px 0;
}
.feature .visual { height: 520px; margin-top: 56px; }
.feature.dark { background: #000; color: #f5f5f7; }
.feature.dark .panel-sub, .feature.dark h2 { color: #f5f5f7; }
.feature.dark .eyebrow { color: #a1a1a6; }

/* ─── story / centered narrative ─── */
.story {
  background: var(--white);
  padding: 120px 22px;
  text-align: center;
}
.story-inner {
  max-width: 720px;
  margin: 0 auto;
}
.story h2 { margin: 16px 0 24px; }
.story p {
  font-size: 21px;
  line-height: 1.42;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 18px;
}
.story .ctas { margin-top: 32px; display: flex; gap: 24px; justify-content: center; }

/* ─── brand grid ─── */
/* Brand grid (the full portfolio, Apple shop-style) */
.grid-section {
  background: var(--white);
  padding: 96px 22px 120px;
  text-align: center;
}
.grid-section h2 { margin: 0 0 18px; }
.grid-section .lede { max-width: 36ch; margin: 0 auto 56px; color: var(--grey); }
.brand-grid {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.brand-tile {
  background: var(--grey-bg);
  border-radius: 18px;
  padding: 28px 20px 22px;
  text-align: center;
  transition: transform 240ms ease, box-shadow 240ms ease;
  text-decoration: none;
  color: var(--ink);
  display: flex; flex-direction: column;
  aspect-ratio: 1 / 1.05;
}
.brand-tile:hover {
  transform: translateY(-3px);
  text-decoration: none;
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}
.brand-tile-logo {
  flex: 1;
  display: grid; place-items: center;
  margin-bottom: 14px;
  overflow: hidden;
}
.brand-tile-logo img {
  max-width: 78%; max-height: 78%;
  object-fit: contain;
}
.brand-tile-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 4px;
}
.brand-tile-cat {
  font-size: 12px;
  color: var(--grey);
  letter-spacing: -0.005em;
}
@media (max-width: 833px) {
  .brand-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
}
@media (max-width: 540px) {
  .brand-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* ─── highlights bar ─── */
.highlights {
  background: var(--white);
  padding: 0 22px 96px;
}
.highlights-inner {
  max-width: 1080px;
  margin: 0 auto;
  background: var(--grey-bg);
  border-radius: 24px;
  padding: 64px 32px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}
.highlight-num {
  font-size: clamp(40px, 4.4vw, 64px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink);
  margin-bottom: 10px;
}
.highlight-label {
  font-size: 14px;
  color: var(--grey);
  line-height: 1.3;
}
@media (max-width: 720px) {
  .highlights-inner { grid-template-columns: 1fr 1fr; gap: 24px; padding: 40px 24px; }
}

/* ─── footer ─── */
footer {
  background: var(--grey-bg);
  color: var(--grey);
  font-size: 12px;
  padding: 32px 22px;
}
.foot-inner { max-width: 1024px; margin: 0 auto; }
.foot-disclaimer {
  color: var(--grey);
  font-size: 12px;
  line-height: 1.6;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule);
}
.foot-disclaimer p { margin: 0 0 10px; }
.foot-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
}
.foot-cols h6 {
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 12px;
  letter-spacing: -0.005em;
}
.foot-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-cols a { color: var(--grey); font-size: 12px; }
.foot-cols a:hover { text-decoration: underline; color: var(--ink); }
.foot-bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 14px;
  padding: 18px 0 8px;
  color: var(--grey);
}
.foot-bottom .legal { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-bottom .legal a { color: var(--grey); }
@media (max-width: 720px) {
  .foot-cols { grid-template-columns: 1fr 1fr; gap: 24px; }
}

/* ─── sign-in modal ─── */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  z-index: 200;
  display: none;
  align-items: center; justify-content: center;
  padding: 22px;
  animation: fadein 240ms ease;
}
.modal-mask.open { display: flex; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff;
  border-radius: 18px;
  width: 100%; max-width: 440px;
  padding: 40px 40px 32px;
  position: relative;
  text-align: center;
}
.modal .close {
  position: absolute; top: 14px; right: 14px;
  background: var(--grey-bg);
  border: 0; border-radius: 50%;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  color: var(--grey);
  font-size: 18px;
}
.modal .close:hover { background: var(--rule); color: var(--ink); }
.modal h3 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 12px 0 8px;
  color: var(--ink);
}
.modal .modal-sub {
  color: var(--grey);
  font-size: 15px;
  line-height: 1.45;
  margin: 0 0 24px;
}
.modal .field {
  text-align: left;
  background: var(--grey-bg);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 10px;
}
.modal .field label {
  display: block;
  font-size: 11px;
  color: var(--grey);
  margin-bottom: 2px;
  letter-spacing: -0.005em;
}
.modal .field input {
  width: 100%;
  border: 0; outline: none; background: transparent;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  padding: 4px 0;
  letter-spacing: -0.012em;
}
.modal .submit {
  width: 100%;
  background: var(--link);
  color: #fff;
  border: 0; border-radius: 980px;
  padding: 13px;
  font-size: 15px;
  font-weight: 500;
  margin-top: 8px;
  letter-spacing: -0.012em;
  transition: background 200ms ease;
}
.modal .submit:hover { background: #0077ed; }
.modal .submit:disabled { opacity: 0.6; cursor: progress; }
.modal .invite-note {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  color: var(--grey);
  line-height: 1.5;
}
.modal .invite-note a { color: var(--link); }
.modal .ok-msg {
  background: var(--grey-bg);
  color: var(--ink);
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 14px;
  margin-top: 12px;
  display: none;
  text-align: left;
}
.modal .ok-msg.show { display: block; }
.modal .err-msg {
  background: #fff1f1;
  color: #b00020;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  margin-top: 10px;
  display: none;
  text-align: left;
}
.modal .err-msg.show { display: block; }
.modal .qe-glyph {
  width: 56px; height: 56px;
  margin: 0 auto;
  background: var(--ink);
  color: #fff;
  border-radius: 14px;
  display: grid; place-items: center;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 19px;
}

/* ─── reveal on scroll ─── */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 700ms ease, transform 700ms ease; }
.reveal.in { opacity: 1; transform: none; }

/* ─── editorial / article body ─── */
/* apple.com editorial layout for long-form pages: about, articles,
   legal docs. Centered narrow column, large display headlines, simple
   article chrome. */
.editorial {
  background: var(--white);
  padding: 64px 22px 96px;
}
.editorial-inner {
  max-width: 720px;
  margin: 0 auto;
}
.editorial-wide {
  max-width: 880px;
  margin: 0 auto;
}
.editorial header.editorial-head {
  text-align: center;
  margin: 24px 0 56px;
}
.editorial header.editorial-head .eyebrow { margin-bottom: 16px; display: block; }
.editorial header.editorial-head h1 { margin: 0 auto 16px; max-width: 22ch; }
.editorial header.editorial-head .lede { color: var(--grey); margin: 0 auto; max-width: 38ch; }
.editorial header.editorial-head .byline {
  color: var(--grey);
  font-size: 14px;
  margin-top: 24px;
  letter-spacing: -0.005em;
}

.editorial-body { color: var(--ink); }
.editorial-body p,
.editorial-body ul,
.editorial-body ol {
  font-size: 19px;
  line-height: 1.52;
  letter-spacing: -0.018em;
  color: var(--ink-2);
  margin: 0 0 22px;
}
.editorial-body ul, .editorial-body ol { padding-left: 1.2em; }
.editorial-body li { margin-bottom: 10px; }
.editorial-body h2 {
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink);
  margin: 56px 0 16px;
}
.editorial-body h3 {
  font-size: clamp(22px, 2.2vw, 26px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.18;
  color: var(--ink);
  margin: 40px 0 12px;
}
.editorial-body h4 {
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  margin: 32px 0 8px;
}
.editorial-body strong { color: var(--ink); font-weight: 600; }
.editorial-body blockquote {
  margin: 32px 0;
  padding: 24px 28px;
  background: var(--grey-bg);
  border-radius: 16px;
  font-size: 21px;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.editorial-body blockquote cite {
  display: block;
  margin-top: 12px;
  font-size: 14px;
  color: var(--grey);
  font-style: normal;
  letter-spacing: -0.005em;
}
.editorial-body hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 48px 0;
}
.editorial-body a { color: var(--link); }

/* ─── insights hub ─── */
.insights-hub {
  background: var(--white);
  padding: 64px 22px 96px;
}
.insights-hub-inner { max-width: 1080px; margin: 0 auto; }
.insights-feature {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
  background: var(--grey-bg);
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 64px;
}
.insights-feature .feature-art {
  background:
    radial-gradient(700px 500px at 30% 30%, #2a2a2d 0%, #0a0a0c 65%, #000 100%);
  min-height: 360px;
  display: grid; place-items: center;
  color: rgba(255,255,255,0.9);
  font-size: 64px;
  font-weight: 200;
  letter-spacing: -0.04em;
}
.insights-feature .feature-body { padding: 56px 48px; }
.insights-feature .feature-body .eyebrow { display: block; margin-bottom: 14px; }
.insights-feature .feature-body h2 { margin: 0 0 16px; }
.insights-feature .feature-body p {
  color: var(--ink-2);
  font-size: 18px;
  line-height: 1.45;
  letter-spacing: -0.018em;
  margin: 0 0 22px;
}
@media (max-width: 833px) {
  .insights-feature { grid-template-columns: 1fr; }
  .insights-feature .feature-art { min-height: 240px; font-size: 48px; }
  .insights-feature .feature-body { padding: 36px 28px; }
}

.insights-rail {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (max-width: 720px) {
  .insights-rail { grid-template-columns: 1fr; }
}
.insights-card {
  background: var(--grey-bg);
  border-radius: 18px;
  padding: 40px 32px;
  text-decoration: none;
  color: var(--ink);
  display: block;
  transition: transform 240ms ease, box-shadow 240ms ease;
}
.insights-card:hover {
  transform: translateY(-3px);
  text-decoration: none;
  box-shadow: 0 20px 40px rgba(0,0,0,0.06);
}
.insights-card .eyebrow { display: block; margin-bottom: 12px; }
.insights-card h3 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 0 0 12px;
  color: var(--ink);
}
.insights-card p {
  font-size: 15px;
  line-height: 1.5;
  color: var(--grey);
  margin: 0 0 16px;
}
.insights-card .read {
  color: var(--link);
  font-size: 14px;
}

/* ─── about hero (founder) ─── */
.about-hero {
  background: var(--white);
  padding: 64px 22px 32px;
  text-align: center;
}
.about-hero h1 { margin: 8px auto 16px; max-width: 18ch; }
.about-hero .lede { color: var(--grey); max-width: 38ch; margin: 0 auto; }

.about-portrait {
  margin: 56px auto 0;
  max-width: 880px;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  background:
    radial-gradient(800px 500px at 35% 40%, #2a2a2d 0%, #0a0a0c 60%, #000 100%);
  position: relative;
  overflow: hidden;
}
.about-portrait::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(500px 250px at 80% 80%, rgba(120,80,40,0.20), transparent 60%);
}
.about-portrait .label {
  position: absolute; bottom: 28px; left: 28px;
  color: rgba(255,255,255,0.72);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ─── legal page chrome ─── */
.legal-doc-head {
  background: var(--white);
  padding: 56px 22px 32px;
  border-bottom: 1px solid var(--rule);
}
.legal-doc-head-inner { max-width: 720px; margin: 0 auto; }
.legal-doc-head .eyebrow { display: block; margin-bottom: 14px; }
.legal-doc-head h1 {
  font-size: clamp(36px, 4.6vw, 56px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--ink);
  margin: 0 0 16px;
  max-width: 22ch;
}
.legal-doc-head .legal-doc-meta {
  color: var(--grey);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}
.legal-doc-head .legal-doc-meta strong { color: var(--ink); font-weight: 500; }
.legal-doc-head .legal-doc-meta span + span::before {
  content: '·'; margin: 0 8px; color: var(--rule);
}

.legal-toc {
  background: var(--grey-bg);
  border-radius: 16px;
  padding: 24px 28px;
  margin: 32px 0 40px;
}
.legal-toc h2 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--grey);
  margin: 0 0 12px;
}
.legal-toc ul { list-style: none; margin: 0; padding: 0; }
.legal-toc li { margin: 6px 0; }
.legal-toc a {
  color: var(--ink);
  font-size: 15px;
  letter-spacing: -0.012em;
}
.legal-toc a:hover { color: var(--link); text-decoration: underline; }

.marks-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
}
.marks-table th, .marks-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-2);
}
.marks-table th {
  font-weight: 600;
  color: var(--ink);
  background: var(--grey-bg);
}

.agent-card {
  background: var(--grey-bg);
  border-radius: 16px;
  padding: 24px 28px;
  margin: 24px 0;
}
.agent-card h3 {
  font-size: 18px; font-weight: 600;
  margin: 0 0 8px; color: var(--ink);
}
.agent-card p { margin: 0 0 6px; font-size: 15px; color: var(--ink-2); }

/* ─── auth pages (signin, team-dashboard) — apple.com style ─── */
.auth-page {
  background: var(--grey-bg);
  min-height: 100vh;
}
.auth-shell {
  max-width: 460px;
  margin: 0 auto;
  padding: 64px 22px 96px;
}
.auth-shell-wide {
  max-width: 880px;
}
.auth-back {
  display: inline-flex;
  align-items: center;
  color: var(--grey);
  font-size: 13px;
  letter-spacing: -0.005em;
  margin-bottom: 24px;
}
.auth-back:hover { color: var(--ink); text-decoration: none; }

.auth-card {
  background: #fff;
  border-radius: 22px;
  padding: 48px 44px 36px;
  text-align: center;
  box-shadow: 0 30px 60px rgba(0,0,0,0.04);
}
.auth-card-wide { text-align: left; padding: 56px 56px 48px; }
.auth-card-head { margin-bottom: 28px; }
.auth-card-head .eyebrow { display: block; margin-bottom: 12px; }
.auth-card-head h1 {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--ink);
  margin: 0 0 12px;
}
.auth-card-head .auth-lede {
  color: var(--grey);
  font-size: 15px;
  line-height: 1.45;
  margin: 0 auto;
  max-width: 36ch;
}

.auth-form { display: grid; gap: 10px; }
.apple-style-form-field,
.auth-field {
  text-align: left;
  background: var(--grey-bg);
  border-radius: 12px;
  padding: 10px 14px;
}
.apple-style-form-field span,
.auth-field span {
  display: block;
  font-size: 11px;
  color: var(--grey);
  margin-bottom: 2px;
  letter-spacing: -0.005em;
}
.apple-style-form-field input,
.auth-field input {
  width: 100%;
  border: 0; outline: none; background: transparent;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  padding: 4px 0;
  letter-spacing: -0.012em;
}

.auth-submit {
  width: 100%;
  background: var(--link);
  color: #fff;
  border: 0;
  border-radius: 980px;
  padding: 13px;
  font-size: 15px;
  font-weight: 500;
  margin-top: 12px;
  letter-spacing: -0.012em;
  transition: background 200ms ease;
}
.auth-submit:hover { background: #0077ed; }
.auth-submit:disabled { opacity: 0.6; cursor: progress; }

.auth-error {
  background: #fff1f1;
  color: #b00020;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  text-align: left;
  margin: 8px 0 0;
}

.auth-forgot {
  display: block;
  margin-top: 14px;
  color: var(--link);
  font-size: 13px;
}

.auth-divider {
  position: relative;
  text-align: center;
  margin: 28px 0 18px;
  color: var(--grey);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 26px);
  height: 1px;
  background: var(--rule);
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

.auth-alt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: var(--grey-bg);
  color: var(--ink);
  border-radius: 980px;
  padding: 12px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.012em;
}
.auth-alt:hover { background: var(--rule); text-decoration: none; }
.auth-alt-mark {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  color: #229ED9;
}

.auth-foot {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--grey);
}
.auth-foot a { color: var(--link); font-size: 12px; }

/* ─── team dashboard ─── */
.auth-dash-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 24px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}
.auth-dash-head .wordmark {
  color: var(--ink);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.06em;
}
.auth-dash-actions { display: flex; align-items: center; gap: 14px; }
.auth-dash-user { font-size: 13px; color: var(--grey); }
.auth-logout {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ink);
  border-radius: 980px;
  padding: 7px 16px;
  font-size: 13px;
  letter-spacing: -0.005em;
}
.auth-logout:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

.auth-actions-row {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin: 24px 0 32px;
}
.auth-cta-primary {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--link); color: #fff;
  border-radius: 980px;
  padding: 12px 22px;
  font-size: 15px; font-weight: 500;
  letter-spacing: -0.012em;
}
.auth-cta-primary:hover { background: #0077ed; text-decoration: none; }
.auth-cta-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 980px;
  padding: 11px 22px;
  font-size: 15px;
  letter-spacing: -0.012em;
}
.auth-cta-ghost:hover { background: var(--ink); color: #fff; text-decoration: none; }

.auth-meta {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 24px;
  margin: 24px 0;
  padding: 24px;
  background: var(--grey-bg);
  border-radius: 16px;
}
.auth-meta dt {
  color: var(--grey);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  align-self: center;
}
.auth-meta dd {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  letter-spacing: -0.005em;
}

.auth-dash-foot {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  color: var(--grey);
  line-height: 1.5;
}
.auth-dash-foot code {
  background: var(--grey-bg);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 12px;
}

/* ─── responsive helpers ─── */
@media (max-width: 540px) {
  .auth-card { padding: 36px 28px 28px; }
  .auth-card-wide { padding: 36px 28px 28px; }
  .insights-feature .feature-body { padding: 28px 22px; }
}

/* ─── photo-backed slots (real Frankie photos) ─── */
/* Apple-product-shot treatment: low-key, dramatic, restrained vignette so
   QE wordmarks/labels overlaid on dark photos remain readable. */

/* Hero stage: photo backdrop layer behind the QE mark. The mark is preserved
   with `position: relative; z-index: 2`. The image sits below it via z-index 0
   and a vignette (`.hero-stage::after`) sits between via z-index 1. */
.hero-stage .stage-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  z-index: 0;
  filter: brightness(0.85) saturate(0.92);
}
.hero-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 600px at 50% 40%, rgba(0,0,0,0) 0%, rgba(0,0,0,0.45) 70%, rgba(0,0,0,0.7) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.0) 40%, rgba(0,0,0,0.55) 100%);
  z-index: 1;
  pointer-events: none;
}
.hero-stage .qe-mark,
.hero-stage .qe-sub {
  z-index: 2;
}

/* Founder narrative photo strip on the homepage `.story` section */
.story-photo {
  margin: 48px auto 0;
  max-width: 860px;
  aspect-ratio: 3 / 2;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  background: var(--grey-bg);
  box-shadow: 0 30px 60px rgba(0,0,0,0.08);
}
.story-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.story-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.18));
  pointer-events: none;
}

/* About-portrait variant: replace gradient with real photo, keep the label */
.about-portrait.has-photo {
  background: #0a0a0c;
}
.about-portrait .portrait-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  z-index: 0;
}
.about-portrait.has-photo::before {
  background:
    linear-gradient(180deg, rgba(0,0,0,0.0) 55%, rgba(0,0,0,0.55) 100%),
    radial-gradient(700px 400px at 30% 30%, rgba(0,0,0,0) 0%, rgba(0,0,0,0.4) 80%);
  z-index: 1;
}
.about-portrait.has-photo .label {
  z-index: 2;
}

/* Insights featured card: replace gradient feature-art with photo */
.insights-feature .feature-art.has-photo {
  background: #0a0a0c;
  position: relative;
  overflow: hidden;
  font-size: 0;
}
.insights-feature .feature-art .art-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.insights-feature .feature-art.has-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.05) 60%, rgba(0,0,0,0.35));
  pointer-events: none;
}

/* Article hero photo block: full-bleed editorial frame above the article body */
.article-hero {
  width: 100%;
  background: #0a0a0c;
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  max-height: 620px;
}
.article-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}
.article-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,0.32));
  pointer-events: none;
}
@media (max-width: 720px) {
  .article-hero { aspect-ratio: 4 / 3; }
}
