/* Pocket Diary landing page (site/index.html). Hand-written.
   Built from the approved Claude Design canvas "Pocket Diary Landing":
   desktop = artboard "Копия B", phone (max-width 600px) = "Мобильная версия".
   The legal and support pages keep their own site.css. */

@font-face {
  font-family: "Inter Tight";
  src: url("fonts/InterTight.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/InstrumentSerif-Italic.ttf") format("truetype");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}
/* Instrument Serif has no Cyrillic. For the Russian version the italic
   accent words fall back to Playfair Display italic — the app's own font. */
@font-face {
  font-family: "Playfair Cyrillic";
  src: url("fonts/PlayfairDisplay-Italic.ttf") format("truetype");
  font-style: italic;
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  --ink: #1E1C24;        /* never pure black */
  --body: #4A5060;
  --muted: #5B6170;
  --ground: #F6F6FA;
  --glass: rgba(255, 255, 255, 0.55);
  --glass-edge: rgba(255, 255, 255, 0.85);
  --glass-shadow: 0 12px 40px rgba(80, 90, 140, 0.10);
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --display: "Inter Tight", "Inter", system-ui, sans-serif;
  --serif: "Instrument Serif", "Playfair Cyrillic", Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --section-gap: 160px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--ground); }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--ground);
  overflow-x: hidden;
}
a { color: var(--ink); }
a:hover { color: var(--muted); }
img { max-width: 100%; }

.serif { font-family: var(--serif); font-style: italic; font-weight: 400; }

/* Soft gradient light behind the page */
.glow { position: absolute; border-radius: 50%; pointer-events: none; }
.glow.g1 { top: -220px; left: 50%; width: 1100px; height: 760px; margin-left: -550px; filter: blur(40px);
  background: radial-gradient(closest-side, rgba(156, 200, 255, 0.75), rgba(201, 184, 255, 0.45) 55%, rgba(246, 246, 250, 0)); }
.glow.g2 { top: 520px; left: 50%; width: 760px; height: 520px; margin-left: -380px; filter: blur(50px);
  background: radial-gradient(closest-side, rgba(255, 198, 218, 0.7), rgba(255, 217, 176, 0.45) 50%, rgba(246, 246, 250, 0)); }
.glow.g3 { top: 1240px; left: -200px; width: 820px; height: 820px; filter: blur(50px);
  background: radial-gradient(closest-side, rgba(156, 200, 255, 0.6), rgba(246, 246, 250, 0)); }
.glow.g4 { top: 1360px; right: -160px; width: 760px; height: 760px; filter: blur(50px);
  background: radial-gradient(closest-side, rgba(201, 184, 255, 0.55), rgba(255, 198, 218, 0.35) 60%, rgba(246, 246, 250, 0)); }

/* overflow: clip, not hidden: `hidden` makes .page a scroll container of its
   own, and the scroll-driven reveal below would then follow .page (which never
   scrolls) instead of the window, so it would never play. */
.page { position: relative; overflow: clip; padding: 0 16px; }

