/* Shevitsa Pilot — coming soon. Graphite, coral signal, cross-stitch. */

:root {
  --bg: #f3f4f5;
  --bg-deep: #e6e8ea;
  --ink: #16191d;
  --ink-soft: #4d545c;
  --accent: #ad3a0b;
  --logo: #16191d;
  --rose: #d4521c;
  --halo: #e0b9a7;
  --stitch: rgba(22, 25, 29, .11);
  --grain: rgba(22, 25, 29, .05);
  --serif: "EB Garamond", Garamond, "Times New Roman", serif;
  --sans: Jost, "Futura", "Century Gothic", "Avenir Next", system-ui, sans-serif;
  color-scheme: light;
}

/* dark palette: chosen with the ☀/☾ button, or by the system when nothing is chosen */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #16191d;
  --bg-deep: #0d0f12;
  --ink: #eef0f2;
  --ink-soft: #a6adb5;
  --accent: #ff7a45;
  --logo: #ff7a45;
  --rose: #ff7a45;
  --halo: #6a4234;
  --stitch: rgba(238, 240, 242, .08);
  --grain: rgba(255, 255, 255, .03);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #16191d;
    --bg-deep: #0d0f12;
    --ink: #eef0f2;
    --ink-soft: #a6adb5;
    --accent: #ff7a45;
    --logo: #ff7a45;
    --rose: #ff7a45;
    --halo: #6a4234;
    --stitch: rgba(238, 240, 242, .08);
    --grain: rgba(255, 255, 255, .03);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--ink);
  font: 400 1.125rem/1.6 var(--serif);
  background-color: var(--bg);
  /* fine dot grid like an instrument panel, under a soft vignette */
  background-image:
    radial-gradient(ellipse at 50% 30%, transparent 50%, var(--bg-deep) 125%),
    radial-gradient(var(--grain) 1px, transparent 1.5px);
  background-size: auto, 18px 18px;
}

.page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  position: relative;
}

