/* OpenSafety — editorial product page, aligned with app light theme */

:root {
  --green: #4caf50;
  --green-dark: #388e3c;
  --green-soft: #c8e6c9;
  --green-muted: #e8f5e9;
  --bg: #f8f9fa;
  --surface: #ffffff;
  --text: #202124;
  --text-soft: #3c4043;
  --text-muted: #5f6368;
  --line: #dadce0;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --max: 1080px;
  --header: 64px;
  --page-pad: 20px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --tap-min: 44px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--green-dark);
}

a:hover {
  color: var(--green);
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
}

.wrap {
  width: min(var(--max), calc(100% - var(--page-pad) * 2));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 8px 16px;
  background: var(--text);
  color: #fff;
  z-index: 200;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--header);
  height: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px max(var(--page-pad), var(--safe-right)) 8px
    max(var(--page-pad), var(--safe-left));
  padding-top: max(8px, var(--safe-top));
  background: rgba(248, 249, 250, 0.94);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header.is-scrolled {
  border-color: var(--line);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  min-width: 0;
  min-height: var(--tap-min);
}

.logo img {
  border-radius: 8px;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-name {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.logo-tag {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.nav {
  display: none;
  justify-content: center;
  gap: 28px;
}

.nav a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
}

.nav a:hover {
  color: var(--text);
}

.header-cta {
  display: none;
  padding: 8px 18px;
  background: var(--green);
  color: #fff;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 8px;
}

.header-cta:hover {
  background: var(--green-dark);
  color: #fff;
}

.menu-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: var(--tap-min);
  height: var(--tap-min);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.menu-btn span {
  display: block;
  height: 2px;
  width: 18px;
  margin: 0 auto;
  background: var(--text);
  transition: transform 0.2s, opacity 0.2s;
}

.menu-btn[aria-expanded="true"] span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.menu-btn[aria-expanded="true"] span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  inset: var(--header) 0 0 0;
  z-index: 99;
  background: var(--bg);
  padding: 24px max(var(--page-pad), var(--safe-right)) max(24px, var(--safe-bottom))
    max(var(--page-pad), var(--safe-left));
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--line);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu a {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  padding: 14px 4px;
  min-height: var(--tap-min);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.mobile-menu-cta {
  border-bottom: none !important;
  margin-top: 12px;
  justify-content: center;
  background: var(--green);
  color: #fff !important;
  border-radius: 10px;
  font-weight: 600;
}

.mobile-menu-cta:hover {
  background: var(--green-dark);
}

@media (min-width: 768px) {
  .header {
    grid-template-columns: auto 1fr auto auto;
    gap: 24px;
    padding: 0 var(--page-pad);
    padding-top: max(0px, var(--safe-top));
    height: var(--header);
    min-height: var(--header);
  }

  .nav,
  .header-cta {
    display: flex;
  }

  .menu-btn {
    display: none;
  }

}

/* Hero */
.hero {
  padding: 48px 0 64px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.hero-inner {
  width: min(var(--max), calc(100% - var(--page-pad) * 2));
  margin-inline: auto;
  display: grid;
  gap: 32px;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    padding-top: 24px;
  }
}

.hero-title {
  font-family: var(--serif);
  margin: 0 0 16px;
  line-height: 1.1;
}

.hero-name {
  display: block;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.hero-tagline {
  display: block;
  margin-top: 6px;
  font-family: var(--sans);
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  font-weight: 500;
  color: var(--green-dark);
  letter-spacing: -0.01em;
}

.hero-sub {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--green-dark);
  margin: 0 0 20px;
  line-height: 1.5;
}

.hero-body {
  color: var(--text-soft);
  margin: 0 0 28px;
  max-width: 42ch;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap-min);
  padding: 12px 24px;
  background: var(--green);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: 10px;
  border: none;
  -webkit-tap-highlight-color: transparent;
}

@media (min-width: 480px) {
  .hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .hero-actions .btn {
    width: auto;
  }
}

.btn:hover {
  background: var(--green-dark);
  color: #fff;
}

.link-arrow {
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
  color: var(--text-soft);
  min-height: var(--tap-min);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
}

.link-arrow::after {
  content: " →";
}

.link-arrow:hover {
  color: var(--green-dark);
}

.hero-visual {
  position: relative;
}

.shield-watermark {
  position: absolute;
  right: -8%;
  top: 5%;
  width: min(200px, 50vw);
  height: min(220px, 55vw);
  opacity: 0.12;
  background: var(--green);
  clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 50% 82%, 18% 100%, 0% 38%);
  pointer-events: none;
}

.hero-figure {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(32, 33, 36, 0.08);
}

/* About */
.about {
  padding: 72px 0;
}

.section-intro {
  max-width: 52ch;
  margin-bottom: 40px;
}

.section-intro h2,
.capabilities-intro h2,
.reporting-copy h2,
.security h2,
.download-box h2 {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  line-height: 1.2;
}

