/* Palomino marketing site, shared stylesheet.
   Single source of truth for the visual system. Layers:
   1. Design tokens with light and dark theme sets.
   2. Self-hosted display font (Bricolage Grotesque, OFL license in fonts/OFL.txt).
   3. Universal core: reset, body base, focus ring, shared nav and footer.
   4. Marketing layout under .marketing (index.html, fuji, hasselblad).
   5. Legal layout under .legal (privacy.html).
   Theme resolution: light tokens are the default, a prefers-color-scheme media
   query supplies dark, and an html[data-theme] attribute set by the in-page
   toggle wins over both. */

/* 1. Design tokens */
:root {
  color-scheme: light;
  --bg: #faf8f5;
  --panel: #ffffff;
  --panel-2: #f2efe9;
  --text: #201d19;
  --muted: #6b6560;
  --accent: #F5A623;
  --accent-ink: #8a5a00;
  --on-accent: #161000;
  --border: #e5dfd5;
  --shadow: 0 20px 48px rgba(60, 45, 20, 0.14);
  --nav-bg: rgba(250, 248, 245, 0.82);
  --glow: rgba(245, 166, 35, 0.20);
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0d0d0d;
    --panel: #161616;
    --panel-2: #1d1d1d;
    --text: #ececec;
    --muted: #a0a0a0;
    --accent: #F5A623;
    --accent-ink: #F5A623;
    --on-accent: #161000;
    --border: #262626;
    --shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    --nav-bg: rgba(13, 13, 13, 0.78);
    --glow: rgba(245, 166, 35, 0.14);
  }
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0d0d;
  --panel: #161616;
  --panel-2: #1d1d1d;
  --text: #ececec;
  --muted: #a0a0a0;
  --accent: #F5A623;
  --accent-ink: #F5A623;
  --on-accent: #161000;
  --border: #262626;
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  --nav-bg: rgba(13, 13, 13, 0.78);
  --glow: rgba(245, 166, 35, 0.14);
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #faf8f5;
  --panel: #ffffff;
  --panel-2: #f2efe9;
  --text: #201d19;
  --muted: #6b6560;
  --accent: #F5A623;
  --accent-ink: #8a5a00;
  --on-accent: #161000;
  --border: #e5dfd5;
  --shadow: 0 20px 48px rgba(60, 45, 20, 0.14);
  --nav-bg: rgba(250, 248, 245, 0.82);
  --glow: rgba(245, 166, 35, 0.20);
}

/* 2. Display font */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/BricolageGrotesque-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 100%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* 3. Universal core */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .wordmark {
  font-family: "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a:focus-visible, button:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
:target { scroll-margin-top: 84px; }

/* Shared sticky nav */
.site-nav {
  position: sticky; top: 0; z-index: 20;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-nav .nav-inner {
  max-width: 1040px; margin: 0 auto; padding: 0 24px;
  height: 60px; display: flex; align-items: center; gap: 22px;
}
.site-nav .brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text); margin-right: auto;
}
.site-nav .brand img { width: 30px; height: 30px; border-radius: 7px; display: block; }
.wordmark { font-size: 1.18rem; font-weight: 700; letter-spacing: -0.01em; }
.wordmark .accent { color: var(--accent); }
.site-nav .nav-links { display: flex; gap: 20px; }
.site-nav .nav-links a {
  color: var(--muted); text-decoration: none; font-size: 0.92rem;
}
.site-nav .nav-links a:hover { color: var(--text); }
.btn-nav {
  background: var(--accent); color: var(--on-accent);
  font-size: 0.9rem; font-weight: 600; text-decoration: none;
  padding: 8px 16px; border-radius: 8px; white-space: nowrap;
}
.btn-nav:hover { filter: brightness(1.08); }
.theme-toggle {
  appearance: none; -webkit-appearance: none;
  background: none; border: 1px solid var(--border); border-radius: 8px;
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); cursor: pointer; flex-shrink: 0;
}
.theme-toggle:hover { color: var(--text); border-color: var(--muted); }
.theme-toggle svg { width: 17px; height: 17px; display: block; }
.theme-toggle .sun { display: none; }
@media (prefers-color-scheme: light) {
  .theme-toggle .sun { display: block; }
  .theme-toggle .moon { display: none; }
}
html[data-theme="light"] .theme-toggle .sun { display: block; }
html[data-theme="light"] .theme-toggle .moon { display: none; }
html[data-theme="dark"] .theme-toggle .sun { display: none; }
html[data-theme="dark"] .theme-toggle .moon { display: block; }

