/* sparkmail.ibcsc.be — variant 2 "Sealed letter": a sheet of writing paper on a walnut desk.
   Imagery (seal, stamps, postmark, wood) generated with Gemini; type: Source Serif 4 + Onest. */

@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../fonts/serif-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../fonts/serif-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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: "Source Serif 4"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../fonts/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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(../fonts/onest-normal-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(../fonts/onest-normal-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(../fonts/onest-normal-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap; src: url(../fonts/jbmono-latin.woff2) format("woff2"); unicode-range: U+0000-00FF; }

:root {
  --desk: #3A2A1E;
  --paper: #F7F2E8;
  --paper-2: #F1E9DB;
  --envelope: #ECE1CD;
  --envelope-2: #E3D5BD;
  --ink: #2B2219;
  --ink-2: #5A4B3D;
  --ink-3: #8A7966;
  --rule: #DDD2C0;
  --wax: #A3241C;
  --wax-2: #C0412B;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans: "Onest", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --sheet: 1180px;
  --pad: clamp(20px, 5vw, 76px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  /* scale 1.25 */
  --t-13: .8125rem; --t-15: .9375rem; --t-17: 1.0625rem; --t-20: 1.25rem; --t-25: 1.5625rem;
  --t-h2: clamp(1.9rem, 1.4rem + 1.8vw, 2.75rem);
  --t-display: clamp(2.6rem, 1.6rem + 3.9vw, 4.6rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: linear-gradient(to bottom, transparent 55%, var(--desk)) center top / 100% 100vh no-repeat fixed, var(--desk) url(../img/letter/wood.webp) center top / cover fixed; color: var(--ink); font: 400 var(--t-17)/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
@supports (-webkit-touch-callout: none) { body { background: linear-gradient(to bottom, transparent 40%, var(--desk) 900px) center top / 100% 900px no-repeat, var(--desk) url(../img/letter/wood.webp) center top / auto 900px no-repeat; } }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--wax-2); outline-offset: 3px; border-radius: 4px; }
::selection { background: #E9C9A8; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 99; background: var(--ink); color: var(--paper); padding: 8px 12px; }
.skip:focus { left: 8px; }

/* ---------- the sheet on the desk, with two sheets peeking out underneath */
.desk { padding: clamp(14px, 3vw, 44px) clamp(10px, 2.4vw, 32px) clamp(28px, 5vw, 64px); }
.sheet { position: relative; max-width: var(--sheet); margin: 0 auto; background: var(--paper); border-radius: 3px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 2px 3px rgba(0, 0, 0, .18), 0 30px 70px rgba(20, 10, 4, .45); }
.sheet::before, .sheet::after { content: ""; position: absolute; inset: 0; background: var(--paper-2); border-radius: 3px; z-index: -1; box-shadow: 0 10px 30px rgba(20, 10, 4, .35); }
.sheet::before { transform: rotate(-.8deg) translate(-6px, 8px); }
.sheet::after { transform: rotate(.6deg) translate(8px, 4px); background: #EAE0CF; }

/* ---------- header */
.top { padding: 0 var(--pad); }
.top-in { display: flex; align-items: center; gap: 28px; height: 84px; border-bottom: 1px solid var(--rule); }
.logo { display: flex; align-items: center; gap: 10px; margin-right: auto; text-decoration: none; font: 600 var(--t-20) var(--sans); letter-spacing: -.01em; }
.logo img { border-radius: 7px; }
.top-nav { display: flex; gap: 26px; font-size: var(--t-15); color: var(--ink-2); }
.top-nav a { text-decoration: none; padding: 10px 0; }
.top-nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.lang { position: relative; font-size: var(--t-15); }
.lang summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 10px 4px; min-height: 44px; color: var(--ink-2); }
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover, .lang[open] summary { color: var(--ink); }
.lang ul { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; background: #FFFCF6; border: 1px solid var(--rule); border-radius: 8px; padding: 6px; min-width: 170px; box-shadow: 0 18px 40px rgba(43, 34, 25, .2); }
.lang a { display: block; padding: 9px 12px; border-radius: 6px; text-decoration: none; color: var(--ink-2); }
.lang a:hover { background: var(--paper-2); color: var(--ink); }
.lang a[aria-current] { color: var(--wax); font-weight: 600; }
.pill { display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px; border-radius: 999px; background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 600; font-size: var(--t-15); transition: background .15s; }
.pill:hover { background: #46382B; }

/* ---------- shared */
main { padding: 0 var(--pad); }
section { padding: clamp(56px, 7vw, 96px) 0 0; }
.h2 { font: 500 var(--t-h2)/1.12 var(--serif); letter-spacing: -.012em; text-align: center; text-wrap: balance; max-width: 22ch; margin: 0 auto; }

/* ---------- hero */
.hero { padding-top: clamp(48px, 6vw, 80px); text-align: center; }
.display { font: 500 var(--t-display)/1.04 var(--serif); letter-spacing: -.02em; text-wrap: balance; max-width: 16ch; margin: 0 auto; }
.display em { font-style: italic; color: var(--wax); }
.lead { max-width: 36em; margin: 22px auto 0; font-size: var(--t-20); line-height: 1.55; color: var(--ink-2); }

.envelope { position: relative; margin: clamp(64px, 7vw, 88px) auto 0; display: grid; grid-template-columns: minmax(0, 13fr) minmax(0, 8fr); gap: clamp(24px, 3vw, 44px); align-items: center; text-align: left;
  padding: clamp(28px, 3.4vw, 44px); border-radius: 6px; background: var(--envelope);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 0 0 1px rgba(120, 90, 60, .12), 0 18px 40px rgba(60, 40, 20, .18); }
/* the envelope flap: two faint folds meeting under the seal */
.envelope::before { content: ""; position: absolute; inset: 0; border-radius: 6px; pointer-events: none;
  background: linear-gradient(to bottom right, transparent calc(50% - 1px), rgba(120, 90, 60, .14) 50%, transparent calc(50% + 1px)) left top / 50% 46% no-repeat,
              linear-gradient(to bottom left, transparent calc(50% - 1px), rgba(120, 90, 60, .14) 50%, transparent calc(50% + 1px)) right top / 50% 46% no-repeat,
              linear-gradient(var(--envelope-2), transparent 30%); opacity: .9; }
.envelope > * { position: relative; }
.seal { position: absolute; left: 50%; top: 0; width: clamp(92px, 9vw, 128px); transform: translate(-50%, -54%) rotate(-6deg); filter: drop-shadow(0 8px 10px rgba(80, 10, 5, .35)); z-index: 2; }
.letter-shot { border-radius: 10px; overflow: hidden; box-shadow: 0 2px 4px rgba(0, 0, 0, .2), 0 22px 44px rgba(40, 25, 10, .35); }
.envelope-side { display: grid; justify-items: end; gap: 18px; }
.postage { position: relative; width: 100%; height: 150px; }
.postage .stamp { position: absolute; right: 0; top: 0; width: 104px; transform: rotate(3deg); filter: drop-shadow(0 2px 3px rgba(60, 40, 20, .25)); }
.postage .postmark { position: absolute; right: 66px; top: 26px; width: 230px; opacity: .78; mix-blend-mode: multiply; }

/* ---------- download ticket */
.ticket-wrap { display: grid; justify-items: center; gap: 10px; width: 100%; }
.ticket { position: relative; display: grid; justify-items: center; gap: 2px; width: 100%; max-width: 380px; padding: 16px 22px 14px; border-radius: 10px; background: var(--ink); color: var(--paper); text-decoration: none; transition: transform .15s var(--ease), background .15s; }
.ticket::before { content: ""; position: absolute; inset: 5px; border: 1.5px dashed rgba(247, 242, 232, .38); border-radius: 7px; pointer-events: none; }
.ticket:hover { background: #46382B; }
.ticket:active { transform: translateY(1px); }
.ticket-main { display: inline-flex; align-items: center; gap: 10px; font: 600 1.125rem/1.25 var(--sans); text-wrap: balance; text-align: center; }
.ticket small { font-size: var(--t-13); opacity: .72; letter-spacing: .02em; }
.ticket-meta { font-size: var(--t-13); color: var(--ink-3); text-align: center; }
.ticket-note { font-size: var(--t-13); color: var(--ink-3); line-height: 1.5; text-align: center; max-width: 30ch; justify-self: center; }

/* ---------- smart inbox tabs */
.sort { text-align: center; }
.tabs { display: flex; flex-wrap: nowrap; justify-content: safe center; overflow-x: auto; scrollbar-width: none; margin: 28px auto 0; border-bottom: 1px solid var(--rule); max-width: 100%; }
.tabs::-webkit-scrollbar { display: none; }
.tabs li { font: 400 var(--t-17)/1.3 var(--serif); padding: 12px clamp(8px, 1.1vw, 16px) 14px; color: var(--ink-2); white-space: nowrap; }
.tabs li span { color: var(--ink-3); font-size: var(--t-15); }
.tabs li.on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
.tabs li.on span { color: var(--wax); }
.sort-text { max-width: 38em; margin: 20px auto 0; color: var(--ink-2); }

/* ---------- features: numbered editorial list with stamps */
.feat-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 64px; margin-top: 44px; }
.feat-list li, .steps li { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: start; }
.num { font: 400 2.6rem/1 var(--serif); color: var(--ink); min-width: 1.1em; }
.feat-list h3, .steps h3 { font: 600 var(--t-25)/1.2 var(--serif); letter-spacing: -.01em; }
.feat-list p, .steps p { margin-top: 6px; color: var(--ink-2); font-size: var(--t-17); }
.mini { width: 58px; transform: rotate(4deg); filter: drop-shadow(0 1px 2px rgba(60, 40, 20, .25)); }
.feat-list li:nth-child(2n) .mini { transform: rotate(-3deg); }

/* ---------- postcard */
.postcard-sec { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.postcard-sec .h2 { text-align: left; margin: 0; }
.postcard-copy p { margin-top: 16px; color: var(--ink-2); font-size: var(--t-20); line-height: 1.55; }
.postcard { background: #FFFCF6; padding: 12px 12px 34px; border-radius: 2px; transform: rotate(1.4deg); box-shadow: 0 2px 3px rgba(0, 0, 0, .14), 0 24px 46px rgba(40, 25, 10, .28); }
.postcard img { border-radius: 2px; }

/* ---------- install */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin-top: 44px; }
.steps li { grid-template-columns: auto 1fr; }
.install-dl { margin-top: 48px; padding: 32px; border: 1px dashed var(--rule); border-radius: 8px; display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 32px; align-items: center; }
.sha { font-size: var(--t-13); color: var(--ink-3); }
.sha span { display: block; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .08em; }
.sha code { font-family: var(--mono); color: var(--ink-2); overflow-wrap: anywhere; }

/* ---------- faq */
.faq-list { max-width: 820px; margin: 36px auto 0; border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 2px; font: 500 var(--t-20)/1.35 var(--serif); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { flex: none; color: var(--ink-3); transition: transform .2s var(--ease); }
.faq details[open] summary svg { transform: rotate(180deg); color: var(--wax); }
.faq summary:hover { color: var(--wax); }
.faq details p { padding: 0 2px 22px; color: var(--ink-2); max-width: 44em; }

/* ---------- footer */
.foot { margin: clamp(56px, 7vw, 96px) var(--pad) 0; padding: 28px 0 36px; border-top: 1px solid var(--rule); text-align: center; font-size: var(--t-15); color: var(--ink-2); }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 26px; }
.foot-links a { text-decoration: none; padding: 6px 0; }
.foot-links a:hover { color: var(--wax); }
.foot-line { margin-top: 10px; color: var(--ink-3); font-size: var(--t-13); }

/* ---------- simple pages share the sheet */
.btn { display: inline-flex; align-items: center; justify-self: center; min-height: 44px; padding: 0 20px; border-radius: 999px; text-decoration: none; font-weight: 600; }
.btn.ghost { border: 1px solid var(--ink); color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.page .label { font: 500 var(--t-13) var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.page .body { color: var(--ink-2); font-size: var(--t-20); line-height: 1.6; }
.page { padding: clamp(56px, 8vw, 110px) 0 0; }
.page-in { max-width: 680px; margin: 0 auto; display: grid; gap: 22px; text-align: center; }

/* ---------- reveal */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .envelope.reveal { transform: translateY(18px) rotate(-.4deg); }
.js .envelope.reveal.in { transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .envelope.reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- responsive */
@media (max-width: 980px) {
  .envelope { grid-template-columns: 1fr; padding-top: 64px; }
  .envelope-side { justify-items: center; }
  .postage { height: 120px; max-width: 360px; }
  .postcard-sec { grid-template-columns: 1fr; }
  .postcard-sec .h2 { text-align: center; margin: 0 auto; }
  .postcard-copy p { text-align: center; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .install-dl { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}
@media (max-width: 720px) {
  .lead { font-size: var(--t-17); line-height: 1.6; }
  .top-nav { display: none; }
  .top-in { gap: 14px; height: 68px; }
  .feat-list { grid-template-columns: 1fr; gap: 30px; }
  .tabs { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: calc(-1 * var(--pad)); margin-right: calc(-1 * var(--pad)); padding: 0 var(--pad); }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs li { white-space: nowrap; padding: 10px 12px 12px; }
  .num { font-size: 2rem; }
  .feat-list li { grid-template-columns: auto 1fr; position: relative; }
  .feat-list h3 { padding-right: 52px; }
  .mini { position: absolute; right: 0; top: -2px; width: 42px; }
  /* phone: show the left half of the window at a readable size */
  .letter-shot, .pc-crop { overflow: hidden; aspect-ratio: 4 / 3.6; }
  .letter-shot img, .pc-crop img { width: 205%; max-width: none; }
  .postcard { padding: 8px 8px 22px; }
  .sheet::before, .sheet::after { display: none; }
  .desk { padding: 8px 8px 24px; }
}
