/*
 * Styles for the hello-uva-advanced landing page (src/index.html).
 * Visual language follows the Earlydog Bauhaus theme: cream paper, midnight
 * ink, one signal blue, Manrope 800 headings and Inter body text. The layout
 * mirrors earlydog.com: a vertical logo rail on the left, a ghost link top
 * right, a hero, alternating text/art feature rows, a finale and a blue footer.
 * Main breakpoints are the theme's own: 768, 992, 1200 and 1920 px; the
 * menu panel, top link and store list also switch at 640 and 1400 px.
 */

/*
 * Self-hosted fonts (src/assets/fonts/), split into latin and cyrillic files.
 * unicode-range lets the browser fetch only the subsets the page actually
 * renders; font-display: swap shows system text instead of blank space while
 * a file loads. index.html preloads the files used above the fold.
 */
@font-face {
  font-family: "Manrope";
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/manrope-cyrillic-800.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/manrope-latin-800.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+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter-cyrillic-400.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter-latin-400.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+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/inter-cyrillic-700.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/inter-latin-700.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+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Design tokens. Spacing tokens are overridden per breakpoint just below, so
   every component reads one variable instead of repeating media queries. */
:root {
  --color-cream-paper: #fff9f0;
  --color-cream-hover: #f0eae0;
  --color-midnight-ink: #000609;
  --color-signal-blue: #0a65db;
  --color-rule: #bab1a3;

  --font-display: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;

  --header-x: 16px;
  --header-top: 26px;
  --content-x: 0px;
  --content-top: 88px;
  --content-bottom: 120px;
}
/* --content-x is 0 on phones: the .container margin alone gives the 16px
   side gutter, matching the original's mobile layout. */
@media (min-width: 768px)  { :root { --header-x: 16px; --header-top: 42px; --content-x: 60px;  --content-top: 120px; } }
@media (min-width: 992px)  { :root { --header-x: 32px; --header-top: 44px; --content-x: 80px; } }
@media (min-width: 1200px) { :root { --header-x: 40px; --content-x: 104px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  background: var(--color-cream-paper);
  color: var(--color-midnight-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 32px;
}
@media (min-width: 1200px) { body { font-size: 18px; } }
body.menu-open { overflow: hidden; }

h1, h2, h3, p, ul { margin: 0; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 1px;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p a { color: var(--color-signal-blue); text-decoration: none; border-bottom: 1px solid currentColor; }
code {
  font-family: inherit;
  font-weight: 700;
  word-break: break-word;
}
.text-blue { color: var(--color-signal-blue); }
/* Anchor jumps from the menu leave breathing room above each section. */
[id] { scroll-margin-top: 48px; }

h1 { font-size: 52px; line-height: 60px; }
h2 { font-size: 44px; line-height: 52px; }
h3 { font-size: 32px; line-height: 40px; }
@media (min-width: 768px) {
  h1 { font-size: 72px; line-height: 80px; }
  h2 { font-size: 64px; line-height: 76px; }
  h3 { font-size: 36px; line-height: 48px; }
}
/* From the two-column hero up, the h1 scales with the viewport. A fixed 116px
   made the longest word ("приложений") wider than its grid column and push
   into the hero art between 992 and ~1300px. */
@media (min-width: 992px) {
  h1 { font-size: clamp(56px, 6.1vw, 116px); line-height: 1.04; }
}
@media (min-width: 1200px) {
  h2 { font-size: clamp(64px, 5vw, 80px); line-height: 1.1; }
  h3 { font-size: 52px; line-height: 64px; }
}

.para-lg { font-size: 20px; line-height: 32px; }
@media (min-width: 1200px) { .para-lg { font-size: 22px; line-height: 40px; } }

.content-x { margin-left: var(--content-x); margin-right: var(--content-x); }
.content-y { padding-top: var(--content-top); padding-bottom: var(--content-bottom); }
.container { max-width: 1680px; margin: 0 16px; }
@media (min-width: 768px)  { .container { margin: 0 12px; } }
@media (min-width: 992px)  { .container { margin: 0 16px; } }
@media (min-width: 1920px) { .container { margin: 0 auto; } }

/* Left rail */
.rail {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 50;
  padding-top: var(--header-top);
  margin-left: var(--header-x);
}
@media (min-width: 768px) { .rail { position: fixed; } }

.nav-toggle {
  position: relative;
  z-index: 60;
  display: block;
  height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-midnight-ink);
  cursor: pointer;
}
.nav-toggle svg { fill: currentColor; display: block; }
.nav-toggle .icon-close { display: none; }
.menu-open .nav-toggle .icon-open { display: none; }
.menu-open .nav-toggle .icon-close { display: block; }

.logo-vertical {
  display: none;
  position: fixed;
  top: 122px;
  left: var(--header-x);
  width: 32px;
  z-index: 40;
  text-decoration: none;
  color: var(--color-midnight-ink);
}
.logo-vertical img { width: 26px; margin: 0 auto 14px; }
.logo-vertical span {
  display: block;
  margin: 0 auto;
  writing-mode: vertical-rl;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  line-height: 32px;
  letter-spacing: 2px;
  text-transform: uppercase;
  white-space: nowrap;
}
@media (min-width: 768px) { .logo-vertical { display: block; } }

.logo-horizontal {
  position: absolute;
  top: calc(var(--header-top) - 2px);
  left: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.logo-horizontal img { width: 26px; }
@media (min-width: 768px) { .logo-horizontal { display: none; } }

/* Menu overlay */
.nav-menu {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: rgba(0, 6, 9, 0.4);
}
.nav-menu[hidden] { display: none; }
.nav-panel {
  width: 100vw;
  height: 100%;
  overflow-y: auto;
  background: var(--color-cream-paper);
}
@media (min-width: 640px) { .nav-panel { width: 66.666vw; } }
@media (min-width: 768px) { .nav-panel { width: 75vw; } }
.nav-items {
  display: flex;
  flex-direction: column;
  padding: 88px 0 32px 72px;
}
.nav-items > div {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 1px;
  font-size: 36px;
  line-height: 40px;
  margin-bottom: 32px;
  white-space: nowrap;
}
.nav-items a { text-decoration: none; color: var(--color-midnight-ink); }
.nav-items a:hover { color: var(--color-signal-blue); }
@media (min-width: 768px) {
  .nav-items { padding: 120px 12px 0 72px; }
  .nav-items > div { line-height: 48px; margin-bottom: 20px; }
}
@media (min-width: 992px) {
  .nav-items { padding: 120px 12px 0 223px; }
  .nav-items > div { font-size: 32px; line-height: 40px; margin-bottom: 30px; }
}
@media (min-width: 992px) and (min-height: 800px) { .nav-items > div { margin-bottom: 40px; } }

/* Top-right ghost link */
.topbar {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  padding-top: var(--header-top);
  pointer-events: none;
}
.topbar .container { text-align: right; }
.topbar .link-arrow { margin-top: 4px; pointer-events: auto; }
@media (min-width: 640px) { .topbar { display: block; } }

.link-arrow {
  display: inline-block;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  color: var(--color-midnight-ink);
}
.link-arrow .link-text { display: inline-block; border-bottom: 1px solid transparent; }
.link-arrow:hover .link-text { color: var(--color-signal-blue); border-color: var(--color-signal-blue); }
.link-arrow svg { display: inline; margin-left: 8px; margin-bottom: 0.1rem; fill: var(--color-signal-blue); }

/* Buttons */
.link-button,
.black-button {
  display: block;
  border: 3px solid var(--color-midnight-ink);
  border-radius: 9999px;
  padding: 1.35rem 1.5rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  text-decoration: none;
}
.link-button { background: var(--color-cream-paper); color: var(--color-midnight-ink); }
.link-button:hover { background: var(--color-cream-hover); }
.black-button { background: var(--color-midnight-ink); color: var(--color-cream-paper); }
.black-button:hover { background: var(--color-cream-hover); color: var(--color-midnight-ink); }
@media (min-width: 768px) {
  .link-button { display: inline-block; padding: 1.3rem 1.7rem; }
  .black-button { display: inline-block; font-size: 18px; line-height: 32px; padding: 0.85rem 1.85rem; }
}
@media (min-width: 1200px) {
  .link-button { padding: 1.25rem 1.85rem; }
  .black-button { padding: 0.9rem 1.85rem; }
}

/* Hero */
.hero { display: grid; grid-template-columns: 1fr; }
.hero img { margin-top: 40px; }
.hero .para-lg { margin-top: 40px; }
@media (min-width: 768px) {
  .hero img { margin-top: 32px; }
  .hero .para-lg { margin-top: 32px; }
}
@media (min-width: 992px) {
  .hero {
    /* minmax(0, 1fr): plain 1fr has an implicit min-content floor, so a long
       heading word would widen its column and unbalance the two halves. */
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    column-gap: 2rem;
  }
  .hero h1 { grid-column: 1; grid-row: 1; }
  .hero img { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; width: 100%; }
  .hero .para-lg { grid-column: 1; grid-row: 2; }
}

/* Alternating feature sections: art and text side by side on a 12-column
   grid from 992px; .feature-reverse mirrors the order for every other row. */
.feature { display: grid; grid-template-columns: 1fr; margin-top: 128px; }
.feature-first { margin-top: 72px; padding-top: 48px; }
.feature img { width: 100%; padding: 0 40px; }
.feature-text { margin-top: 32px; }
.feature-text p { margin-top: 8px; }
.feature-text .link-button { margin-top: 40px; }
.feature-small-art img { max-width: 360px; justify-self: center; }

.stores { list-style: none; padding: 0; margin-top: 24px; }
.stores li { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 32px; row-gap: 6px; padding: 12px 0 16px; border-top: 1px solid var(--color-rule); }
.stores li:last-child { border-bottom: 1px solid var(--color-rule); }
.stores b { flex: 0 0 100%; }
@media (min-width: 1400px) { .stores b { flex: 0 0 220px; } }

@media (min-width: 768px) {
  .feature img { max-width: 66%; padding: 0; }
}
@media (min-width: 992px) {
  .feature {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 2rem;
    align-items: center;
  }
  .feature-first { padding-top: 128px; margin-top: 72px; }
  .feature img { grid-column: 1 / span 6; grid-row: 1; max-width: 100%; padding-right: 2rem; }
  .feature-text { grid-column: 7 / span 6; grid-row: 1; margin-top: 0; }
  .feature-reverse img { grid-column: 8 / span 5; justify-self: end; padding: 0 1rem 0 0; }
  .feature-reverse .feature-text { grid-column: 1 / span 6; }
  .feature-text p { margin-top: 16px; }
  .feature-text .link-button { margin-top: 32px; }
  .feature-small-art img { max-width: 320px; justify-self: center; }
}
@media (min-width: 1200px) {
  .feature-text p { margin-top: 24px; }
  .feature-text .link-button { margin-top: 48px; }
}

/* Finale */
.finale { text-align: center; padding-bottom: 136px; }
.finale hr { border: 0; height: 1px; background: var(--color-rule); margin: 96px 0; }
.finale .black-button { margin-top: 48px; }
@media (min-width: 768px) {
  .finale { padding-bottom: 0; }
  .finale hr { margin: 120px 0; }
}
@media (min-width: 992px) {
  .finale hr { margin: 128px 0 96px; }
  .finale .black-button { margin-top: 56px; }
}

.diamonds-wrap { position: relative; }
.diamonds {
  position: absolute;
  right: 26px;
  bottom: -5px;
  width: 122px;
  height: 122px;
  transform: rotate(-45deg);
}

/* Footer */
footer {
  background: var(--color-signal-blue);
  color: var(--color-cream-paper);
  padding-top: 40px;
}
.footer-links a {
  display: block;
  margin-top: 36px;
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.footer-links a:hover { border-color: #fff; }
.footer-bottom {
  display: flex;
  justify-content: flex-start;
  margin-top: 64px;
  padding-bottom: 64px;
  font-size: 14px;
  line-height: 20px;
}
@media (min-width: 992px) {
  .footer-links { display: flex; justify-content: space-between; padding-top: 76px; }
  .footer-links a { margin-top: 0; display: inline-block; }
  .footer-bottom { justify-content: flex-end; margin-top: 96px; padding-bottom: 44px; font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
