/* Paradise Notes landing — the app's "Paper" language: warm paper, ink blue, flat faces on darker lips. */
@font-face { font-family: "Baloo"; src: url(fonts/baloo.woff2) format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url(fonts/vazirmatn.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --paper: #F7F1E6; --paper-deep: #EDE4D3; --surface: #FFFFFF; --surface-lip: #E3D8C4;
  --hairline: #D8C9B0; --rule: rgba(43, 76, 126, .07); --margin: rgba(200, 88, 75, .22);
  --ink: #26303D; --ink-soft: #6B7380; --title: #2B4C7E; --accent: #2F5D9E; --accent-lip: #1F4479;
  --indigo: #3F5BA9; --indigo-lip: #2C4283; --mustard: #D9A23B; --mustard-lip: #A97A24;
  --plum: #8A4F8E; --plum-lip: #66386A; --slate: #5E6C80; --slate-lip: #434E5F;
  --red: #C8584B; --red-lip: #9E3F34; --green: #3E9E5A; --green-lip: #2B7A42; --amber: #E0A33A; --amber-lip: #B57F23;
  --pen: #264C86;
  --shadow: 0 24px 60px -24px rgba(38, 48, 61, .35);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1A1A1F; --paper-deep: #24242B; --surface: #25262D; --surface-lip: #101014;
    --hairline: #363847; --rule: rgba(143, 180, 242, .06); --margin: rgba(224, 106, 92, .18);
    --ink: #E8E6E0; --ink-soft: #9A9DA8; --title: #9DBCF0; --accent: #7FA7E8; --accent-lip: #4D74B8; --pen: #8FB4F2;
    --shadow: 0 24px 60px -24px rgba(0, 0, 0, .7);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.85 "Vazirmatn", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
/* Ruled notebook paper with a red margin line, fixed behind everything. */
.paper {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to left, transparent calc(100% - 72px), var(--margin) calc(100% - 72px), var(--margin) calc(100% - 70px), transparent calc(100% - 70px)),
    repeating-linear-gradient(to bottom, transparent 0 39px, var(--rule) 39px 40px);
}
@media (max-width: 720px) { .paper { background: repeating-linear-gradient(to bottom, transparent 0 39px, var(--rule) 39px 40px); } }

a { color: var(--accent); }
h1, h2, h3, .brand, .lip, .eyebrow, .cover b, summary { font-family: "Baloo", "Vazirmatn", sans-serif; }
h1, h2 { color: var(--title); line-height: 1.25; margin: 0 0 18px; font-weight: 800; }
h1 { font-size: clamp(40px, 6.4vw, 76px); letter-spacing: -.5px; }
h2 { font-size: clamp(30px, 4vw, 46px); }
h3 { font-size: 21px; margin: 10px 0 6px; font-weight: 800; color: var(--ink); }
code { font: 600 .9em ui-monospace, monospace; background: var(--paper-deep); padding: 1px 6px; border-radius: 6px; direction: ltr; unicode-bidi: isolate; }
main > section { max-width: 1180px; margin: 0 auto; padding: 72px 24px; }

/* Header */
.bar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 20px;
  padding: 12px max(24px, calc((100vw - 1180px) / 2 + 24px));
  background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(12px);
  border-bottom: 3px solid var(--hairline);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--title); font-weight: 800; font-size: 20px; white-space: nowrap; }
@media (max-width: 420px) { .brand { font-size: 17px; } .brand img { width: 30px; height: 30px; } .bar { gap: 10px; } }
.links { display: flex; gap: 22px; margin-inline-start: auto; }
.links a { color: var(--ink-soft); text-decoration: none; font-weight: 600; }
.links a:hover { color: var(--accent); }
@media (max-width: 760px) { .links { display: none; } .bar .lip-sm { margin-inline-start: auto; } }

/* The lip button: a flat face resting on a darker lip; it sinks when pressed. */
.lip {
  --face: var(--accent); --lip: var(--accent-lip); --text: #fff;
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; cursor: pointer;
  font-weight: 800; font-size: 20px; color: var(--text); background: var(--face);
  padding: 12px 26px; border-radius: 16px; box-shadow: 0 6px 0 var(--lip);
  transform: translateY(0); transition: transform .12s cubic-bezier(.3,1.6,.6,1), box-shadow .12s;
}
.lip svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.lip:hover { filter: brightness(1.06); }
.lip:active { transform: translateY(6px); box-shadow: 0 0 0 var(--lip); }
.lip-sm { font-size: 16px; padding: 7px 18px; border-radius: 13px; box-shadow: 0 5px 0 var(--lip); }
.lip-white { --face: var(--surface); --lip: var(--surface-lip); --text: var(--ink); }
.lip-amber { --face: var(--amber); --lip: var(--amber-lip); }

