/* PubOpener website. White, near-black and mint; one typeface (Albert Sans).
   Square corners everywhere; surfaces are separated by tone, never lines. */

@font-face {
  font-family: "Albert Sans";
  src: url("/fonts/albert-sans-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --surface: #f3f3f3;
  --surface-2: #e8e8e8;
  --ink: #232323;
  --muted: #6e6e6e;
  --accent: #a1ffcb;
  --accent-ink: #232323;
  --dark: #232323;
  --dark-ink: #ffffff;
  --dark-surface: #303030;

  --step-small: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(3rem, 1.2rem + 6.4vw, 7.25rem);

  --margin: clamp(16px, 2.5vw, 32px);
  --gap: clamp(16px, 2vw, 32px);
  --section: clamp(96px, 12vw, 200px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Albert Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
h1, h2 { font-weight: 600; letter-spacing: -0.035em; line-height: 1; text-wrap: balance; }
h2 { font-size: var(--step-head); }
h3 { font-size: var(--step-lead); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 2px; }
a:hover { text-decoration-color: var(--muted); }
b { font-weight: 600; }
.lead { font-size: var(--step-lead); line-height: 1.35; letter-spacing: -0.01em; }
.small { font-size: var(--step-small); }
.nowrap { white-space: nowrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 28px;
  background: var(--ink);
  color: var(--bg);
  font: 600 var(--step-body)/1 var(--font);
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out);
}
.button:hover { background: var(--accent); color: var(--accent-ink); }
.button:active { transform: scale(0.97); }
.button-small { min-height: 44px; padding: 0 18px; font-size: var(--step-small); }
.text-link { font-weight: 500; }

/* ---------- Bar ---------- */

.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 12px var(--margin);
  background: var(--bg);
}
.wordmark { font-weight: 700; font-size: var(--step-body); letter-spacing: -0.03em; text-decoration: none; margin-right: auto; }
.bar-links { display: flex; gap: 28px; font-size: var(--step-small); font-weight: 500; }
.bar-links a { text-decoration: none; }
.bar-links a:hover { text-decoration: underline; }

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  column-gap: var(--gap);
  padding: clamp(32px, 5vw, 80px) var(--margin) 0;
}
.hero-text { display: contents; }
.hero h1 { grid-column: 1 / -1; font-size: min(var(--step-display), 9.4vw); line-height: 0.98; letter-spacing: -0.045em; margin-bottom: clamp(32px, 4vw, 64px); }
.hero-lead, .hero-button { grid-column: 1; }
.hero-lead { grid-row: 2; align-self: start; }
.hero-button { grid-row: 2; align-self: start; margin-top: calc(var(--step-lead) * 1.35 * 4 + 40px); }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero h1 .line > span { display: block; }
.hero-lead { max-width: 24ch; }
.hero-button { min-width: 220px; min-height: 64px; font-size: var(--step-lead); width: fit-content; }
.hero-stage {
  grid-column: 2;
  grid-row: 2;
  height: min(64svh, 640px);
  background: var(--surface);
  padding: clamp(24px, 4vw, 64px) 0 clamp(24px, 4vw, 64px) clamp(24px, 4vw, 64px);
  overflow: hidden;
  display: flex;
  align-items: flex-start;
}
.hero-shot { width: 118%; max-width: none; will-change: transform; }

/* ---------- Sections below the hero: simple and calm ---------- */

.section { padding: clamp(72px, 9vw, 128px) var(--margin); }
.section-tint { background: var(--surface); }
.section h2 { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); }
.section-head { display: flex; flex-direction: column; gap: 16px; max-width: 640px; margin-bottom: 48px; }
.section-head p { font-size: var(--step-lead); line-height: 1.4; }
.muted { color: var(--muted); }
.note { margin-top: 32px; color: var(--muted); max-width: 64ch; }
.note b { color: var(--ink); }