:root {
  /* the stitch masks are inlined as data: URIs (sources: band.svg, halo.svg) so they also load when the page is opened straight from disk (file://) */
  --mask-band: url("data:image/sv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M14 8l1 1m0-1l-1 1M15 0l1 1m0-1l-1 1M15 3l1 1m0-1l-1 1M15 5l1 1m0-1l-1 1M15 8l1 1m0-1l-1 1'/%3E%3C/svg%3E");
  --mask-halo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-.5 -.5 36 36'%3E%3Cpath fill='none' stroke='%23000' stroke-width='.3' stroke-linecap='round' d='M0 17l1 1m0-1l-1 1M1 9l1 1m0-1l-1 1M1 25l1 1m0-1l-1 1M2 2l1 1m0-1l-1 1M2 5l1 1m0-1l-1 1M2 8l1 1m0-1l-1 1M2 9l1 1m0-1l-1 1M2 10l1 1m0-1l-1 1M2 24l1 1m0-1l-1 1M2 25l1 1m0-1l-1 1M2 26l1 1m0-1l-1 1M2 29l1 1m0-1l-1 1M2 32l1 1m0-1l-1 1M3 5l1 1m0-1l-1 1M3 9l1 1m0-1l-1 1M3 15l1 1m0-1l-1 1M3 16l1 1m0-1l-1 1M3 17l1 1m0-1l-1 1M3 18l1 1m0-1l-1 1M3 19l1 1m0-1l-1 1M3 25l1 1m0-1l-1 1M3 29l1 1m0-1l-1 1M4 5l1 1m0-1l-1 1M4 15l1 1m0-1l-1 1M4 19l1 1m0-1l-1 1M4 29l1 1m0-1l-1 1M5 2l1 1m0-1l-1 1M5 3l1 1m0-1l-1 1M5 4l1 1m0-1l-1 1M5 5l1 1m0-1l-1 1M5 6l1 1m0-1l-1 1M5 15l1 1m0-1l-1 1M5 19l1 1m0-1l-1 1M5 28l1 1m0-1l-1 1M5 29l1 1m0-1l-1 1M5 30l1 1m0-1l-1 1M5 31l1 1m0-1l-1 1M5 32l1 1m0-1l-1 1M6 5l1 1m0-1l-1 1M6 6l1 1m0-1l-1 1M6 7l1 1m0-1l-1 1M6 15l1 1m0-1l-1 1M6 19l1 1m0-1l-1 1M6 27l1 1m0-1l-1 1M6 28l1 1m0-1l-1 1M6 29l1 1m0-1l-1 1M7 6l1 1m0-1l-1 1M7 7l1 1m0-1l-1 1M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1 1m0-1l-1 1M15 16l1 1m0-1l-1 1M15 17l1 1m0-1l-1 1M15 18l1 1m0-1l-1 1M15 19l1 1m0-1l-1 1M15 27l1 1m0-1l-1 1M15 28l1 1m0-1l-1 1M15 29l1 1m0-1l-1 1M15 30l1 1m0-1l-1 1M15 31l1 1m0-1l-1 1M16 3l1 1m0-1l-1 1M16 7l1 1m0-1l-1 1M16 14l1 1m0-1l-1 1M16 15l1 1m0-1l-1 1M16 16l1 1m0-1l-1 1M16 17l1 1m0-1l-1 1M16 18l1 1m0-1l-1 1M16 19l1 1m0-1l-1 1M16 20l1 1m0-1l-1 1M16 27l1 1m0-1l-1 1M16 31l1 1m0-1l-1 1M17 0l1 1m0-1l-1 1M17 3l1 1m0-1l-1 1M17 7l1 1m0-1l-1 1M17 13l1 1m0-1l-1 1M17 14l1 1m0-1l-1 1M17 15l1 1m0-1l-1 1M17 16l1 1m0-1l-1 1M17 17l1 1m0-1l-1 1M17 18l1 1m0-1l-1 1M17 19l1 1m0-1l-1 1M17 20l1 1m0-1l-1 1M17 21l1 1m0-1l-1 1M17 27l1 1m0-1l-1 1M17 31l1 1m0-1l-1 1M17 34l1 1m0-1l-1 1M18 3l1 1m0-1l-1 1M18 7l1 1m0-1l-1 1M18 14l1 1m0-1l-1 1M18 15l1 1m0-1l-1 1M18 16l1 1m0-1l-1 1M18 17l1 1m0-1l-1 1M18 18l1 1m0-1l-1 1M18 19l1 1m0-1l-1 1M18 20l1 1m0-1l-1 1M18 27l1 1m0-1l-1 1M18 31l1 1m0-1l-1 1M19 3l1 1m0-1l-1 1M19 4l1 1m0-1l-1 1M19 5l1 1m0-1l-1 1M19 6l1 1m0-1l-1 1M19 7l1 1m0-1l-1 1M19 15l1 1m0-1l-1 1M19 16l1 1m0-1l-1 1M19 17l1 1m0-1l-1 1M19 18l1 1m0-1l-1 1M19 19l1 1m0-1l-1 1M19 27l1 1m0-1l-1 1M19 28l1 1m0-1l-1 1M19 29l1 1m0-1l-1 1M19 30l1 1m0-1l-1 1M19 31l1 1m0-1l-1 1M20 16l1 1m0-1l-1 1M20 17l1 1m0-1l-1 1M20 18l1 1m0-1l-1 1M21 12l1 1m0-1l-1 1M21 17l1 1m0-1l-1 1M21 22l1 1m0-1l-1 1M22 11l1 1m0-1l-1 1M22 12l1 1m0-1l-1 1M22 13l1 1m0-1l-1 1M22 21l1 1m0-1l-1 1M22 22l1 1m0-1l-1 1M22 23l1 1m0-1l-1 1M23 10l1 1m0-1l-1 1M23 11l1 1m0-1l-1 1M23 12l1 1m0-1l-1 1M23 22l1 1m0-1l-1 1M23 23l1 1m0-1l-1 1M23 24l1 1m0-1l-1 1M24 2l1 1m0-1l-1 1M24 9l1 1m0-1l-1 1M24 10l1 1m0-1l-1 1M24 11l1 1m0-1l-1 1M24 23l1 1m0-1l-1 1M24 24l1 1m0-1l-1 1M24 25l1 1m0-1l-1 1M24 32l1 1m0-1l-1 1M25 1l1 1m0-1l-1 1M25 2l1 1m0-1l-1 1M25 3l1 1m0-1l-1 1M25 8l1 1m0-1l-1 1M25 9l1 1m0-1l-1 1M25 10l1 1m0-1l-1 1M25 24l1 1m0-1l-1 1M25 25l1 1m0-1l-1 1M25 26l1 1m0-1l-1 1M25 31l1 1m0-1l-1 1M25 32l1 1m0-1l-1 1M25 33l1 1m0-1l-1 1M26 2l1 1m0-1l-1 1M26 7l1 1m0-1l-1 1M26 8l1 1m0-1l-1 1M26 9l1 1m0-1l-1 1M26 25l1 1m0-1l-1 1M26 26l1 1m0-1l-1 1M26 27l1 1m0-1l-1 1M26 32l1 1m0-1l-1 1M27 6l1 1m0-1l-1 1M27 7l1 1m0-1l-1 1M27 8l1 1m0-1l-1 1M27 15l1 1m0-1l-1 1M27 16l1 1m0-1l-1 1M27 17l1 1m0-1l-1 1M27 18l1 1m0-1l-1 1M27 19l1 1m0-1l-1 1M27 26l1 1m0-1l-1 1M27 27l1 1m0-1l-1 1M27 28l1 1m0-1l-1 1M28 5l1 1m0-1l-1 1M28 6l1 1m0-1l-1 1M28 7l1 1m0-1l-1 1M28 15l1 1m0-1l-1 1M28 19l1 1m0-1l-1 1M28 27l1 1m0-1l-1 1M28 28l1 1m0-1l-1 1M28 29l1 1m0-1l-1 1M29 2l1 1m0-1l-1 1M29 3l1 1m0-1l-1 1M29 4l1 1m0-1l-1 1M29 5l1 1m0-1l-1 1M29 6l1 1m0-1l-1 1M29 15l1 1m0-1l-1 1M29 19l1 1m0-1l-1 1M29 28l1 1m0-1l-1 1M29 29l1 1m0-1l-1 1M29 30l1 1m0-1l-1 1M29 31l1 1m0-1l-1 1M29 32l1 1m0-1l-1 1M30 5l1 1m0-1l-1 1M30 15l1 1m0-1l-1 1M30 19l1 1m0-1l-1 1M30 29l1 1m0-1l-1 1M31 5l1 1m0-1l-1 1M31 9l1 1m0-1l-1 1M31 15l1 1m0-1l-1 1M31 16l1 1m0-1l-1 1M31 17l1 1m0-1l-1 1M31 18l1 1m0-1l-1 1M31 19l1 1m0-1l-1 1M31 25l1 1m0-1l-1 1M31 29l1 1m0-1l-1 1M32 2l1 1m0-1l-1 1M32 5l1 1m0-1l-1 1M32 8l1 1m0-1l-1 1M32 9l1 1m0-1l-1 1M32 10l1 1m0-1l-1 1M32 24l1 1m0-1l-1 1M32 25l1 1m0-1l-1 1M32 26l1 1m0-1l-1 1M32 29l1 1m0-1l-1 1M32 32l1 1m0-1l-1 1M33 9l1 1m0-1l-1 1M33 25l1 1m0-1l-1 1M34 17l1 1m0-1l-1 1'/%3E%3C/svg%3E");
}