/* Shared footer */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 64px; padding: 48px 0 64px;
  color: var(--muted); font-size: 0.88rem;
}
.site-footer .footer-inner { display: flex; flex-direction: column; gap: 18px; align-items: center; text-align: center; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent-ink); }
.social-links { display: flex; gap: 14px; }
.social-links a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 10px;
  color: var(--muted);
}
.social-links a:hover { color: var(--accent-ink); border-color: var(--muted); }
.social-links svg { width: 18px; height: 18px; display: block; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

/* 4. Marketing layout */
.marketing { line-height: 1.65; }
.marketing header.hero { padding: 72px 0 40px; text-align: center; position: relative; }
.marketing .hero h1 {
  font-size: clamp(2.3rem, 5.5vw, 3.6rem);
  font-weight: 750; letter-spacing: -0.025em; line-height: 1.05;
  max-width: 720px; margin: 0 auto;
}
.marketing .hero h1 .accent { color: var(--accent); }
.marketing .tagline { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--muted); margin-top: 16px; }
.marketing .pitch { max-width: 640px; margin: 22px auto 0; color: var(--text); font-size: 1.05rem; }
.marketing .cta { margin-top: 32px; display: flex; gap: 16px; justify-content: center; align-items: center; flex-wrap: wrap; }
.marketing .btn {
  display: inline-block; padding: 12px 28px; border-radius: 10px;
  font-weight: 600; text-decoration: none; font-size: 1rem;
}
.marketing .btn-primary { background: var(--accent); color: var(--on-accent); }
.marketing .btn-primary:hover { filter: brightness(1.08); }
.marketing .btn-secondary { border: 1px solid var(--border); color: var(--text); }
.marketing .btn-secondary:hover { border-color: var(--accent); color: var(--accent-ink); }
.marketing .badge-row { margin-top: 26px; text-align: center; }
.marketing .appstore-badge { height: 48px; width: auto; display: inline-block; }
.marketing .appstore-badge:hover { filter: brightness(1.1); }
.marketing .req { margin-top: 16px; font-size: 0.85rem; color: var(--muted); }
.marketing section { padding: 44px 0; }
.marketing .hero-shot { position: relative; margin: 48px auto 0; max-width: 860px; padding: 0 24px; }
.marketing .hero-shot::before {
  content: ""; position: absolute; inset: -8% -4% -14%;
  background: radial-gradient(ellipse 60% 55% at 50% 42%, var(--glow), transparent 70%);
  pointer-events: none;
}
.marketing .hero-shot .ratio-box {
  position: relative; border-radius: 14px; border: 1px solid var(--border);
  box-shadow: var(--shadow); overflow: hidden;
}
.marketing .shot { max-width: 860px; margin: 0 auto 60px; }
.marketing .shot .ratio-box {
  position: relative; border-radius: 12px; border: 1px solid var(--border);
  box-shadow: var(--shadow); overflow: hidden;
}
/* Ratio box: padding-top percentage reserves height from a percentage of
   width alone, so the box never depends on aspect-ratio support or on any
   browser's zoom-scale layout math for a replaced element. The image is
   absolutely positioned to fill it. 62.5% = 5/8, matching the 1.6:1 (8:5)
   screenshots. */
