/* Shtrih & Nishka pre-launch splash. Values from Paper, page "A2 · 7 Splash (pre-launch)". */

@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/playfair-display-latin-400-normal.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: "Playfair Display"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/playfair-display-cyrillic-400-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/montserrat-latin-wght-normal.woff2) format("woff2-variations"), url(fonts/montserrat-latin-wght-normal.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: "Montserrat"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/montserrat-cyrillic-wght-normal.woff2) format("woff2-variations"), url(fonts/montserrat-cyrillic-wght-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  --color-warm-white: #F8F5EF;
  --color-linen: #E8DDD1;
  --color-charcoal: #2E2E2E;
  --color-olive: #3E4A36;
  --color-terracotta: #A15332;
  --color-ochre-on-olive: #DDB984;
  --color-ink-soft: #4A463F;      /* small text on linen */
  --color-placeholder: #5F5A52;
  --color-error: #8F392D;
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Montserrat", system-ui, sans-serif;
  --shadow-card: 0 8px 24px #2E2E2E2E;
  /* Material Design 3 easing, per the A2 · 6 motion spec */
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-decelerate: cubic-bezier(0, 0, 0, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--color-linen); }
body {
  margin: 0;
  font: 400 12px/16px var(--font-body);
  color: var(--color-charcoal);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
}
/* Paper draws BG text with the standard Cyrillic forms, not the fonts' Bulgarian (locl) variants.
   !important because the `font` shorthand used below resets font-feature-settings. */