/* cross-stitch ribbon along the top and bottom edges */
.band {
  height: 18px;
  margin: 14px 0;
  background: var(--stitch);
  -webkit-mask: var(--mask-band) 0 0 / auto 100% repeat-x;
  mask: var(--mask-band) 0 0 / auto 100% repeat-x;
  -webkit-mask-position: center;
  mask-position: center;
}

/* language and theme controls, aligned with the right edge of the content */
.controls {
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 .75rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: .5rem;
  font: 600 .8rem/1 var(--sans);
  letter-spacing: .14em;
  color: var(--ink-soft);
}

.lang {
  display: flex;
  align-items: center;
  gap: .25rem;
}

.controls button {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: .55rem .4rem .4rem;
  cursor: pointer;
}

.lang button[aria-pressed="true"] { color: var(--accent); border-bottom-color: currentColor; }
.controls button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.theme-toggle {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
}
.controls .theme-toggle { padding: 0; border-bottom: 0; }
.theme-toggle:hover { color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }

/* the icon shows the theme a press switches to */
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: block; }
  :root:not([data-theme="light"]) .icon-moon { display: none; }
}

main {
  flex: 1;
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: .5rem 1.5rem 1rem;
  text-align: center;
}

/* --- logo --- */
.logo { color: var(--logo); }

