/* ============================================================
   PageFlow — site theme
   Deep ink with a highlighter-yellow accent and a page that turns.
   Instrument Serif for display (NewsFlow's lighter sibling),
   Instrument Sans for text.
   ============================================================ */
:root {
  --font-display: 'Instrument Serif', Georgia, serif;
  --accent: #F2C14E;
  --accent-ink: #1F1F3A;
  --accent-soft: rgba(242, 193, 78, 0.2);
  --brand-ink: #1F1F3A;
  --brand-ink-2: #2A2A4C;
  --on-ink: #F4F1EA;
  --on-ink-muted: rgba(244, 241, 234, 0.68);
  --paper: #F7F4EC;
  --paper-2: #EFEAE0;
  --paper-3: #E2DCCF;
  --news: #FBF8F1;
}
body { background: var(--brand-ink); color: var(--on-ink); }
h1, h2, h3 { font-weight: 400; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.8rem, 1.8rem + 4.6vw, 5.4rem); line-height: 1.02; }
h2 { font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.4rem); }
h1 em, h2 em { font-style: italic; color: var(--accent); }
.section--paper { background: var(--paper); color: var(--ink); }
.section--paper .section__head p, .section--paper .lead { color: var(--ink-soft); }
.section--paper h2 em { color: #B8861B; }
.card h3 { font-family: var(--font-body); font-weight: 700; font-size: var(--step-1); }
.family { background: var(--paper-2); color: var(--ink); }
.sticker { background: var(--accent); color: var(--ink); }
.btn--outline-light { color: var(--on-ink); }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(56px, 8vw, 120px); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero__content .sticker { margin-bottom: 26px; }
.hero__content h1 { margin-bottom: 22px; }
.hero__content .lead { max-width: 50ch; margin-bottom: 30px; color: var(--on-ink-muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.hero__note { font-size: var(--step--1); color: var(--on-ink-muted); }
@media (max-width: 960px) { .hero__grid { grid-template-columns: minmax(0, 1fr); } }

/* The reader: a book whose right-hand page turns */
.reader {
  background: #12122A;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 14px 16px 16px;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8);
}
.reader__bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-family: var(--font-mono); font-size: 0.72rem; color: var(--on-ink-muted); }
.reader__tools { display: flex; gap: 8px; }
.reader__tools i { width: 18px; height: 18px; border-radius: 5px; background: rgba(255, 255, 255, 0.12); }
.reader__tools i:first-child { background: var(--accent); }
.book {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr;
  aspect-ratio: 3 / 2;
  perspective: 1800px;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.5));
}
.page {
  background: var(--news);
  color: var(--ink);
  padding: 6% 7%;
  display: grid; gap: 4%;
  align-content: start;
  overflow: hidden;
  container-type: inline-size;
}
.page--left { border-radius: 6px 0 0 6px; box-shadow: inset -14px 0 24px -16px rgba(0, 0, 0, 0.35); }
.page--right { border-radius: 0 6px 6px 0; box-shadow: inset 14px 0 24px -16px rgba(0, 0, 0, 0.35); }
.page__masthead { font-family: var(--font-display); font-size: clamp(0.9rem, 9cqi, 2rem); line-height: 1; text-align: center; padding-bottom: 4%; border-bottom: 2px solid var(--ink); }
.page__headline { font-family: var(--font-display); font-size: clamp(0.75rem, 7cqi, 1.5rem); line-height: 1.08; }
.page__headline--sm { font-size: clamp(0.7rem, 6cqi, 1.3rem); }
.page__photo { width: 100%; aspect-ratio: 16 / 9; border-radius: 2px; }
.page__photo--a { background: linear-gradient(170deg, #BED1D2 0%, #BED1D2 45%, #678B82 46%, #3D655D 100%); }
.page__photo--b { background: linear-gradient(180deg, #CBBF9E 0%, #CBBF9E 60%, #9D9B72 61%, #777B65 100%); }
.page__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 6% 8%; }
.page__cols--2 { grid-template-columns: 1fr 1fr; }
.page__cols i { display: block; height: clamp(2px, 1.4cqi, 4px); border-radius: 2px; background: #B3B1AB; }
.page__cols i:nth-child(3n) { width: 70%; }
.flip {
  position: absolute; left: 50%; top: 0;
  width: 50%; height: 100%;
  transform-origin: left center;
  transform-style: preserve-3d;
  animation: flip 9s cubic-bezier(0.6, 0.05, 0.3, 1) infinite;
  z-index: 2;
}
.flip__front, .flip__back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip__back { transform: rotateY(180deg); border-radius: 6px 0 0 6px; }
.flip::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.35), transparent 40%);
  opacity: 0;
  animation: flipShade 9s cubic-bezier(0.6, 0.05, 0.3, 1) infinite;
  pointer-events: none;
}
@keyframes flip { 0%, 30% { transform: rotateY(0deg); } 58%, 100% { transform: rotateY(-180deg); } }
@keyframes flipShade { 0%, 30% { opacity: 0; } 44% { opacity: 1; } 58%, 100% { opacity: 0; } }
.reader__thumbs { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.reader__thumbs span { width: 22px; height: 28px; border-radius: 3px; background: rgba(255, 255, 255, 0.12); }
.reader__thumbs span.is-active { background: var(--accent); }

/* ---------- App band ---------- */
.app__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.app__grid .sticker { margin-bottom: 22px; }
.app__grid h2 { margin-bottom: 16px; }
.app__grid .lead { margin-bottom: 28px; color: var(--on-ink-muted); }
.phone { justify-self: center; width: min(280px, 100%); aspect-ratio: 9 / 18.5; padding: 12px; border-radius: 40px; background: #0E0E22; border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9); }
.phone__screen { height: 100%; border-radius: 30px; background: var(--news); color: var(--ink); overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.phone__tabs { display: flex; gap: 6px; padding: 44px 14px 10px; border-bottom: 1px solid var(--line); }
.phone__tabs span { flex: 1; text-align: center; padding: 7px; border-radius: var(--pill); font-size: 0.78rem; font-weight: 700; background: var(--paper-2); }
.phone__tabs span.is-active { background: var(--ink); color: var(--white); }
.phone__page { padding: 16px; display: grid; gap: 12px; align-content: start; container-type: inline-size; }
@media (max-width: 860px) { .app__grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Contact ---------- */
.contact-cta h2 { margin-bottom: 18px; }
.contact-cta .lead { margin-bottom: 28px; }
.contact-cta__mail { margin-top: 14px; font-weight: 600; }
.contact-cta .form-fine { margin-top: 20px; }

/* ---------- Privacy and 404 pages ---------- */
.plain { background: var(--paper); color: var(--ink); }
.plain main { padding: clamp(40px, 6vw, 80px) 0; }
.plain h1 { font-size: clamp(2.2rem, 1.6rem + 3vw, 4rem); margin: 10px 0 8px; }
.plain h2 { font-size: var(--step-2); margin: 32px 0 8px; }
.plain p, .plain ul { margin: 8px 0 14px; }
.plain .meta { color: var(--muted); }
.plain .language { margin-top: 48px; padding-top: 34px; border-top: 3px solid var(--paper-3); }
.plain .back { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; }
