/* Shared design tokens — loaded by all PetrolPrice pages */
:root {
  --font:      'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'DM Mono', 'Fira Code', monospace;
  /* Header wordmark + " | About" — one size everywhere (index + About/Careers/FAQ) */
  --header-lockup-font-size: 1rem;
  --header-lockup-font-size-sm: 1rem;
  --header-lockup-logo-height: 1.25rem;
  --header-lockup-logo-height-sm: 1.125rem;
}

/* ── Add to Home Screen (iOS) ─────────────────────────────────────────────── */
.a2hs{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  /* Ensure the gradient sits behind the card. */
  align-items: flex-end;
  justify-content: center;
  padding: 0 0 max(0px, env(safe-area-inset-bottom, 0px));
  /* Keep the page visible; don't dim/blur the whole viewport. */
  background: transparent;
  /* Do not block the page (map) — only the card is interactive. */
  pointer-events: none;
  box-sizing: border-box;
}
.a2hs[hidden]{ display: none; }
.a2hs::before{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 44vh;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(
    to top,
    rgba(2, 6, 23, 0.42) 0%,
    rgba(2, 6, 23, 0.14) 45%,
    rgba(2, 6, 23, 0.00) 100%
  );
}
.a2hs-card{
  position: relative;
  z-index: 1;
  width: 100%;
  pointer-events: auto;
  border-radius: 20px 20px 0 0;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.32);
  padding: 18px 18px max(16px, env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  border: 1px solid rgba(15, 23, 42, 0.10);
  backdrop-filter: blur(18px) saturate(155%);
  -webkit-backdrop-filter: blur(18px) saturate(155%);
}
.a2hs-card::before{
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 52px;
  height: 5px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.16);
}
@media (prefers-color-scheme: dark) {
  .a2hs-card{
    background: rgba(16, 16, 18, 0.92);
    color: rgba(255, 255, 255, 0.92);
    box-shadow: 0 24px 90px rgba(0, 0, 0, 0.58);
    border-color: rgba(255, 255, 255, 0.12);
  }
  .a2hs-card::before{
    background: rgba(255, 255, 255, 0.18);
  }
}
.a2hs-row{
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.a2hs-icon{
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  overflow: hidden;
  background: #fafaf8;
  border: 1px solid rgba(15, 23, 42, 0.10);
  display: flex;
  align-items: center;
  justify-content: center;
}
.a2hs-icon img{
  width: 48px;
  height: 48px;
  display: block;
}
.a2hs-copy{
  flex: 1;
  min-width: 0;
}
.a2hs-title{
  font-family: 'DM Sans', var(--font);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.a2hs-subtitle{
  margin-top: 4px;
  opacity: 0.72;
  font-size: 0.95rem;
  line-height: 1.2;
}
.a2hs-instr{
  margin-top: 10px;
  font-size: 0.92rem;
  line-height: 1.35;
  opacity: 0.86;
}
.a2hs-share{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin: 0 4px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.14);
  color: #2563eb;
  vertical-align: middle;
}
@media (prefers-color-scheme: dark) {
  .a2hs-icon{
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
  }
  .a2hs-share{
    background: rgba(59, 130, 246, 0.18);
    color: #60a5fa;
  }
}
.a2hs-close{
  flex-shrink: 0;
  border: none;
  background: transparent;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  font-size: 32px;
  line-height: 36px;
  color: inherit;
  opacity: 0.55;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.a2hs-close:hover{ opacity: 0.72; }
.a2hs-close:focus-visible{
  outline: 2px solid rgba(255, 106, 0, 0.45);
  outline-offset: 2px;
}
.a2hs-ok{
  margin-top: 16px;
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 999px;
  font-family: 'DM Sans', var(--font);
  font-weight: 700;
  font-size: 1.05rem;
  background: #1d78d8;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(29, 120, 216, 0.35);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.a2hs-ok:hover{ filter: brightness(1.02); }
.a2hs-ok:active{ transform: translateY(1px); }
.a2hs-ok:focus-visible{
  outline: 2px solid rgba(255, 106, 0, 0.45);
  outline-offset: 3px;
}

/* Wordmark — DM Sans Semibold (600); load DM Sans on each page via Google Fonts */
.site-wordmark {
  font-family: 'DM Sans', var(--font);
  font-weight: 600;
  font-style: normal;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: inherit;
  text-decoration: none;
}

a.site-wordmark:hover {
  opacity: 0.88;
}

a.site-wordmark:active {
  opacity: 0.78;
}

/* Logo sits left of the wordmark (terminal, index header, etc.) */
.site-wordmark-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

a.site-wordmark-lockup {
  text-decoration: none;
  color: inherit;
}

.site-wordmark-logo {
  flex-shrink: 0;
  height: 1.5rem;
  width: auto;
  display: block;
}

/* Site header — same bar height as index (inner row matches CTA button height).
   Scope to body > header so <header> inside articles (e.g. investors press masthead) is not sticky. */
body > header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 14px clamp(16px, 4vw, 32px);
  padding-top: max(14px, env(safe-area-inset-top, 0px));
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-sizing: border-box;
}

body > header .logo-block {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
  min-height: 34px;
}

/* Subpage header: "petrolprice.xyz | About" — one line-height + even gaps so flex centering is true */
.logo-block-lockup-row {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.5rem;
  min-width: 0;
}

.header-context-sep {
  flex-shrink: 0;
  /* Same face/size as wordmark so the pipe shares cap height and centers cleanly */
  font-family: 'DM Sans', var(--font);
  font-weight: 400;
  font-size: var(--header-lockup-font-size);
  line-height: 1;
  color: inherit;
  opacity: 0.42;
  user-select: none;
}

.header-context-label {
  flex-shrink: 0;
  /* DM Sans like the wordmark so cap/x-height matches at the same font-size; 400 reads lighter than 600 */
  font-family: 'DM Sans', var(--font);
  font-weight: 400;
  font-size: var(--header-lockup-font-size);
  letter-spacing: -0.01em;
  line-height: 1;
  color: inherit;
}

a.header-context-link {
  flex-shrink: 0;
  font-family: 'DM Sans', var(--font);
  font-weight: 400;
  font-size: var(--header-lockup-font-size);
  letter-spacing: -0.01em;
  line-height: 1;
  color: inherit;
  text-decoration: none;
}

a.header-context-link:hover {
  opacity: 0.88;
  text-decoration: underline;
  text-underline-offset: 2px;
}

a.header-context-link:focus-visible {
  outline: 2px solid rgba(255, 106, 0, 0.45);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Explicit lockup + tag so UA `h1` sizing (e.g. 2em) never wins over class-only rules */
body > header .logo-block h1.site-wordmark.site-wordmark-lockup,
body > header .logo-block a.site-wordmark.site-wordmark-lockup {
  font-size: var(--header-lockup-font-size);
  margin: 0;
  font-weight: 600;
  /* Tighter than default .site-wordmark so row items share one vertical band */
  line-height: 1;
}

body > header .logo-block .site-wordmark-logo {
  height: var(--header-lockup-logo-height);
  width: auto;
  display: block;
  flex-shrink: 0;
}

/* Span text must match lockup size (don’t rely on inherit vs UA h1) */
body > header .logo-block .site-wordmark-lockup > span {
  font-size: var(--header-lockup-font-size);
  font-weight: 600;
  line-height: 1;
}

@media (max-width: 639px) {
  body > header {
    padding: max(12px, env(safe-area-inset-top, 0px)) 16px 12px;
  }

  body > header .logo-block {
    min-height: 30px;
  }

  body > header .logo-block h1.site-wordmark.site-wordmark-lockup,
  body > header .logo-block a.site-wordmark.site-wordmark-lockup {
    font-size: var(--header-lockup-font-size-sm);
  }

  body > header .logo-block .site-wordmark-lockup > span {
    font-size: var(--header-lockup-font-size-sm);
  }

  body > header .logo-block .site-wordmark-logo {
    height: var(--header-lockup-logo-height-sm);
  }

  .header-context-sep,
  .header-context-label,
  a.header-context-link {
    font-size: var(--header-lockup-font-size-sm);
  }

  .site-footer {
    padding: 28px 16px 32px;
    text-align: left;
  }

  /* Compound selectors beat later `.footer-row { align-items: center }` so mobile isn’t centered */
  .footer-row.footer-row-top,
  .footer-row.footer-row-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    width: 100%;
  }

  /* Two-class selectors beat later `.footer-nav-primary` / `.footer-legal` / `.footer-contact` (align-items: center) */
  .footer-row-top .footer-nav-primary {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .footer-divider {
    margin: 22px 0 20px;
  }

  .footer-row-bottom .footer-legal {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
  }

  .footer-legal-sep {
    display: none;
  }

  .footer-copyright-break {
    display: inline;
  }

  .footer-row-bottom .footer-contact {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
  }

  .footer-row-bottom .footer-social-x {
    align-self: flex-start;
  }
}

/* ═══════════════════════════════════════════════════════════
   Site footer — landing + About / Careers / FAQ
   ═══════════════════════════════════════════════════════════ */
.site-footer {
  position: relative;
  z-index: 2;
  padding: 40px 28px 36px;
  background: var(--bg);
  width: 100%;
  /* Softer gray than body --text-muted for secondary footer copy */
  --footer-muted: #a8a8a8;
  --footer-muted-hover: #7a7a7a;
  --footer-rule: color-mix(in srgb, var(--border) 72%, var(--bg));
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px 28px;
}

.footer-row-top .footer-brand.site-wordmark {
  font-size: 1rem;
  color: var(--text);
}

.footer-nav-primary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(16px, 3vw, 36px);
}

.footer-nav-primary a {
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--footer-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-nav-primary a:hover {
  color: var(--footer-muted-hover);
}

.footer-divider {
  height: 1px;
  background: var(--footer-rule);
  margin: 28px 0 24px;
}

.footer-legal {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  font-size: 0.8125rem;
  color: var(--footer-muted);
  line-height: 1.5;
}

.footer-copyright {
  color: var(--footer-muted);
}

.footer-copyright-break {
  display: none;
}

.footer-legal-sep {
  color: var(--footer-muted);
  opacity: 0.45;
  user-select: none;
  pointer-events: none;
}

.footer-legal a {
  color: var(--footer-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-legal a:hover {
  color: var(--footer-muted-hover);
}

.footer-contact {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px 28px;
  font-size: 0.8125rem;
}

.footer-contact > a:first-child {
  color: var(--footer-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-contact > a:first-child:hover {
  color: var(--footer-muted-hover);
}

.footer-social-x {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--footer-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-social-x:hover {
  color: var(--footer-muted-hover);
}

.footer-social-x svg {
  flex-shrink: 0;
  opacity: 0.9;
}

@media (prefers-color-scheme: dark) {
  .site-footer {
    --footer-muted: rgba(255, 255, 255, 0.48);
    --footer-muted-hover: rgba(255, 255, 255, 0.78);
  }
}
