/* Daysafe website. Postcards and postmarks: a cool postcard white, violet postmark ink, stamp green.
   Young Serif for headings, Hanken Grotesk for reading. Sizes stay modest; the photos and the marks carry the page. */

@font-face { font-family: "Young Serif"; font-weight: 400; font-display: swap; src: url("fonts/young-serif-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "Young Serif"; font-weight: 400; font-display: swap; src: url("fonts/young-serif-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Hanken Grotesk"; font-weight: 400 700; font-display: swap; src: url("fonts/hanken-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "Hanken Grotesk"; font-weight: 400 700; font-display: swap; src: url("fonts/hanken-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

@font-face { font-family: "Markazi Text"; font-weight: 400 700; font-display: swap; size-adjust: 130%; src: url("fonts/markazi-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 400; font-display: swap; src: url("fonts/plex-arabic-400.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 600; font-display: swap; src: url("fonts/plex-arabic-600.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }

:root {
  --paper: #F5F5F1;     /* postcard stock, cool not cream */
  --card: #FFFFFF;
  --ink: #1F1D2A;       /* violet-black */
  --ink-soft: #4C4A5A;
  --line: #DAD9D1;
  --violet: #5B3E9E;    /* postmark ink */
  --green: #6DA23E;     /* the stamp */
  --green-ink: #3F6B1D; /* stamp green dark enough for text */
  --red: #B42D24;
  --serif: "Young Serif", "Markazi Text", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: only light;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 18px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--violet); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--violet); }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 3px; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 44px); }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -0.005em; text-wrap: balance; }
h1 { font-size: clamp(32px, 3.4vw, 44px); line-height: 1.12; }
h2 { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.18; }
h3 { font-size: 20px; line-height: 1.3; }
p { margin: 0; }

/* Top bar */
header.top { display: flex; align-items: center; gap: 10px; padding: 22px 0; }
header.top img { width: 30px; height: 30px; border-radius: 7px; }
header.top a.brand { font: 400 21px/1 var(--serif); text-decoration: none; }
header.top nav { margin-left: auto; display: flex; gap: clamp(16px, 3vw, 30px); font-size: 16px; font-weight: 500; }
header.top nav a { text-decoration: none; padding: 6px 0; }
header.top nav a[aria-current="page"] { text-decoration: underline; }

/* ---------- Home ---------- */

/* Hero: text and postcard in the √2 proportion of a postcard */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.414fr); gap: clamp(28px, 5vw, 72px); align-items: center; padding: clamp(20px, 5vw, 64px) 0 clamp(56px, 8vw, 104px); }
.hero .lead { font-size: 19px; color: var(--ink-soft); margin: 20px 0 30px; max-width: 34ch; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.store { display: inline-flex; align-items: baseline; gap: 8px; background: var(--ink); color: var(--paper); font-weight: 600; font-size: 16px; padding: 14px 20px; border-radius: 10px; text-decoration: none; }
a.store:hover { color: var(--paper); background: var(--violet); }
.soon { font-size: 15px; color: var(--ink-soft); }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; } .hero .lead { max-width: 46ch; } }

.postcard { position: relative; margin: 0; padding: 12px 12px 14px; background: var(--card); transform: rotate(1.4deg); box-shadow: 0 1px 2px rgba(31, 29, 42, 0.08), 0 18px 40px -18px rgba(31, 29, 42, 0.35); }
.postcard img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.postcard figcaption { font-size: 14px; color: var(--ink-soft); padding: 10px 2px 0; text-align: right; }
.stamp { position: absolute; top: -20px; right: -16px; width: clamp(74px, 9vw, 104px); transform: rotate(4deg); filter: drop-shadow(0 4px 6px rgba(31, 29, 42, 0.18)); }
.postcard .hero-mark { position: absolute; left: -70px; bottom: -64px; width: clamp(260px, 34vw, 420px); transform: rotate(-8deg); mix-blend-mode: multiply; }
.postcard .hero-mark .ring, .postcard .hero-mark .wave { stroke-width: 3.6; }
@media (max-width: 820px) { .postcard .hero-mark { left: -14px; bottom: -58px; width: 300px; } .postcard .hero-mark .wave { display: none; } .stamp { right: -6px; } }

/* Postmark ink. Postmarks are printed left to right in every language, so the date keeps its order on Arabic pages. */
.pm { direction: ltr; unicode-bidi: isolate; }
.pm .ring { fill: none; stroke: var(--violet); stroke-width: 3.2; }
.pm .ring.thin { stroke-width: 1.5; }
.pm text { fill: var(--violet); font-family: var(--sans); font-weight: 700; }
.pm .arc { font-size: 11.5px; letter-spacing: 0.12em; }
.pm .date { font-size: 16px; letter-spacing: 0.03em; }
.pm .year { font-size: 11px; letter-spacing: 0.1em; font-weight: 600; }
.pm .wave { fill: none; stroke: var(--violet); stroke-width: 3; stroke-linecap: round; }