.ratio-box { position: relative; padding-top: 62.5%; }
.ratio-box img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; object-fit: cover;
}
.marketing .shot figcaption { margin-top: 16px; color: var(--muted); font-size: 0.95rem; text-align: center; max-width: 760px; margin-left: auto; margin-right: auto; }
.marketing .shot figcaption strong { color: var(--text); }
.marketing h2 {
  font-size: clamp(1.45rem, 3vw, 1.8rem);
  font-weight: 700; letter-spacing: -0.015em;
  margin-bottom: 28px; text-align: center;
}
.marketing .features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.marketing .feature {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 14px; padding: 24px;
}
.marketing .feature h3 { font-size: 1.05rem; font-weight: 650; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.marketing .feature h3 span { color: var(--accent-ink); display: inline-flex; flex-shrink: 0; }
.marketing .feature h3 svg { width: 19px; height: 19px; display: block; }
.marketing .feature p { color: var(--muted); font-size: 0.93rem; }
.marketing .keys { text-align: center; color: var(--muted); font-size: 0.95rem; }
.marketing .keys kbd {
  background: var(--panel); border: 1px solid var(--border); border-bottom-width: 2px;
  border-radius: 6px; padding: 2px 8px; font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.85rem; color: var(--text);
}
.marketing .testimonial-wrap { padding: 8px 0 40px; text-align: center; }
.marketing .testimonial { display: inline-block; max-width: 520px; width: 100%; }
.marketing .testimonial img { width: 100%; border-radius: 18px; }
.marketing .testimonial figcaption { margin-top: 12px; color: var(--muted); font-size: 0.85rem; }
.marketing .lead { max-width: 660px; margin: 0 auto 28px; text-align: center; color: var(--text); font-size: 1.05rem; }
.marketing .faq { max-width: 720px; margin: 0 auto; text-align: left; }
.marketing .faq h3 { font-size: 1.05rem; font-weight: 650; margin: 26px 0 6px; }
.marketing .faq p { color: var(--muted); font-size: 0.95rem; }
.marketing .faq h3:first-of-type { margin-top: 0; }
.marketing .faq a { color: var(--accent-ink); }
.marketing .center { text-align: center; }
.marketing .subnote { color: var(--muted); font-size: 0.95rem; max-width: 580px; margin: 0 auto; }
.marketing .breadcrumb { text-align: center; margin-bottom: 28px; font-size: 0.95rem; color: var(--muted); }
.marketing .breadcrumb a { color: var(--text); font-weight: 700; text-decoration: none; }

/* Video */
.video-frame { max-width: 860px; margin: 0 auto; position: relative; }
.video-frame .video-poster {
  appearance: none; -webkit-appearance: none; border: 0; background: none;
  display: block; width: 100%; padding-top: 56.25%; cursor: pointer; position: relative;
  border-radius: 12px; border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden;
}
.video-frame img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; object-fit: cover;
}
.video-frame .play-badge {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}
.video-frame .play-badge span {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
.video-frame .video-poster:hover .play-badge span { filter: brightness(1.08); }
.video-frame .play-badge svg { width: 26px; height: 26px; display: block; margin-left: 4px; }
.video-frame iframe {
  width: 100%; aspect-ratio: 16 / 9; display: block;
  border: 1px solid var(--border); border-radius: 12px;
}
.video-caption { margin-top: 16px; color: var(--muted); font-size: 0.95rem; text-align: center; max-width: 700px; margin-left: auto; margin-right: auto; }
.video-caption a { color: var(--accent-ink); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; max-width: 860px; margin: 0 auto; }
.contact-grid .contact-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  padding: 22px; text-align: center;
}
.contact-grid h3 { font-size: 1rem; font-weight: 650; margin-bottom: 6px; }
.contact-grid p { color: var(--muted); font-size: 0.9rem; margin-bottom: 10px; }
.contact-grid a { color: var(--accent-ink); font-size: 0.95rem; word-break: break-all; }

/* 5. Legal layout */
.legal { line-height: 1.7; }
.legal .wrap { max-width: 680px; }
.legal header { padding: 56px 0 40px; }
.legal h1 { font-size: 2.2rem; font-weight: 700; letter-spacing: -0.02em; }
.legal .updated { color: var(--muted); font-size: 0.85rem; margin-top: 8px; }
.legal .lede { font-size: 1.1rem; color: var(--muted); margin: 24px 0 24px; border-left: 3px solid var(--accent); padding-left: 16px; }
.legal section { margin-bottom: 48px; }
.legal h2 { font-size: 1.15rem; font-weight: 650; color: var(--accent-ink); margin-bottom: 12px; letter-spacing: -0.01em; }
.legal p { color: var(--muted); margin-bottom: 12px; }
.legal p:last-child { margin-bottom: 0; }
.legal ul { color: var(--muted); padding-left: 1.4em; margin-bottom: 12px; }
.legal ul li { margin-bottom: 6px; }
.legal a { color: var(--text); }
.legal a:hover { color: var(--accent-ink); }
.legal code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.9em; background: var(--panel-2); padding: 1px 5px; border-radius: 5px; }

/* 6. Motion */
@media (prefers-reduced-motion: no-preference) {
  html.reveal-init .reveal { opacity: 0; transform: translateY(14px); }
  html.reveal-init .reveal.in { opacity: 1; transform: none; transition: opacity 0.55s ease, transform 0.55s ease; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* 7. Mobile */
@media (max-width: 720px) {
  .site-nav .nav-links { display: none; }
  .site-nav .nav-inner { gap: 12px; }
  .marketing header.hero { padding: 52px 0 32px; }
  .marketing section { padding: 36px 0; }
  .marketing .shot { margin-bottom: 44px; }
  .legal h1 { font-size: 1.8rem; }
  .legal header { padding: 44px 0 28px; }
}