/* EN / RU switch, top right: a frosted-glass capsule */
.lang-switch {
  position: absolute; top: 32px; right: 40px; z-index: 2;
  display: flex; gap: 2px; padding: 4px; border-radius: 999px;
  background: var(--glass); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border: 1px solid var(--glass-edge); box-shadow: 0 8px 24px rgba(80, 90, 140, 0.10);
}
.lang-switch button {
  min-width: 48px; height: 36px; padding: 0 12px; border: 0; border-radius: 999px; cursor: pointer;
  font: 600 13px/1 var(--display); letter-spacing: 0.4px;
  background: transparent; color: var(--ink);
  transition: background 0.25s ease, color 0.25s ease;
}
.lang-switch button:hover { background: rgba(30, 28, 36, 0.06); }
.lang-switch button[aria-pressed="true"] { background: #CFE8FF; color: var(--ink); }
.lang-switch button:focus-visible { outline: 2px solid #70BEFF; outline-offset: 2px; }
.column {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding-top: 140px;
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
}

/* Hero */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 48px; }
.hero-text { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.tagline { margin: 0; font-family: var(--serif); font-style: italic; font-size: 26px; line-height: 1.2; color: var(--muted); white-space: pre; }
.tagline .ch { animation: pd-type 0.01s linear both, pd-caret 60ms linear forwards; }
.title { margin: 0; font-family: var(--display); font-size: 112px; line-height: 0.95; font-weight: 600; letter-spacing: -4px; }
.title .w { display: inline-block; animation: pd-fly 0.9s var(--ease) both; }
.title .w1 { animation-delay: 1s; }
.title .w2 { animation-delay: 1.35s; letter-spacing: -2px; }
.lead { margin: 0; max-width: 520px; font-size: 18px; line-height: 1.65; color: var(--body); animation: pd-rise 0.9s var(--ease) 1.85s both; }

/* Store buttons */
.stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.store {
  display: flex; align-items: center; gap: 10px;
  width: 188px; height: 56px; padding: 0 20px;
  border-radius: 999px; background: var(--ink); color: #FFFFFF;
  text-decoration: none; text-align: left;
}
.store:hover { color: #FFFFFF; background: #34313D; }
.store svg { flex: 0 0 auto; }
.store span { display: flex; flex-direction: column; }
.store small { font-size: 11px; line-height: 1.2; opacity: 0.8; }
.store small.caps { text-transform: uppercase; }
.store b { font-family: var(--display); font-size: 18px; line-height: 1.2; font-weight: 600; }

/* Cloud */
.cloud { position: relative; display: flex; justify-content: center; margin-top: -96px; margin-bottom: -40px; }
.cloud::before {
  content: ""; position: absolute; bottom: -8px; left: 50%; width: 300px; height: 48px; margin-left: -150px;
  border-radius: 50%; filter: blur(12px);
  background: radial-gradient(closest-side, rgba(255, 190, 150, 0.7), rgba(201, 184, 255, 0.35) 60%, rgba(246, 246, 250, 0));
}
.cloud img { position: relative; display: block; width: 420px; height: auto; margin: -92px 0; }

/* Why section */
.why { display: flex; flex-direction: column; gap: 80px; }
.why h2 { margin: 0; text-align: center; font-family: var(--display); font-size: 64px; line-height: 1.02; font-weight: 600; letter-spacing: -2px; }
.why h2 .w { display: inline-block; }
.why h2 .serif { letter-spacing: -1px; }
.why-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 80px; }

/* iPhone, drawn in CSS */
.iphone { position: relative; flex: 0 0 auto; width: 318px; height: 666px; }
.iphone .floor { position: absolute; left: 50%; bottom: -34px; width: 260px; height: 36px; margin-left: -130px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(60, 64, 100, 0.28), rgba(60, 64, 100, 0)); filter: blur(6px); }
.iphone .btn { position: absolute; width: 5px; background: linear-gradient(90deg, #6E727B 0%, #D7DAE0 45%, #A4A8B0 100%); }
.iphone .btn.l { left: -3px; border-radius: 3px 1px 1px 3px; box-shadow: -1px 0 1px rgba(30, 32, 40, 0.25); }
.iphone .btn.r { right: -3px; border-radius: 1px 3px 3px 1px; box-shadow: 1px 0 1px rgba(30, 32, 40, 0.25);
  background: linear-gradient(270deg, #6E727B 0%, #D7DAE0 45%, #A4A8B0 100%); }
.iphone .action { top: 132px; height: 30px; }
.iphone .vol-up { top: 186px; height: 58px; }
.iphone .vol-down { top: 256px; height: 58px; }
.iphone .side { top: 206px; height: 92px; }
.iphone .camera { position: absolute; right: -2px; top: 392px; width: 4px; height: 50px; border-radius: 1px 2px 2px 1px;
  background: linear-gradient(270deg, #3A3D45 0%, #8C9099 50%, #5B5F68 100%); }
.iphone .rim { position: absolute; inset: 0; padding: 1px; border-radius: 60px; background: #4A4D55;
  box-shadow: 0 50px 100px rgba(60, 70, 120, 0.22), 0 20px 40px rgba(60, 70, 120, 0.14), 0 4px 10px rgba(60, 70, 120, 0.10); }
.iphone .band { height: 100%; padding: 4px; border-radius: 59px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 8%, rgba(255, 255, 255, 0) 92%, rgba(40, 42, 50, 0.25) 100%),
    linear-gradient(90deg, #6B6F78 0%, #E9EBEE 1.6%, #B9BDC4 3.2%, #F3F4F6 50%, #B9BDC4 96.8%, #E9EBEE 98.4%, #6B6F78 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -1px 0 rgba(30, 32, 40, 0.3); }
.iphone .gasket { height: 100%; padding: 1px; border-radius: 55px; background: linear-gradient(180deg, #2B2D33, #17181C); }
.iphone .bezel { height: 100%; padding: 7px; border-radius: 54px; background: #0B0B0E; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05); }
.iphone .screen { position: relative; height: 100%; border-radius: 47px; overflow: hidden; background: #F7F7FB; }
.iphone .screen img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.iphone .island { position: absolute; top: 10px; left: 50%; width: 94px; height: 28px; margin-left: -47px; border-radius: 20px;
  background: #0A0A0D; box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.06); }
.iphone .island::after { content: ""; position: absolute; top: 8px; right: 10px; width: 12px; height: 12px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #3B4A6B 0%, #161B28 45%, #0A0A0D 75%); box-shadow: inset 0 0 0 1px rgba(80, 90, 120, 0.25); }
.iphone .glare { position: absolute; inset: 0; pointer-events: none; border-radius: 47px;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.08) 22%, rgba(255, 255, 255, 0) 38%),
              linear-gradient(300deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0) 18%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), inset 0 0 18px rgba(20, 22, 30, 0.08); }

/* Benefits: frosted glass cards */
.benefits { flex: 1 1 440px; max-width: 560px; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 20px; }
.benefit {
  display: flex; align-items: center; gap: 24px; padding: 24px 28px; border-radius: 28px;
  background: var(--glass); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  border: 1px solid var(--glass-edge); box-shadow: var(--glass-shadow);
}
.sticker { flex: 0 0 auto; padding: 16px; margin: -16px; }
.sticker img { display: block; width: 64px; height: 64px; object-fit: contain; transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }
.benefit-text { display: flex; flex-direction: column; gap: 6px; }
.benefit h3 { margin: 0; font-family: var(--display); font-size: 22px; line-height: 1.25; font-weight: 600; letter-spacing: -0.4px; }
.benefit h3 .serif { font-size: 24px; }
.benefit p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--body); }

/* Footer: frosted glass panel */
.footer {
  margin-bottom: 40px; display: flex; flex-direction: column; align-items: center; gap: 40px; text-align: center;
  padding: 72px 24px 40px; border-radius: 40px;
  background: rgba(255, 255, 255, 0.5); -webkit-backdrop-filter: blur(28px); backdrop-filter: blur(28px);
  border: 1px solid var(--glass-edge); box-shadow: 0 16px 48px rgba(80, 90, 140, 0.10);
}
.footer-title { margin: 0; font-family: var(--display); font-size: 44px; line-height: 1.05; font-weight: 600; letter-spacing: -1.5px; }
.footer-title .serif { letter-spacing: -0.5px; }
.footer hr { width: 100%; height: 1px; margin: 0; border: 0; background: rgba(30, 28, 36, 0.08); }
.footer-row { width: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.brand { font-family: var(--display); font-size: 18px; font-weight: 600; letter-spacing: -0.3px; }
.brand .serif { font-size: 20px; }
.legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 32px; font-size: 14px; font-weight: 500; }
.legal a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.copy { font-size: 13px; color: var(--muted); }

/* Animations */
@keyframes pd-fly { from { opacity: 0; transform: translateX(140px); filter: blur(10px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes pd-rise { from { opacity: 0; transform: translateY(24px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes pd-type { from { opacity: 0; } to { opacity: 1; } }
@keyframes pd-caret { 0%, 99.9% { box-shadow: 2px 0 0 var(--muted); } 100% { box-shadow: none; } }
@keyframes pd-fly-soft { from { opacity: 0; transform: translateX(80px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes pd-up-soft { from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: none; } }

/* Scroll-linked reveal (Chrome, Edge, Safari 26+). Elsewhere the blocks just stand in place. */
@supports (animation-timeline: view()) {
  .why h2 .w1 { animation: pd-fly-soft cubic-bezier(0.25, 0.8, 0.3, 1) both; animation-timeline: view(); animation-range: entry 0% cover 40%; }
  .why h2 .w2 { animation: pd-fly-soft cubic-bezier(0.25, 0.8, 0.3, 1) both; animation-timeline: view(); animation-range: entry 30% cover 50%; }
  .benefit { animation: pd-up-soft cubic-bezier(0.25, 0.8, 0.3, 1) both; animation-timeline: view(); animation-range: entry 0% cover 35%; }
}

/* Phone layout — from the "Мобильная версия" artboard */
@media (max-width: 600px) {
  :root { --section-gap: 96px; }
  /* Phone: smaller and lighter */
  .lang-switch { top: 16px; right: 16px; padding: 3px; }
  .lang-switch button { min-width: 34px; height: 28px; padding: 0 10px; font-size: 11px; font-weight: 500; }
  .column { padding-top: 72px; }
  .glow.g2 { top: 360px; }
  .glow.g3 { top: 1400px; }
  .glow.g4 { top: 2000px; }
  .tagline { font-size: 22px; }
  .title { font-size: 56px; line-height: 1; letter-spacing: -2px; }
  .title .w2 { letter-spacing: -1px; }
  .lead { font-size: 16px; }
  .stores { gap: 10px; }
  .store { width: 148px; height: 52px; padding: 0 12px; gap: 8px; }
  .store b { font-size: 16px; }
  .cloud { margin-top: -48px; margin-bottom: -24px; }
  .cloud::before { width: 220px; height: 40px; margin-left: -110px; }
  .cloud img { width: 300px; margin: -66px 0; }
  .why { gap: 48px; }
  .why h2 { font-size: 38px; line-height: 1.08; letter-spacing: -1.2px; }
  .why-row { gap: 56px; }
  .iphone { zoom: 0.85; }
  .benefit { gap: 16px; padding: 20px; border-radius: 24px; }
  .sticker { padding: 10px; margin: -10px; }
  .sticker img { width: 52px; height: 52px; }
  .benefit h3 { font-size: 19px; letter-spacing: -0.3px; }
  .benefit h3 .serif { font-size: 21px; }
  .benefit p { line-height: 1.4; }
  .footer { padding: 48px 16px 32px; border-radius: 32px; }
  .footer-title { font-size: 30px; line-height: 1.1; letter-spacing: -1px; }
  .footer-row { gap: 12px; }
  .legal { order: -1; flex: 1 1 100%; gap: 4px 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