/* A week of postmarks */
.week { padding: clamp(56px, 8vw, 96px) 0; border-top: 1px solid var(--line); }
.week-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.414fr); gap: clamp(28px, 5vw, 72px); align-items: last baseline; }
.week-head p { color: var(--ink-soft); max-width: 50ch; }
.week-row { list-style: none; padding: 0; margin: 46px 0 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.week-row li { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.week-row .pm { width: 100%; max-width: 132px; }
.week-row li:nth-child(1) > .pm { transform: rotate(-8deg); }
.week-row li:nth-child(2) > .pm { transform: rotate(3deg); opacity: 0.86; }
.week-row li:nth-child(3) > .pm { transform: rotate(-2deg) translateY(4px); }
.week-row li:nth-child(5) > .pm { transform: rotate(6deg); opacity: 0.9; }
.week-row li:nth-child(6) > .pm { transform: rotate(-5deg) translateY(-3px); opacity: 0.8; }
.week-row li:nth-child(7) > .pm { transform: rotate(2deg); }
.week-row .stack { position: relative; width: 100%; max-width: 132px; aspect-ratio: 1; }
.week-row .stack .pm { position: absolute; inset: 0; }
.week-row .stack .pm.a { transform: translate(-16%, -22%) rotate(-12deg); }
.week-row .stack .pm.b { transform: translate(16%, 6%) rotate(9deg); }
.week-row .day { font-weight: 600; font-size: 15px; }
.week-row .note { font-size: 13px; color: var(--violet); font-weight: 600; margin-top: -8px; text-align: center; }
.tallies { margin-top: 48px; font-size: 17px; color: var(--ink-soft); }
.tallies b { color: var(--ink); font-weight: 600; }
@media (max-width: 820px) { .week-head { grid-template-columns: 1fr; gap: 14px; } .week-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px 3%; } .week-row li { flex: 0 0 22%; min-width: 0; } }

/* Filling a gap: the hands photo with its story */
.gaps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.414fr); gap: clamp(28px, 5vw, 72px); align-items: center; padding: clamp(24px, 4vw, 48px) 0 clamp(56px, 8vw, 96px); }
.gaps img { width: 100%; aspect-ratio: 1; object-fit: cover; filter: sepia(0.12) saturate(1.08) brightness(1.03); padding: 10px; background: var(--card); transform: rotate(-1.2deg); box-shadow: 0 1px 2px rgba(31, 29, 42, 0.08), 0 18px 40px -18px rgba(31, 29, 42, 0.35); }
.gaps p { color: var(--ink-soft); margin-top: 16px; max-width: 46ch; }
@media (max-width: 820px) { .gaps { grid-template-columns: 1fr; } .gaps img { max-width: 440px; } }

/* The rules, as a plain table */
.rules { padding: clamp(56px, 8vw, 96px) 0; border-top: 1px solid var(--line); }
.rules h2 { margin-bottom: 24px; }
.rule-row { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.6fr) 10rem; gap: 6px 28px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--line); }
.rule-row:first-of-type { border-top: 1px solid var(--ink); }
.rule-row:last-child { border-bottom: 0; }
.rule-row h3 { font-size: 19px; }
.rule-row p { color: var(--ink-soft); font-size: 16px; }
.rule-row .limit { font-family: var(--serif); font-size: 26px; text-align: right; line-height: 1.1; }
.rule-row .limit small { display: block; font: 500 14px/1.35 var(--sans); color: var(--ink-soft); margin-top: 2px; }
@media (max-width: 680px) { .rule-row { grid-template-columns: minmax(0, 1fr) auto; } .rule-row p { grid-column: 1 / -1; grid-row: 2; } }

/* Privacy and the calculator */
.closing { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); padding: clamp(40px, 6vw, 72px) 0 20px; }
.closing p { color: var(--ink-soft); margin-top: 14px; max-width: 44ch; }
.closing .calc .store { margin-top: 22px; }
@media (max-width: 760px) { .closing { grid-template-columns: 1fr; } }

/* ---------- Text pages (support, privacy, terms) ---------- */
.page-head { padding: 26px 0 26px; }
.page-head h1 { max-width: 22ch; }
.intro { font-size: 19px; color: var(--ink-soft); margin-top: 14px; max-width: 56ch; }
.doc { background: var(--card); border-radius: 6px; padding: 8px clamp(20px, 4vw, 44px) 34px; margin: 0 0 30px; max-width: 820px; box-shadow: inset 0 0 0 1px var(--line); }
.doc h2 { font-size: 26px; margin: 30px 0 10px; }
.doc h3 { font-size: 19px; margin: 22px 0 6px; }
.doc p, .doc li { max-width: 68ch; }
.doc p + p { margin-top: 12px; }
.muted { color: var(--ink-soft); font-size: 15px; }

footer { margin-top: 88px; padding: 24px 0 44px; border-top: 1px solid var(--line); font-size: 15px; color: var(--ink-soft); }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--ink); }
footer p { margin-top: 12px; }
footer .langs { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; font-size: 15px; }
footer .langs a { color: var(--ink-soft); text-decoration: none; }
footer .langs a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

/* Prices sit in the same table style as the rules, with a quiet note under them */
.plans { padding-top: 0; border-top: 0; }
.plans .limit { white-space: nowrap; }
.plans-note { margin-top: 16px; font-size: 15px; color: var(--ink-soft); }

/* ---------- Right-to-left (Arabic) ---------- */
[dir="rtl"] header.top nav { margin-left: 0; margin-right: auto; }
[dir="rtl"] .rule-row .limit, [dir="rtl"] .postcard figcaption { text-align: left; }
[dir="rtl"] .postcard { transform: rotate(-1.4deg); }
[dir="rtl"] .stamp { right: auto; left: -16px; transform: rotate(-4deg); }
[dir="rtl"] .postcard .hero-mark { left: auto; right: -70px; }
[dir="rtl"] .gaps img { transform: rotate(1.2deg); }
:lang(ar) body { font-size: 19px; line-height: 1.85; }
:lang(ar) h1 { line-height: 1.35; }
:lang(ar) h2 { line-height: 1.4; }
:lang(ar) h3 { line-height: 1.45; }
@media (max-width: 820px) { [dir="rtl"] .postcard .hero-mark { left: auto; right: -14px; } [dir="rtl"] .stamp { left: -6px; } }

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