/* Fotosyn — light editorial pages (home, privacy) */

:root {
  --bg: #ffffff;
  --ink: #1a1713;
  --muted: #5c5650;
  --line: rgba(26, 23, 19, 0.12);
  --display: "Public Sans", system-ui, sans-serif;
  --sans: "Public Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", monospace;
  --page-max: 72rem;
  --section-pad: clamp(3rem, 10vw, 6rem);
}

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

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

html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  border-top: 3px solid var(--line);
  overflow-x: clip;
  min-width: 0;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* Top bar (used on privacy and other light-theme pages) */
[data-site-header] {
  position: sticky;
  top: 0;
  z-index: 20;
  display: block;
}

.topbar {
  position: static;
  background: color-mix(in srgb, var(--bg) 45%, transparent);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  transition: background 0.25s ease, border-color 0.25s ease, backdrop-filter 0.25s ease;
  font-size: 0.9rem;
}

.topbar__inner {
  width: min(var(--page-max), 100%);
  margin: 0 auto;
  padding: 14px 1.25rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar.topbar--scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom-color: var(--line);
  backdrop-filter: blur(14px) saturate(1.12);
  -webkit-backdrop-filter: blur(14px) saturate(1.12);
}

.topbar__brand {
  text-decoration: none;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.site-footer__brand {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar__cta {
  margin-left: auto;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.82rem;
  min-height: 44px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.topbar__cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.topbar__cta--soon {
  opacity: 0.55;
  pointer-events: none;
}

.home {
  width: min(var(--page-max), 100%);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Sections — full container width */
.home-hero,
.apps,
.about,
.home-support,
.policy,
.site-footer {
  width: 100%;
  max-width: none;
}

.home-hero {
  padding: clamp(4rem, 14vw, 8rem) 0 var(--section-pad);
}

.home-hero__back {
  display: inline-block;
  margin-bottom: 2rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}

.home-hero__back:hover {
  color: var(--ink);
}

.home-hero__meta {
  margin: 0 0 1.5rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.home-hero__title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.5rem, 10vw, 4.25rem);
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0;
  color: var(--ink);
}

.home-hero__tagline {
  margin: 1rem 0 0;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.home-hero__lede {
  margin: 1.5rem 0 0;
  font-size: 1.125rem;
  color: var(--muted);
  max-width: none;
}

/* Apps */
.apps {
  border-top: 3px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.app-chapter {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: clamp(1.5rem, 5vw, 2.5rem);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease;
}

/* Remove right border from even columns, bottom border from last row */
.app-chapter:nth-child(2n) {
  border-right: none;
  padding-right: 0;
}

.app-chapter:nth-child(odd) {
  padding-left: 0;
}

.app-chapter:nth-last-child(-n+2) {
  border-bottom: none;
}

.app-chapter:hover {
  opacity: 0.85;
}

.app-chapter__icon {
  width: 72px;
  height: 72px;
  border-radius: 22%;
  object-fit: cover;
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

@media (max-width: 540px) {
  .apps {
    grid-template-columns: 1fr;
  }

  .app-chapter {
    padding-left: 0;
    padding-right: 0;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .app-chapter:last-child {
    border-bottom: none;
  }

  .app-chapter__icon {
    width: 64px;
    height: 64px;
  }
}

@media (min-width: 1024px) {
  .app-chapter__icon {
    width: 80px;
    height: 80px;
  }
}

.app-chapter__icon--placeholder {
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.5rem;
  background: #f0f0f0;
  color: var(--ink);
}

.app-chapter__lockup {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 0.5rem;
}

.app-chapter__name {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.5rem, 4vw, 2rem);
  letter-spacing: -0.03em;
  margin: 0;
  color: var(--ink);
}

.app-chapter__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.55rem;
  padding: 0.12rem 0.45rem;
  border: 1px solid #000000;
  background: #ffffff;
  color: #000000;
  border-radius: 0.35rem;
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  vertical-align: middle;
}

.app-chapter__desc {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.app-chapter__link {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: auto;
  padding-top: 1rem;
  color: var(--muted);
}

/* About / support */
.about {
  padding: var(--section-pad) 0;
  border-top: 1px solid var(--line);
}

.home-support {
  padding: 0 0 var(--section-pad);
  border-top: none;
}

.section-label {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--ink);
  margin: 2.5rem 0 1.25rem;
}

.home-support .section-label {
  margin: 1.25rem 0 1rem;
}

.about p {
  margin: 0;
  font-size: 1.125rem;
  color: var(--muted);
}

.home-support p {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  line-height: inherit;
  color: var(--ink);
}

.home-support a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Privacy / legal content */
.policy {
  padding: var(--section-pad) 0;
  border-top: 1px solid var(--line);
}

.policy h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  margin: 2.5rem 0 1.25rem;
  color: var(--ink);
}

.policy h2:first-child {
  margin-top: 0;
}

.policy p {
  margin: 0 0 0.75rem;
  color: var(--ink);
  line-height: 1.7;
}

.policy ul {
  margin: 0.5rem 0 1rem;
  padding-left: 1.35rem;
  color: var(--ink);
}

.policy li {
  margin-bottom: 0.35rem;
  line-height: 1.65;
}

.policy a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.policy__closing {
  margin-top: 2rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Footer */
.site-footer {
  border-top: 3px solid var(--line);
  padding: 2rem 0 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.site-footer__copy-row {
  display: block;
}

.site-footer nav {
  width: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 1rem;
  font-family: var(--sans);
  font-size: 1rem;
  letter-spacing: 0.04em;
}

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

.site-footer a:hover {
  color: var(--ink);
}

.site-footer__copy {
  margin: 0;
  font-size: 1rem;
  line-height: inherit;
  color: var(--ink);
}

.site-footer__toplink {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

.site-footer__toplink:hover {
  color: var(--ink);
}

.site-footer__toplink--nav {
  margin-left: 0;
}

.site-footer__meta {
  margin: 0;
  font-size: 1rem;
  line-height: inherit;
  color: var(--ink);
}

.site-footer__meta a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer__pointer {
  margin-left: 0.5rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}

@media (max-width: 680px) {
  .site-footer nav {
    gap: 0.75rem;
  }
}