*, *::before, *::after, ::placeholder { font-feature-settings: "locl" 0 !important; }
p, h1, h2 { margin: 0; font-weight: inherit; }
b, strong { font-weight: 600; }
img, svg { display: block; }
a { color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---------- Shared header and footer ---------- */

.top {
  position: absolute; inset: 0 0 auto 0; z-index: 1;
  height: 96px; padding-inline: 56px;
  display: flex; align-items: center; justify-content: space-between;
}
.home { display: block; border-radius: 2px; }
.wordmark { width: 188px; height: 46px; }
.lang { display: flex; align-items: center; gap: 10px; font: 600 14px/18px var(--font-body); letter-spacing: 0.08em; color: var(--color-linen); }
.lang a { text-decoration: none; opacity: 0.85; border-radius: 2px; }
.lang a[aria-current="page"] { opacity: 1; text-decoration: underline 1px; text-underline-offset: 6px; }
.lang a:not([aria-current]):hover { opacity: 1; }
.lang .dot { color: var(--color-ochre-on-olive); }

.foot {
  height: 56px; padding: 0 56px 8px;
  display: flex; align-items: center; justify-content: space-between;
  font: 500 14px/18px var(--font-body);
}
.foot .where { color: var(--color-ink-soft); }
.foot .where a { text-decoration: underline 1px; text-underline-offset: 4px; }
.foot .ig { display: flex; align-items: center; gap: 10px; color: var(--color-linen); text-decoration: none; border-radius: 2px; }
.foot .ig span { text-decoration: underline 1px var(--color-ochre-on-olive); text-underline-offset: 5px; }
.i-ig { flex-shrink: 0; fill: none; stroke: var(--color-linen); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i-ig .dot { fill: var(--color-linen); }
.short { display: none; }

/* Keyboard focus: 2px terracotta on light grounds, #DDB984 on olive grounds (motion spec, row 1). */
:focus-visible { outline: 2px solid var(--color-terracotta); outline-offset: 3px; }
.lang a:focus-visible, .foot .ig:focus-visible, .pair .r a:focus-visible { outline-color: var(--color-ochre-on-olive); }

/* ---------- Splash ---------- */

.splash {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; position: relative; overflow-x: clip;
  background: linear-gradient(90deg, var(--color-linen) 0 50%, var(--color-olive) 50% 100%);
}
.splash main {
  flex: 1 0 auto;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: 36px;
}

/* The leaf's painted/woven seam sits 188/352 of the way across the image; keep it on the colour split.
   The leaf gives up height first when the window is shorter than the 900px design. */
.leaf { display: contents; }
.leaf img {
  flex: 0 1 528px; min-height: 300px; height: 528px;
  width: auto; aspect-ratio: 2 / 3; align-self: center;
  translate: calc((0.5 - 188 / 352) * 100%) 0;
  object-fit: contain;
}

.pair { display: grid; grid-template-columns: 1fr 1fr; }
.pair .l { text-align: right; color: var(--color-charcoal); justify-self: end; }
.pair .r { color: var(--color-linen); justify-self: start; }
.pair .r b { color: var(--color-ochre-on-olive); }

.headline {
  margin-top: 4px; align-items: baseline;
  font: 400 64px/72px var(--font-display); letter-spacing: -0.02em;
}
.headline .l { padding-right: 22px; }
.headline .r { padding-left: 22px; }

.body { margin-top: 16px; font-size: 17px; line-height: 26px; }
.body .l { width: 354px; padding-right: 24px; }
.body .r { width: 354px; padding-left: 24px; }

.note { margin-top: 16px; font-size: 13px; line-height: 18px; }
.note .l { width: 274px; padding-right: 24px; color: var(--color-ink-soft); }
.note .r { width: 274px; padding-left: 24px; }

/* ---------- Sign-up card and its states ---------- */

.signup { width: 540px; margin: 24px auto 0; position: relative; }

.card {
  display: grid; grid-template-columns: 1fr auto; column-gap: 8px; row-gap: 6px; align-items: center;
  padding: 6px; margin: 0;
  background: var(--color-warm-white); border-radius: 4px;
  box-shadow: var(--shadow-card);
  transition: box-shadow 150ms var(--ease-standard);
}
.field {
  grid-column: 1; grid-row: 1; min-width: 0; width: 100%; height: 48px;
  padding: 0 0 0 16px; margin: 0; border: 0; border-radius: 2px; background: transparent; outline: none;
  font: 400 16px/20px var(--font-body); color: var(--color-charcoal);
}
.field::placeholder { color: var(--color-placeholder); opacity: 1; }
.btn {
  grid-column: 2; grid-row: 1;
  position: relative; display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 24px; margin: 0; border: 0; border-radius: 3px;
  background: var(--color-terracotta); color: var(--color-warm-white);
  font: 600 15px/18px var(--font-body); cursor: pointer; white-space: nowrap;
}
.btn::after { /* state layer: 8% on hover, 10% on press */
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: currentColor; opacity: 0; transition: opacity 150ms var(--ease-standard);
}
.btn:hover::after { opacity: 0.08; }
.btn:active::after { opacity: 0.10; }
.btn:focus-visible { outline: none; }
.btn svg { flex-shrink: 0; fill: none; stroke: var(--color-warm-white); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.i-spin { display: none; stroke-width: 2.2; }
.msg { grid-column: 1 / -1; grid-row: 2; display: none; padding: 2px 16px 8px; font: 400 14px/20px var(--font-body); color: var(--color-error); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Focus: terracotta ring inside an ochre ring. */
.card:focus-within { box-shadow: 0 0 0 2px var(--color-terracotta), 0 0 0 5px var(--color-ochre-on-olive), var(--shadow-card); }
.card:focus-within .i-arrow { display: none; } /* Paper's focus state shows the button without the arrow */

/* Error: dark red ring, message under the row, no arrow. */
.card[data-state="error"] { box-shadow: 0 0 0 2px var(--color-error), var(--shadow-card); }
.card[data-state="error"] .msg { display: block; }
.card[data-state="error"] .i-arrow { display: none; }

/* Sending: spinner, "Sending…", button disabled. */
.card[data-state="sending"] .i-arrow { display: none; }
.card[data-state="sending"] .i-spin { display: block; animation: spin 900ms linear infinite; }
.card[data-state="sending"] { box-shadow: var(--shadow-card); } /* Paper: no ring while sending */
.card[data-state="sending"] .btn { cursor: progress; }
.card[data-state="sending"] .btn::after { opacity: 0; }
@keyframes spin { to { rotate: 360deg; } }

/* Sent: replaces the card. */
.sent {
  display: none; align-items: center; gap: 14px; min-height: 60px; padding: 14px 22px;
  background: var(--color-warm-white); border-radius: 4px; box-shadow: var(--shadow-card);
  font: 400 16px/24px var(--font-body); color: var(--color-charcoal); outline: none;
}
.sent p { flex: 1 1 0; }
.i-check { flex-shrink: 0; fill: none; stroke: var(--color-olive); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.signup[data-state="sent"] .card { display: none; }
.signup[data-state="sent"] .sent { display: flex; animation: fade-in 200ms var(--ease-decelerate); }
@keyframes fade-in { from { opacity: 0; } }

/* Without JavaScript the function redirects back to #sent or #signup-error. */
.signup:has(#sent:target) .card { display: none; }
#sent:target { display: flex; }
.card:has(#signup-error:target) { box-shadow: 0 0 0 2px var(--color-error), var(--shadow-card); }
#signup-error:target { display: block; }
.js .nojs { display: none; }

/* ---------- Mobile (Paper: "Splash · EN · Mobile 390") ---------- */

@media (max-width: 759px) {
  .top { height: 68px; padding-inline: 20px; }
  .wordmark { width: 130px; height: 32px; }
  .lang { gap: 8px; }

  .splash main { padding-top: 70px; padding-bottom: 22px; }
  .leaf img { flex-basis: 280px; height: 280px; min-height: 200px; }

  .headline { margin-top: 26px; font-size: 42px; line-height: 44px; }
  .headline .l { padding-right: 12px; }
  .headline .w { display: block; }
  .headline .r { padding-left: 12px; }

  .body { margin-top: 16px; font-size: 14px; line-height: 20px; }
  .body .l, .note .l { width: auto; padding: 0 12px 0 20px; justify-self: stretch; }
  .body .r, .note .r { width: auto; padding: 0 20px 0 12px; justify-self: stretch; }

  .signup { width: auto; margin: 24px 20px 0; }
  .card { grid-template-columns: 1fr; }
  .field { grid-column: 1; grid-row: auto; padding: 0 14px; }
  .msg { grid-column: 1; grid-row: auto; padding: 0 14px 4px; }
  .btn { grid-column: 1; grid-row: auto; }

  .note { margin-top: 18px; }

  .foot { height: 52px; padding: 0 20px 6px; font-size: 13px; line-height: 16px; }
  .foot .ig { gap: 8px; }
  .long { display: none; }
  .short { display: inline; }
}

/* ---------- Privacy and 404 ---------- */

.doc { background: var(--color-linen); min-height: 100vh; display: flex; flex-direction: column; }
.doc .lang { color: var(--color-charcoal); }
.doc .lang .dot { color: var(--color-terracotta); }
.doc .lang a:focus-visible, .doc .foot .ig:focus-visible { outline-color: var(--color-terracotta); }
.doc main { flex: 1 0 auto; padding: 136px 24px 72px; }
.doc article { max-width: 640px; margin: 0 auto; font: 400 16px/26px var(--font-body); }
.doc .eyebrow { font: 600 12px/16px var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-ink-soft); }
.doc h1 { margin-top: 12px; font: 400 48px/56px var(--font-display); letter-spacing: -0.02em; }
.doc .intro { margin-top: 20px; font-size: 18px; line-height: 28px; }
.doc h2 { margin-top: 40px; font: 400 26px/34px var(--font-display); }
.doc article p + p, .doc h2 + p { margin-top: 12px; }
.doc article a { text-decoration: underline 1px var(--color-terracotta); text-underline-offset: 4px; }
.doc .back { margin-top: 48px; font-weight: 500; }
.doc .foot { border-top: 1px solid #2E2E2E1F; }
.doc .foot .ig { color: var(--color-charcoal); }
.doc .foot .ig span { text-decoration-color: var(--color-terracotta); }
.doc .i-ig { stroke: var(--color-charcoal); }
.doc .i-ig .dot { fill: var(--color-charcoal); }
@media (max-width: 759px) {
  .doc main { padding-top: 104px; }
  .doc h1 { font-size: 36px; line-height: 42px; }
}

/* ---------- Reduced motion: every change is instant ---------- */

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