/* Coming-soon page.
   Idea: the stairwell wall of an older apartment building. Whitewash above,
   oil-painted blue below, a darker stripe where the paint stops. What the
   product is sits on the whitewash; the invitation to building offices sits
   on the paint. The logo is a window with one lit pane; the big building on
   wide screens is an illustration of the place, not the logo. */

/* Noto Sans (Latin, Cyrillic) and Noto Sans Armenian, self-hosted, variable
   in weight and width. One family name so all three scripts match. */
@font-face {
  font-family: "Site Sans";
  src: url("fonts/noto-sans-armenian.woff2") format("woff2");
  font-weight: 400 900;
  font-stretch: 62.5% 100%;
  font-display: swap;
  unicode-range: U+0308, U+0530-058F, U+2010, U+2024, U+25CC, U+FB13-FB17;
}
@font-face {
  font-family: "Site Sans";
  src: url("fonts/noto-sans-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-stretch: 62.5% 100%;
  font-display: swap;
  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: "Site Sans";
  src: url("fonts/noto-sans-cyrillic.woff2") format("woff2");
  font-weight: 400 900;
  font-stretch: 62.5% 100%;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  --wall: #F2F3EF;         /* whitewash */
  --ink: #16242D;          /* text on the wall */
  --ink-soft: #4B5961;
  --paint: #2C5F82;        /* stairwell oil paint, the brand colour */
  --paint-edge: #1B4260;   /* the stripe where the paint stops */
  --on-paint: #F2F3EF;
  --on-paint-soft: #CFDDE7;
  --lamp: #F0A53A;         /* the lit window */

  --gutter: clamp(16px, 5vw, 56px);
  --max: 1120px;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--paint);  /* overscroll below the page stays painted */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--wall);
  color: var(--ink);
  font-family: "Site Sans", "Noto Sans", "Noto Sans Armenian", "Segoe UI", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--lamp); color: var(--ink); }

.frame {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
}

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Header ------------------------------------------------------------ */

.top {
  background: var(--wall);
  padding: clamp(12px, 3vh, 32px) var(--gutter) 0;
}

.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

/* The logo (brand/logo/tunjan-logo-inline.svg). Under 24 px tall, switch to
   tunjan-logo-small-inline.svg, which has looser letter spacing. */
.brand .logo { display: block; height: 28px; width: auto; }
@media (min-width: 700px) { .brand .logo { height: 32px; } }

.tunjan-frame { fill: var(--paint); }
.tunjan-panes { fill: var(--wall); }
.tunjan-lit, .tunjan-dot { fill: var(--lamp); }
.tunjan-word { fill: var(--ink); }

/* The pane lights first, then the dot on the j. */
.tunjan-lit { animation: lamp-on 700ms 350ms ease-out both; }
.tunjan-dot { animation: lamp-on 700ms 550ms ease-out both; }

/* The big building in the hero. Its window is lit from the start, so the logo's
   pane and dot are the page's only moment of light coming on. */
.mark-body { fill: var(--paint); }
.mark-windows { fill: var(--wall); }
.mark-lit { fill: var(--lamp); }

@keyframes lamp-on {
  0%   { fill: var(--wall); }
  35%  { fill: var(--lamp); }
  50%  { fill: var(--wall); }
  100% { fill: var(--lamp); }
}

.langs {
  display: flex;
  align-items: center;
  font-size: 0.9375rem;
  line-height: 1;
}

.langs a {
  padding: 10px 6px;
  color: var(--ink-soft);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-radius: 4px;
}

.langs a:hover { color: var(--ink); }

.langs a[aria-current="true"] {
  color: var(--ink);
  font-weight: 750;
  text-decoration: underline;
  text-decoration-color: var(--paint);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.langs .sep { color: var(--ink-soft); opacity: 0.55; }

/* Main: the wall (hero) above, the paint (invite) below ---------------- */

main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

.hero {
  flex: 3 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--wall);
  padding: clamp(20px, 5vh, 96px) var(--gutter) clamp(24px, 5vh, 64px);
  position: relative;
}