.mark {
  position: relative;
  width: min(68vw, 300px);
  aspect-ratio: 1;
  margin: 0 auto;
  display: grid;
  place-items: center;
}

.halo {
  position: absolute;
  inset: 0;
  background: var(--halo);
  -webkit-mask: var(--mask-halo) center / contain no-repeat;
  mask: var(--mask-halo) center / contain no-repeat;
}

.rose {
  position: relative;
  color: var(--rose);
  width: 60%;
  height: auto;
}

/* a thin background-coloured outline keeps the rose crisp over the stitching */
.rose path {
  stroke: var(--bg);
  stroke-width: .7;
  stroke-linejoin: round;
  paint-order: stroke;
}

.name {
  display: block;
  width: min(84vw, 460px);
  height: auto;
  margin: 1.6rem auto 0;
}

.tag {
  margin: 1.1rem 0 0;
  color: var(--accent);
  font: 600 clamp(.8rem, 3.4vw, 1.05rem)/1.2 var(--sans);
  letter-spacing: .3em;
  text-transform: uppercase;
  padding-left: .3em; /* balance the trailing letter-spacing */
}

.motto {
  margin: .35rem 0 0;
  font: italic 400 clamp(1.25rem, 5vw, 1.6rem)/1.3 var(--serif);
}

/* --- intro --- */
.intro {
  max-width: 34rem;
  margin: 2.6rem auto 0;
  text-wrap: pretty;
}

.intro p { margin: 0; }
.intro strong { font-weight: 500; color: var(--accent); }

/* --- coming soon --- */
.soon {
  margin: 2.4rem 0 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .9rem;
  font: 500 clamp(1.5rem, 7.4vw, 2.75rem)/1.15 var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}

.soon::before,
.soon::after {
  content: "";
  width: 6rem;
  height: 12px;
  background: var(--stitch);
  -webkit-mask: var(--mask-band) 0 0 / auto 100% repeat-x;
  mask: var(--mask-band) 0 0 / auto 100% repeat-x;
}

/* show one language at a time once the script has picked one; without JS both stay visible */
html[data-lang="bg"] .intro [lang="en"],
html[data-lang="bg"] .soon [lang="en"],
html[data-lang="en"] .intro [lang="bg"],
html[data-lang="en"] .soon [lang="bg"] { display: none; }

html:not([data-lang]) .intro p + p { margin-top: 1rem; }

/* --- footer --- */
footer {
  text-align: center;
  padding: 0 1.5rem;
  font: 500 .85rem/1.5 var(--sans);
  letter-spacing: .08em;
  color: var(--ink-soft);
}

footer p { margin: .25rem 0; }
footer a { color: var(--accent); text-underline-offset: .2em; }
footer a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (min-width: 760px) {
  .band { height: 24px; margin: 22px 0; }
  main { padding-top: 1rem; }
  .intro { font-size: 1.25rem; }
  .soon { flex-direction: row; gap: 1.5rem; }
  .soon::before, .soon::after { width: auto; flex: 0 1 7rem; height: 14px; }
}

@media (min-width: 760px) {
  .soon span { flex: none; }
}

/* wide screens: logo on the left, words on the right */
@media (min-width: 1040px) and (min-aspect-ratio: 5/4) {
  .controls { max-width: 70rem; padding: 0 1.75rem; }
  main {
    max-width: 70rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-content: center;
    column-gap: clamp(3rem, 6vw, 6rem);
    padding: 1rem 2.5rem;
  }
  .logo { grid-row: 1 / span 2; align-self: center; }
  .mark { width: min(28vw, 360px); }
  .name { width: min(36vw, 480px); }
  .intro, .soon { text-align: left; justify-content: flex-start; }
  .intro { margin: 0; align-self: end; }
  .intro { font-size: 1.3rem; }
  .soon { flex-direction: column; align-items: flex-start; gap: 1.1rem; margin: 2rem 0 0; align-self: start; }
  .soon span { flex: initial; }
  .soon::before { width: 8rem; flex: none; }
  .soon::after { display: none; }
}