/* Templates */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.gallery figure { display: flex; flex-direction: column; gap: 12px; }
.thumb { aspect-ratio: 4 / 5; background: var(--surface); display: grid; place-items: center; padding: 8%; overflow: hidden; }
.thumb img { max-height: 100%; width: auto; object-fit: contain; transition: transform 300ms var(--ease-out); }
.gallery figure:hover .thumb img { transform: translateY(-6px); }
.gallery figcaption { font-weight: 600; }

/* Download */
.columns-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.columns-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.os { background: var(--bg); padding: 32px; display: flex; flex-direction: column; gap: 8px; }
.os h3 { font-size: 1.75rem; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.os .button { margin-top: 16px; width: 100%; }
.os .text-link { font-size: var(--step-small); text-align: center; margin-top: 4px; }
.os-yours { display: none; letter-spacing: 0; line-height: 1.5; background: var(--accent); color: var(--accent-ink); font-size: var(--step-small); font-weight: 600; padding: 2px 10px; }
.os.is-yours .os-yours { display: inline-block; }
.os:not(.is-yours) .button { background: var(--surface); color: var(--ink); }
.os:not(.is-yours) .button:hover { background: var(--accent); }
.steps { margin-top: 16px; padding-left: 1.2em; color: var(--muted); font-size: var(--step-small); display: flex; flex-direction: column; gap: 6px; }

/* Features */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.split-narrow { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); align-items: start; }
.features { list-style: none; padding: 0; margin-top: 40px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 32px; }
.features h3 { font-size: var(--step-body); margin-bottom: 4px; }
.features p { line-height: 1.5; }
.shot { background: var(--surface); padding: clamp(16px, 3vw, 32px); }