/* Hero */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; min-height: calc(100vh - 70px); padding-top: 40px; }
.eyebrow { --accent: var(--accent); color: var(--accent); font-weight: 800; font-size: 16px; margin: 0 0 12px; letter-spacing: .3px; }
.lead { font-size: 20px; color: var(--ink-soft); max-width: 560px; margin: 0 0 30px; }
.cta { display: flex; flex-wrap: wrap; gap: 16px; }
.meta { color: var(--ink-soft); font-size: 14px; margin-top: 18px; }
.ink-word { position: relative; display: inline-block; color: var(--pen); }
.ink-underline { position: absolute; inset-inline: -4%; bottom: -10px; width: 108%; height: 26px; overflow: visible; }
.ink-underline path { fill: none; stroke: var(--amber); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 340; stroke-dashoffset: 340; animation: draw 1.2s .5s cubic-bezier(.6,.1,.3,1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.hero-art { position: relative; height: 640px; }
.phone {
  margin: 0; width: 300px; border-radius: 42px; padding: 10px; background: #15161B;
  box-shadow: var(--shadow), inset 0 0 0 2px #2A2C34; position: relative;
}
.phone img { display: block; width: 100%; height: auto; border-radius: 33px; }
.phone-hero { position: absolute; inset-inline-start: 50%; top: 0; transform: translateX(50%) rotate(-2deg); z-index: 2; }
html[dir="rtl"] .phone-hero { transform: translateX(50%) rotate(2deg); }
.cover {
  position: absolute; width: 150px; height: 190px; border-radius: 22px; padding: 18px; color: #fff;
  background: var(--f); box-shadow: 0 8px 0 var(--l), var(--shadow); transform: rotate(var(--r));
  display: flex; flex-direction: column; gap: 2px; z-index: 1;
}
.cover::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 12px; border-radius: 22px 0 0 22px; background: rgba(255,255,255,.18); }
.cover b { font-size: 22px; font-weight: 800; }
.cover i { font-style: normal; font-size: 13px; opacity: .8; }
.cover-indigo { --f: var(--indigo); --l: var(--indigo-lip); top: 60px; inset-inline-end: 0; }
.cover-mustard { --f: var(--mustard); --l: var(--mustard-lip); top: 330px; inset-inline-end: 30px; }
.cover-plum { --f: var(--plum); --l: var(--plum-lip); top: 470px; inset-inline-start: 0; }
.float { animation: bob 6s var(--d) ease-in-out infinite; }
@keyframes bob { 50% { translate: 0 -12px; } }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; min-height: 0; text-align: center; }
  .lead { margin-inline: auto; } .cta { justify-content: center; }
  .hero-art { height: 600px; max-width: 420px; margin: 0 auto; width: 100%; }
  .cover { width: 120px; height: 150px; }
}

