/* Yusran · the notebook on the web. Tokens mirror ios/Yusran/Design/Theme.swift. */
:root {
  --bg: #F6F2E9;
  --ink: #263B36;
  --ink-muted: #5C6B66;
  --brass: #A18B64;
  --brass-text: #76633F;
  --brass-on-ink: #C4AE84;
  --line: #E8E2D6;
  --ivory: #FBF8F1;
  --display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --measure: 36rem;
  --gutter: clamp(16px, 5vw, 48px);
  --max: 1120px;
  color-scheme: light;
}
@font-face { font-family: "Fraunces"; src: url("/fonts/fraunces-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("/fonts/fraunces-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Amiri"; src: url("/fonts/amiri-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
html[lang="ar"] { --display: "Amiri", "Noto Naskh Arabic", "Geeza Pro", serif; --body: -apple-system, BlinkMacSystemFont, "SF Arabic", "Segoe UI", "Noto Sans Arabic", Tahoma, sans-serif; }

* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-x: clip; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 1.0625rem; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
.display { font-family: var(--display); font-weight: 400; letter-spacing: -0.01em; line-height: 1.05; text-wrap: balance; }
html[lang="ar"] .display { letter-spacing: 0; line-height: 1.35; }
.kicker { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brass-text); margin-bottom: 0.9rem; }
html[lang="ar"] .kicker { letter-spacing: 0; font-size: 0.9rem; text-transform: none; }
.lead { font-size: 1.2rem; line-height: 1.5; color: var(--ink); max-width: var(--measure); }
.note { font-size: 0.875rem; color: var(--ink-muted); }
.muted { color: var(--ink-muted); }

.skip { position: absolute; top: 8px; inset-inline-start: 16px; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 999px; z-index: 10; }
.skip:focus { width: auto; height: auto; clip-path: none; }

/* Header */
header.site { max-width: var(--max); margin: 0 auto; padding: 20px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-size: 1.35rem; }
.brand img { border-radius: 9px; }
header.site nav { display: flex; align-items: center; gap: 22px; font-size: 0.95rem; }
header.site nav a { text-decoration: none; color: var(--ink-muted); }
header.site nav a:hover { color: var(--ink); }
header.site nav a.store-link { color: var(--ink); border: 1px solid var(--brass-text); border-radius: 999px; padding: 7px 14px; }
.head-langs { display: flex; gap: 2px; font-size: 0.8rem; letter-spacing: 0.04em; }
.head-langs a { text-decoration: none; color: var(--ink-muted); padding: 6px 7px; border-radius: 999px; }
.head-langs a[aria-current="true"] { color: var(--ink); background: var(--line); }
.head-langs a:hover { color: var(--ink); }
@media (max-width: 560px) { header.site nav a:not(.store-link) { display: none; } header.site { gap: 10px; } }

main { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
section { padding: clamp(36px, 6vw, 72px) 0; border-top: 1px solid var(--line); }
section.hero { border-top: 0; padding-top: clamp(24px, 5vw, 64px); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; background: var(--ink); color: var(--bg); text-decoration: none; padding: 14px 22px; border-radius: 999px; font-weight: 500; font-size: 1rem; line-height: 1; }
.btn:hover { background: #1d2f2b; }
.btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.cta-row { margin-top: 1.6rem; }
.text-link { color: var(--brass-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.text-link:hover { color: var(--ink); }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.hero .display { font-size: clamp(2.3rem, 4.6vw, 3.9rem); max-width: 16ch; }
.hero .lead { margin-top: 1.4rem; }
.hero .note { margin-top: 1rem; }
.hero-art { position: relative; display: flex; justify-content: center; overflow: hidden; padding: 12px 0; }
.rosette { position: absolute; inset: 50% auto auto 50%; width: min(130%, 620px); height: auto; transform: translate(-50%, -50%); opacity: 0.55; pointer-events: none; }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { margin-top: 24px; }
  .rosette { width: 120%; }
}

/* Phone frame: ink body, brass hairline, rounded screen. No shadow. */
.phone { margin: 0; position: relative; width: clamp(220px, 60vw, 300px); background: var(--ink); border-radius: 48px; padding: 10px; border: 1px solid var(--brass); }
.phone img { display: block; width: 100%; height: auto; border-radius: 40px; background: var(--bg); }

/* Features */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.feature:nth-of-type(even) .feature-text { order: 2; }
.feature .display { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
.feature p:not(.kicker) { margin-top: 1.1rem; max-width: var(--measure); color: var(--ink); font-size: 1.1rem; }
.feature .phone-wrap { display: flex; justify-content: center; }
.feature .phone { width: clamp(200px, 50vw, 260px); }
@media (max-width: 760px) {
  .feature { grid-template-columns: 1fr; }
  .feature:nth-of-type(even) .feature-text { order: 0; }
  .feature .phone-wrap { margin-top: 20px; }
}

/* More */
.more-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.more-grid li { background: var(--bg); padding: 24px 22px; }
.more-grid h3 { font-family: var(--display); font-size: 1.35rem; margin-bottom: 0.5rem; }
.more-grid p { color: var(--ink-muted); font-size: 1rem; }

/* Sources */
.sources { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.sources .display { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
.sources-text p:not(.kicker) { margin-top: 1.1rem; max-width: var(--measure); font-size: 1.1rem; }
.source-list { border-top: 1px solid var(--brass); }
.source-list li { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.source-list .name { font-family: var(--display); font-size: 1.25rem; }
.source-list .role { color: var(--ink-muted); text-align: end; }
@media (max-width: 760px) { .sources { grid-template-columns: 1fr; } }

/* Privacy: ink surface, the one dark block on the page. */
.privacy { background: var(--ink); color: var(--bg); border-top: 0; padding-left: clamp(20px, 4vw, 56px); padding-right: clamp(20px, 4vw, 56px); border-radius: 28px; }
.privacy .kicker { color: var(--brass-on-ink); }
.privacy .display { font-size: clamp(1.9rem, 3.6vw, 2.9rem); max-width: 22ch; }
.privacy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px 40px; margin-top: 2.2rem; }
.privacy-grid h3 { font-family: var(--display); font-size: 1.35rem; margin-bottom: 0.5rem; }
.privacy-grid p { color: rgba(246, 242, 233, 0.85); }
.privacy .text-link { color: var(--brass-on-ink); display: inline-block; margin-top: 2.2rem; }
.privacy .text-link:hover { color: var(--bg); }
.privacy + section { border-top: 0; }

/* Closing */
.closing { text-align: center; }
.closing .display { font-size: clamp(2.2rem, 5vw, 3.8rem); }
.closing .cta-row { margin-top: 1.6rem; }

/* Footer */
footer.site { max-width: var(--max); margin: 0 auto; padding: 40px var(--gutter) 40px; border-top: 1px solid var(--line); font-size: 0.95rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 0.8fr; gap: 32px 40px; }
.foot-brand-col .brand { font-size: 1.25rem; }
.foot-tagline { margin: 12px 0 18px; color: var(--ink-muted); max-width: 22ch; }
.btn-small { padding: 10px 16px; font-size: 0.9rem; }
.foot-col h2 { font-family: var(--body); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass-text); margin-bottom: 12px; }
html[lang="ar"] .foot-col h2 { letter-spacing: 0; text-transform: none; font-size: 0.9rem; }
.foot-col a { display: block; color: var(--ink); text-decoration: none; padding: 5px 0; }
.foot-col a:hover { color: var(--brass-text); }
.foot-col a .muted { color: var(--ink-muted); }
.langs a[aria-current="true"] { color: var(--brass-text); }
.langs a[aria-current="true"]::after { content: " ✓"; }
.foot-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; color: var(--ink-muted); font-size: 0.875rem; }
.foot-note { max-width: 52ch; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand-col { grid-column: 1 / -1; } .foot-bottom { flex-direction: column; } }

/* Text pages (privacy, support, 404) */
.page { max-width: 44rem; padding: clamp(24px, 5vw, 56px) 0 clamp(48px, 8vw, 96px); }
.page-head { margin-bottom: 2rem; }
.page .display { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.page .meta { margin-top: 0.8rem; color: var(--ink-muted); }
.page .page-note { margin-top: 0.6rem; color: var(--ink-muted); font-size: 0.95rem; }
.page p { margin-top: 1.1rem; }
.page strong { font-weight: 600; color: var(--ink); }
.page h2 { font-family: var(--display); font-size: 1.6rem; margin-top: 2.4rem; }
.page .lead { margin-top: 1rem; }
.faq { margin-top: 1.5rem; border-top: 1px solid var(--brass); }
.faq li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.faq h3 { font-family: var(--display); font-size: 1.3rem; }
.faq p { margin-top: 0.5rem; color: var(--ink); }
.contact { margin-top: 2.4rem; padding: 24px; border: 1px solid var(--line); border-radius: 20px; }
.contact h2 { margin-top: 0; }
.contact .mail { display: inline-block; margin-top: 0.8rem; font-family: var(--display); font-size: 1.4rem; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--brass); }
.contact .mail:hover { color: var(--brass-text); }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
