/*
Theme Name: Alpha OBS
Theme URI: https://www.alphaobs.com
Author: Alpha OBS LLP
Description: Pixel-faithful WordPress conversion of the alphaobs.com Framer site. Dark/light toggle, editable vertical cards, SEO-ready.
Version: 1.0.0
Requires PHP: 7.4
License: Proprietary
Text Domain: alphaobs
*/

/* ---------- Design tokens (measured from the Framer site) ---------- */
:root {
  --frame-bg: #000;
  --sheet-bg: #fff;
  --text: #000;
  --text-soft: rgba(0, 0, 0, 0.5);
  --sheet-radius: 24px;
  --sheet-inset: 8px;
}
html[data-theme="dark"] {
  --sheet-bg: #1c1c1c;
  --text: #fff;
  --text-soft: rgba(255, 255, 255, 0.5);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--frame-bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.sheet {
  background: var(--sheet-bg);
  border-radius: var(--sheet-radius);
  margin: var(--sheet-inset);
  min-height: calc(100vh - 16px);
  transition: background 0.3s ease;
}
.container {
  max-width: 1236px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: content-box; /* max-width = content; 20px gutters survive small screens */
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-top: 28px; /* padding, not margin — avoids collapse through .sheet */
  height: 132px;
}
.site-logo { display: block; line-height: 0; }
.theme-toggle { margin-top: 20px; }
.site-logo img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: filter 0.3s ease;
}
/* Fix the Framer bug: logo now converts correctly in dark mode */
html[data-theme="dark"] .site-logo img {
  filter: invert(1);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.12);
}

/* Theme toggle */
.theme-toggle {
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
  display: inline-flex;
  opacity: 0.85;
}
.theme-toggle:hover { opacity: 1; }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ---------- Typography ---------- */
h1, h2, h3 { margin: 0; font-weight: 600; color: var(--text); }
.hero h1 {
  font-size: 56px;
  line-height: 1.15;
  letter-spacing: -0.04em;
  max-width: 885px;
  margin-top: 28px;
}
.hero .hero-sub {
  margin: 16px 0 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-soft);
  white-space: pre-line;
}

/* ---------- Verticals section ---------- */
.hero { padding-bottom: 79px; }
.verticals { padding-top: 10px; padding-bottom: 44px; }
.verticals h2 {
  font-size: 34px;
  line-height: 1.4;
  letter-spacing: -0.03em;
  max-width: 1180px;
  margin-bottom: 36px;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 50px;
}
.vertical-card { display: block; }
.vertical-card .card-media {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 5 / 6;
}
.vertical-card .card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.vertical-card:hover .card-media img { transform: scale(1.03); }
.vertical-card h3 {
  font-size: 24px;
  line-height: 1.4;
  letter-spacing: -0.017em;
  margin-top: 17px;
}
.vertical-card .card-sub {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-soft);
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: 0 16px 1px;
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
}

/* ---------- Prose pages (privacy policy etc.) ---------- */
.prose { padding: 24px 0 96px; max-width: 820px; }
.prose h1 { font-size: 40px; line-height: 1.2; letter-spacing: -0.03em; margin: 24px 0 16px; }
.prose h2 { font-size: 28px; line-height: 1.35; letter-spacing: -0.02em; margin: 40px 0 12px; }
.prose h3 { font-size: 21px; line-height: 1.4; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--text-soft); }
.prose ul, .prose ol { padding-left: 24px; }
.prose strong { color: var(--text); }
.prose a { text-decoration: underline; }
.prose table { border-collapse: collapse; width: 100%; margin: 16px 0; }
.prose th, .prose td { border: 1px solid var(--text-soft); padding: 8px 12px; text-align: left; color: var(--text-soft); }
.prose th { color: var(--text); }

/* ---------- Inner pages (timezoneconverter) ---------- */
.embed-page { background: #fff; border-radius: var(--sheet-radius); overflow: hidden; }
html[data-theme="dark"] .embed-page { background: #1c1c1c; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}
@media (max-width: 719px) {
  .hero h1 { font-size: 36px; line-height: 1.25; }
  .verticals { padding-top: 56px; padding-bottom: 56px; }
  .verticals h2 { font-size: 26px; margin-bottom: 28px; }
  .card-grid { grid-template-columns: 1fr; gap: 40px; }
  .vertical-card { max-width: 420px; margin: 0 auto; width: 100%; }
  .site-header { padding-top: 16px; height: 96px; }
  .theme-toggle { margin-top: 12px; }
  .site-logo img { width: 64px; height: 64px; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