/* Tested */
.checks { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.checks li { padding-left: 32px; position: relative; }
.checks li::before { content: ""; position: absolute; left: 0; top: 0.3em; width: 18px; height: 18px; background: var(--accent); }
.checks-not li::before { background: var(--surface-2); }
.section-tint .checks-not li::before { background: #d6d6d6; }

/* Price */
.plan { background: var(--surface); padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; gap: 16px; }
.plan-free { background: var(--accent); }
.plan h3 { font-size: 1.5rem; display: flex; align-items: center; gap: 12px; }
.soon { font-size: var(--step-small); font-weight: 600; background: var(--bg); padding: 2px 10px; letter-spacing: 0; }
.plan-price { font-size: clamp(3rem, 2rem + 3vw, 4.5rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.plan-price span { font-size: var(--step-body); font-weight: 500; letter-spacing: 0; color: var(--muted); }
.plan ul { padding-left: 1.2em; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.plan .plan-terms { list-style: none; padding: 0; flex: none; gap: 4px; }
.plan-terms li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 14px; background: var(--bg); font-weight: 600; }
.plan-terms em { font-style: normal; font-weight: 600; background: var(--accent); padding: 0 8px; margin-left: 8px; }
.plan .button { align-self: flex-start; }
.button-light { background: var(--bg); color: var(--ink); }
.plan .button { margin-top: auto; }
.deal { margin-top: 24px; background: var(--dark); color: var(--dark-ink); padding: clamp(28px, 4vw, 48px); display: flex; justify-content: space-between; align-items: center; gap: 24px 48px; flex-wrap: wrap; }
.deal h3 { font-size: 1.5rem; margin-bottom: 8px; }
.deal p { color: #cfcfcf; max-width: 52ch; }
.deal .button { background: var(--accent); color: var(--accent-ink); }
.deal .button:hover { background: var(--bg); }

/* Questions */
.faq { display: flex; flex-direction: column; }
.faq details { background: var(--bg); margin-bottom: 8px; }
.faq summary { list-style: none; cursor: pointer; padding: 20px 56px 20px 24px; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 24px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; font-weight: 400; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq summary:hover { color: var(--muted); }
.faq details p { padding: 0 24px 24px; max-width: 60ch; }
.faq a { color: var(--ink); }

/* Notify me */
.join { background: var(--dark); color: var(--dark-ink); padding: clamp(56px, 7vw, 96px) var(--margin); }
.join-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 48px; align-items: center; }
.join h2 { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem); grid-row: span 2; }
.join-row { display: flex; gap: 8px; }
.join-row input { flex: 1; min-width: 0; height: 56px; padding: 0 18px; font: 500 var(--step-body)/1 var(--font); color: var(--ink); background: var(--bg); border: 0; border-radius: 0; }
.join-row input::placeholder { color: #8a8a8a; }
.join .button { background: var(--accent); color: var(--accent-ink); }
.join .button:hover { background: var(--bg); }
.form-message { color: #cfcfcf; font-size: var(--step-small); }

/* Footer */
.footer { padding: 40px var(--margin); display: flex; flex-direction: column; gap: 16px; }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer .wordmark { margin-right: 0; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; font-size: var(--step-small); }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

/* ---------- Privacy page ---------- */

.page-plain { padding: clamp(40px, 8vw, 120px) var(--margin) 120px; max-width: 820px; }
.page-plain h1 { font-size: var(--step-head); margin: 48px 0 12px; }
.page-plain h2 { font-size: var(--step-lead); letter-spacing: -0.02em; margin: 48px 0 12px; }
.page-plain p { margin-bottom: 12px; max-width: 64ch; }
.page-plain .button { margin-top: 40px; }

/* ---------- Motion ---------- */

.js .hero h1 .line > span { transform: translateY(105%); animation: line-up 900ms var(--ease-out) forwards; }
.js .hero h1 .line:nth-child(2) > span { animation-delay: 110ms; }
.js .hero-lead, .js .hero-button { opacity: 0; animation: fade-up 700ms var(--ease-out) 450ms forwards; }
.js .hero-stage { opacity: 0; animation: fade-up 900ms var(--ease-out) 250ms forwards; }
@keyframes line-up { to { transform: translateY(0); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

.js [data-rise] { opacity: 0; transform: translateY(20px); transition: opacity 600ms var(--ease-out) var(--delay, 0ms), transform 600ms var(--ease-out) var(--delay, 0ms); }
.js [data-rise].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .hero h1 .line > span, .js .hero-lead, .js .hero-button, .js .hero-stage { animation: none; transform: none; opacity: 1; }
  .js [data-rise] { opacity: 1; transform: none; transition: none; }
  .thumb img, .button { transition: none; }
}

/* ---------- Tablet ---------- */

@media (max-width: 1024px) {
  .columns-3 { grid-template-columns: minmax(0, 1fr); }
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plans .plan-free { grid-column: 1 / -1; }
  .os { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 32px; align-items: start; }
  .os > :not(.steps) { grid-column: 1; }
  .os .steps { grid-column: 2; grid-row: 1 / span 6; margin-top: 0; }
  .split { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Phone ---------- */

@media (max-width: 760px) {
  .bar { gap: 16px; }
  .bar-links { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 32px; }
  .hero h1 { margin-bottom: 24px; }
  .hero-lead, .hero-button, .hero-stage { grid-column: 1; grid-row: auto; }
  .hero-button { width: 100%; margin-top: 24px; }
  .hero-stage { margin-top: 40px; height: 300px; padding: 24px 0 24px 24px; }
  .hero-shot { width: 640px; }

  .section-head { margin-bottom: 32px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .columns-3 { gap: 40px; }
  .os { display: flex; padding: 24px; }
  .steps { font-size: var(--step-body); }
  .os .steps { margin-top: 16px; }
  .features { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .columns-2, .plans { grid-template-columns: minmax(0, 1fr); }
  .deal .button { width: 100%; }
  .split-narrow { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .plan .button { align-self: stretch; }
  .join-form { grid-template-columns: minmax(0, 1fr); }
  .join h2 { grid-row: auto; }
  .join-row { flex-direction: column; }
  .join-row input { flex: none; }
  .footer-row { flex-direction: column; align-items: flex-start; }
}