/* The big building stands on the line where the paint starts. Wide screens only.
   An SVG ignores top + bottom, so its height is set outright. The drawing sits
   bottom right, so a short window gets a smaller building instead of an overlap.
   Its width is whatever the text leaves: 6.3 h1 is the widest headline (Russian),
   31 lead-size em is the lead's max width. Re-measure if the headline changes. */
.hero-building { display: none; }
@media (min-width: 1100px) {
  .hero-building {
    display: block;
    position: absolute;
    top: clamp(20px, 5vh, 96px);
    height: calc(100% - clamp(20px, 5vh, 96px));
    right: max(var(--gutter), calc((100% - var(--max)) / 2));
    width: max(0px, min(420px, calc(min(100% - 2 * var(--gutter), var(--max))
      - max(6.3 * clamp(2.5rem, min(14vw, 13vh), 7.5rem), 31 * clamp(1.0625rem, 0.4vw + 0.95rem, 1.3125rem))
      - 48px)));
  }
}

/* Width-bound on phones (the longest line, Russian, must fit 320 px),
   height-bound on laptops so a short window doesn't scroll. */
h1 {
  margin: 0;
  font-weight: 800;
  font-stretch: 75%;
  font-size: clamp(2.5rem, min(14vw, 13vh), 7.5rem);
  line-height: 0.94;
  letter-spacing: -0.012em;
  color: var(--ink);
}

h1 span { display: block; }

.lead {
  margin: clamp(12px, 2.4vh, 28px) 0 0;
  max-width: 31em;
  font-size: clamp(1.0625rem, 0.4vw + 0.95rem, 1.3125rem);
  line-height: 1.5;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.invite {
  flex: 2 1 auto;
  background: var(--paint);
  color: var(--on-paint);
  border-top: 6px solid var(--paint-edge);
  padding: clamp(24px, 5.5vh, 72px) var(--gutter) clamp(16px, 3vh, 40px);
}

.invite h2 {
  margin: 0 0 0.5em;
  max-width: 22em;
  font-weight: 750;
  font-stretch: 87.5%;
  font-size: clamp(1.5rem, 1vw + 1.05rem, 2.125rem);
  line-height: 1.12;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

.invite-text {
  margin: 0;
  max-width: 40em;
  text-wrap: pretty;
  font-size: clamp(1rem, 0.25vw + 0.95rem, 1.125rem);
  line-height: 1.55;
  color: var(--on-paint-soft);
}

.contact-row { margin: clamp(16px, 3vh, 28px) 0 0; }

.contact {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 4px;
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.2;
}

a.contact {
  background: var(--wall);
  color: var(--ink);
  text-decoration: none;
}

a.contact:hover { background: #FFFFFF; }

a.contact svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}

/* While there's no address: a plain line, not a box that looks like a broken
   button. The small square is a lit window. */
.contact.is-placeholder {
  min-height: 0;
  padding: 0;
  color: var(--on-paint-soft);
  font-weight: 600;
}
.contact.is-placeholder::before {
  content: "";
  width: 10px;
  height: 8px;
  background: var(--lamp);
  flex: none;
}

.invite :focus-visible { outline-color: var(--lamp); }

/* Footer: still on the paint ------------------------------------------- */

.foot {
  background: var(--paint);
  color: var(--on-paint-soft);
  padding: 0 var(--gutter) clamp(14px, 2.5vh, 28px);
  font-size: 0.875rem;
}

.foot small { font-size: inherit; }

.noscript { padding: 24px var(--gutter); }

/* Phones: a tighter language switch ------------------------------------ */

@media (max-width: 480px) {
  .langs { font-size: 0.875rem; }
  .langs a { padding: 10px 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .tunjan-lit, .tunjan-dot { animation: none; }
}