/* Pillars */
.pillars h2, .gallery h2, .faq h2, .sync h2 { text-align: center; margin-bottom: 40px; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.card {
  background: var(--c); color: #fff; border-radius: 24px; padding: 26px 22px 24px;
  box-shadow: 0 7px 0 var(--l); transition: transform .25s cubic-bezier(.3,1.5,.6,1);
}
.card:hover { transform: translateY(-6px) rotate(-.6deg); }
.card h3 { color: #fff; }
.card p { margin: 0; opacity: .92; font-size: 15px; line-height: 1.8; }
.card code { background: rgba(255,255,255,.18); color: #fff; }
.card svg, .sheet svg { width: 44px; height: 44px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 960px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }

/* Feature rows */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.feature.flip .feature-copy { order: 2; }
.feature-art { position: relative; display: flex; justify-content: center; min-height: 600px; align-items: center; }
.feature .phone { width: 280px; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.ticks li { position: relative; padding-inline-start: 38px; font-size: 17px; }
.ticks li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 6px; width: 24px; height: 24px; border-radius: 8px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4L18 8' fill='none' stroke='%233E9E5A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat;
  box-shadow: 0 3px 0 var(--surface-lip);
}
.scribble { position: absolute; width: 120%; max-width: 620px; top: 8%; z-index: 0; overflow: visible; }
.scribble .draw { fill: none; stroke: var(--pen); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1200; stroke-dashoffset: 1200; opacity: .55; }
.scribble.on .draw { animation: draw 2.4s cubic-bezier(.5,.1,.3,1) forwards; }
.scribble.on .d2 { animation-delay: 1.4s; stroke: var(--red); }
.scribble.on .d3 { animation-delay: 2s; stroke: var(--amber); stroke-width: 9; opacity: .4; }
.feature-art .phone { z-index: 1; }
.bubble {
  position: absolute; z-index: 2; background: var(--surface); color: var(--ink); font: 800 16px "Baloo", sans-serif;
  padding: 10px 18px; border-radius: 18px; box-shadow: 0 5px 0 var(--surface-lip), var(--shadow);
}
.bubble::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--plum); margin-inline-end: 8px; }
.b1 { top: 18%; inset-inline-start: 2%; } .b2 { bottom: 20%; inset-inline-end: 4%; }
.b2::before { background: var(--green); }
.duo .back { position: absolute; width: 240px; transform: translateX(-46%) rotate(-6deg); opacity: .96; }
html[dir="rtl"] .duo .back { transform: translateX(46%) rotate(6deg); }
.duo .phone:not(.back) { transform: translateX(-12%); }
html[dir="rtl"] .duo .phone:not(.back) { transform: translateX(-22%) rotate(-2deg); }
@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; gap: 24px; }
  .feature.flip .feature-copy { order: 0; }
  .feature-art { min-height: 0; padding: 20px 0; }
  .duo .back { display: none; } .duo .phone:not(.back), html[dir="rtl"] .duo .phone:not(.back) { transform: none; }
}

/* Sync */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.sheet { background: var(--surface); border-radius: 24px; padding: 26px; box-shadow: 0 5px 0 var(--surface-lip); }
.sheet svg { color: var(--accent); }
.sheet p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }
@media (max-width: 900px) { .grid3 { grid-template-columns: 1fr; } }

/* Gallery: a horizontal strip, swipeable */
.strip { display: flex; gap: 26px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px 6px 30px; scrollbar-width: thin; }
.strip .phone { flex: 0 0 230px; width: 230px; scroll-snap-align: center; border-radius: 34px; padding: 8px; }
.strip .phone img { border-radius: 27px; }

/* FAQ */
.faq { max-width: 820px !important; }
details { background: var(--surface); border-radius: 20px; margin-bottom: 14px; box-shadow: 0 4px 0 var(--surface-lip); padding: 4px 22px; }
summary { cursor: pointer; font-weight: 800; font-size: 19px; padding: 14px 0; color: var(--ink); list-style: none; display: flex; justify-content: space-between; }
summary::after { content: "+"; color: var(--accent); font-size: 24px; line-height: 1; transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 0 0 16px; color: var(--ink-soft); }

/* Final */
.final-card {
  text-align: center; background: var(--indigo); color: #fff; border-radius: 34px; padding: 56px 24px;
  box-shadow: 0 9px 0 var(--indigo-lip); position: relative; overflow: hidden;
}
.final-card::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(to bottom, transparent 0 39px, rgba(255,255,255,.07) 39px 40px); pointer-events: none; }
.final-card h2 { color: #fff; } .final-card p { opacity: .9; font-size: 19px; margin: 0 0 28px; }
.final-card .cta { justify-content: center; position: relative; z-index: 1; }

.foot { text-align: center; color: var(--ink-soft); padding: 30px 24px 50px; font-size: 15px; border-top: 3px solid var(--hairline); }

/* Reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.js .reveal.on { opacity: 1; transform: none; }
.rise { animation: rise .8s calc(var(--i, 0) * 110ms) cubic-bezier(.2,.8,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; } .rise { animation: none; }
  .float, .ink-underline path, .scribble .draw { animation: none !important; stroke-dashoffset: 0; }
}

/* Privacy page */
.doc { max-width: 820px; margin: 0 auto; padding: 56px 24px 80px; }
.doc .sheet { margin-bottom: 18px; }
.doc h2 { font-size: 26px; margin: 0 0 8px; }
.doc p, .doc li { color: var(--ink); font-size: 16px; }
.doc .en { direction: ltr; text-align: left; font-family: system-ui, sans-serif; }