.section-intro p {
  margin: 0;
  color: var(--text-soft);
  font-size: 1.0625rem;
}

.about-grid {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.about-card {
  background: var(--surface);
  padding: 28px 24px;
}

.about-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--text);
}

.about-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.about-foot {
  margin: 32px 0 0;
  padding: 20px 24px;
  background: var(--green-muted);
  border-radius: 10px;
  font-size: 0.9375rem;
  color: var(--text-soft);
  border: 1px solid var(--green-soft);
}

/* Capabilities */
.capabilities {
  padding: 72px 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.capabilities-layout {
  display: grid;
  gap: 40px;
}

@media (min-width: 800px) {
  .capabilities-layout {
    grid-template-columns: 280px 1fr;
    gap: 64px;
    align-items: start;
  }
}

.capabilities-intro p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.cap-list {
  margin: 0;
}

.cap-row {
  display: grid;
  gap: 8px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 600px) {
  .cap-row {
    grid-template-columns: 140px 1fr;
    gap: 24px;
    align-items: baseline;
  }
}

.cap-row:first-child {
  padding-top: 0;
}

.cap-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.cap-row dt {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text);
}

.cap-row dd {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Reporting */
.reporting {
  padding: 72px 0;
}

.reporting-layout {
  display: grid;
  gap: 40px;
}

@media (min-width: 768px) {
  .reporting-layout {
    grid-template-columns: 1fr 280px;
    gap: 56px;
  }
}

.reporting-copy p {
  color: var(--text-soft);
  margin: 0 0 20px;
}

.reporting-points {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.reporting-points li {
  margin-bottom: 8px;
}

.reporting-aside {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.report-block {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.report-block:last-of-type {
  border-bottom: none;
}

.report-label {
  display: block;
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--green-dark);
  line-height: 1;
}

.report-name {
  display: block;
  margin-top: 4px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.report-note {
  margin: 20px 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Security */
.security {
  padding: 56px 0;
  background: var(--green-muted);
  border-top: 1px solid var(--green-soft);
}

.security-prose p {
  margin: 0 0 16px;
  max-width: 65ch;
  font-size: 0.9375rem;
  color: var(--text-soft);
}

.security-prose p:last-child {
  margin-bottom: 0;
}

/* Download */
.download {
  padding: 80px 0 96px;
}

.download-box {
  text-align: center;
  padding: 48px 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.download-logo {
  margin: 0 auto 20px;
  border-radius: 12px;
}

.download-box p,
.download-platform {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.store-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap-min);
  padding: 12px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-soft);
  text-decoration: none;
  background: var(--bg);
  flex: 1 1 100%;
  max-width: 100%;
}

@media (min-width: 400px) {
  .store-link {
    flex: 1 1 auto;
    max-width: none;
  }
}

.store-link:hover {
  border-color: var(--green);
  color: var(--green-dark);
}

/* Footer */
.footer {
  padding: 24px max(var(--page-pad), var(--safe-right)) 40px
    max(var(--page-pad), var(--safe-left));
  padding-bottom: max(40px, calc(24px + var(--safe-bottom)));
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-inner a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-inner a:hover {
  color: var(--text);
}

/* Subtle reveal — no bounce */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ——— Mobile & small screens ——— */
@media (max-width: 767px) {
  :root {
    --page-pad: 16px;
    --header: 56px;
  }

  .hero {
    padding: 32px 0 48px;
  }

  .hero-sub {
    font-size: 1rem;
  }

  .hero-body {
    max-width: none;
    font-size: 0.9375rem;
  }

  .about,
  .capabilities,
  .reporting {
    padding: 48px 0;
  }

  .security {
    padding: 40px 0;
  }

  .download {
    padding: 48px 0 64px;
    padding-bottom: max(64px, calc(48px + var(--safe-bottom)));
  }

  .download-box {
    padding: 32px 20px;
    border-radius: 12px;
  }

  .section-intro {
    margin-bottom: 28px;
  }

  .about-card {
    padding: 22px 18px;
  }

  .about-foot {
    padding: 16px 18px;
    font-size: 0.875rem;
  }

  .cap-row {
    padding: 18px 0;
  }

  .cap-row dt {
    font-size: 1rem;
    margin-bottom: 4px;
  }

  .reporting-aside {
    padding: 20px 18px;
  }

  .footer {
    padding-bottom: max(32px, var(--safe-bottom));
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .nav a,
  .header-cta {
    min-height: var(--tap-min);
    align-items: center;
  }
}

@media (max-width: 380px) {
  .logo-tag {
    font-size: 0.625rem;
  }

  .logo-name {
    font-size: 0.875rem;
  }

  .hero-name {
    font-size: 2rem;
  }

  .hero-tagline {
    font-size: 1rem;
  }
}

body.menu-open {
  overflow: hidden;
  touch-action: none;
}
