/* Cannes Lions Armenia. Typographic poster on the Cannes Lions 2026 palette: off-white, charcoal, one yellow accent,
   deep blue with white only, sharp corners. Archivo (Latin, variable: weight + width), Noto Sans Armenian (Armenian). */

@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url("/fonts/Archivo-VF.woff2") format("woff2-variations"), url("/fonts/Archivo-VF.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-style: italic; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url("/fonts/Archivo-Italic-VF.woff2") format("woff2-variations"), url("/fonts/Archivo-Italic-VF.woff2") format("woff2"); }
@font-face { font-family: "Noto Sans Armenian"; font-weight: 400; font-display: swap; src: url("/fonts/armenian-400.ttf") format("truetype"); }
@font-face { font-family: "Noto Sans Armenian"; font-weight: 600; font-display: swap; src: url("/fonts/armenian-600.ttf") format("truetype"); }
@font-face { font-family: "Noto Sans Armenian"; font-weight: 800; font-display: swap; src: url("/fonts/armenian-800.ttf") format("truetype"); }
@font-face { font-family: "Noto Sans Armenian"; font-weight: 900; font-display: swap; src: url("/fonts/armenian-900.ttf") format("truetype"); }

:root {
  color-scheme: light dark;
  --font-latin: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-armenian: "Noto Sans Armenian", "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --offwhite: #f4f4f4;
  --charcoal: #2e2e2e;
  --accent: #f9bd59;
  --accent-hover: #ecd57a;
  --accent-ink: #2e2e2e;
  --blue: #2f6f94;
  --blue-deep: #183b4e;
  --sky: #bbcdd8;

  --bg: var(--offwhite);
  --ink: var(--charcoal);
  --ink-2: #5b5858;
  --ink-3: #726f70;
  --line: rgb(46 46 46 / 0.14);
  --line-strong: rgb(46 46 46 / 0.4);
  --accent-text: var(--blue);
  --accent-text-inverse: var(--accent);
  --tile-hover: var(--accent);

  --nav-h: 84px;
  --gutter: clamp(1rem, 4vw, 3rem);
  --container: 1360px;
  --gap: clamp(1rem, 2.5vw, 2rem);
  --section: clamp(4.5rem, 9vw, 8.5rem);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.45s;

  --t-base: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --t-lg: clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem);
  --t-xl: clamp(1.375rem, 1.2rem + 0.8vw, 1.875rem);
  --t-2xl: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem);
  --t-h2: clamp(2.25rem, 1.2rem + 3.2vw, 4.5rem);
  --t-h1: clamp(2.5rem, 0.9rem + 5.2vw, 5.4rem);
  --t-contact: clamp(3rem, 1rem + 7.5vw, 8rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #232323;
    --ink: var(--offwhite);
    --ink-2: #c9c6c7;
    --ink-3: #a4a0a1;
    --line: rgb(244 244 244 / 0.16);
    --line-strong: rgb(244 244 244 / 0.4);
    --accent-text: var(--sky);
    --tile-hover: #3a3a3a;
  }
  .brand__logo, .notfound__brand img { filter: invert(1); }
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 1rem); overflow-x: clip; }
body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-latin);
  font-size: var(--t-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body:lang(hy) { font-family: var(--font-armenian); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { list-style: none; padding: 0; }
dd { margin: 0; }
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* Type */
h1, h2, h3 { font-weight: 900; line-height: 1; letter-spacing: -0.02em; text-wrap: balance; overflow-wrap: anywhere; }
:lang(en) h1, :lang(en) h2 { font-stretch: 118%; }
:lang(en) h3 { font-stretch: 112%; font-weight: 800; letter-spacing: -0.01em; }
:lang(hy) h1, :lang(hy) h2 { letter-spacing: -0.01em; line-height: 1.08; }
:lang(hy) h3 { font-weight: 800; letter-spacing: 0; line-height: 1.2; }
.h2 { font-size: var(--t-h2); }
:lang(hy) .h2 { font-size: clamp(2rem, 1rem + 2.8vw, 3.75rem); }
.lead { font-size: var(--t-lg); line-height: 1.45; max-width: 46rem; text-wrap: pretty; }
.small { font-size: 0.875rem; color: var(--ink-2); }
.num { font-family: var(--font-latin); font-stretch: 112%; font-weight: 900; font-variant-numeric: tabular-nums; }
p { text-wrap: pretty; }

/* Layout */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding: var(--section) 0; border-top: 1px solid var(--line); }
.section__head { max-width: 58rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section__head .h2 { margin-bottom: 1.25rem; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; top: 0.5rem; left: 0.5rem; z-index: 100; padding: 0.75rem 1rem; background: var(--accent); color: var(--accent-ink); font-weight: 700; transform: translateY(-200%); }
.skip:focus { transform: none; }

/* Buttons and links */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 3.25rem; padding: 0 1.5rem;
  font-weight: 800; font-size: 0.95rem; line-height: 1; white-space: nowrap;
  border: 1px solid transparent;
  transition: background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out), transform 0.15s var(--ease-out);
}
:lang(en) .btn { font-stretch: 108%; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.8rem; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--outline { border-color: var(--ink); color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--bg); }
.btn--lg { min-height: 3.75rem; padding: 0 2rem; }

.link-arrow { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; color: var(--accent-text); padding-bottom: 0.15rem; border-bottom: 1px solid currentColor; }
.link-arrow .icon { width: 1.1em; height: 1.1em; transition: transform 0.3s var(--ease-out); }
.link-arrow:hover .icon { transform: translate(0.15em, -0.15em); }
.icon { fill: currentColor; flex: none; }

/* Header */
[data-header-sentinel] { position: absolute; top: 0; left: 0; width: 1px; height: 1px; pointer-events: none; }
.header { position: sticky; top: 0; z-index: 50; background: var(--bg); transition: box-shadow 0.3s; }
.header.is-scrolled { box-shadow: 0 1px 0 var(--line); }
.header__inner { display: flex; align-items: center; gap: 2rem; height: var(--nav-h); }
.brand { display: block; flex: none; }
.brand__logo { height: calc(var(--nav-h) - 22px); width: auto; }
.nav { margin-left: auto; display: flex; align-items: center; gap: clamp(1rem, 2vw, 2rem); }
.nav__link { font-weight: 700; font-size: 0.95rem; padding: 0.4rem 0; border-bottom: 2px solid transparent; transition: border-color 0.25s var(--ease-out); }
:lang(en) .nav__link { font-stretch: 106%; }
.nav__link:hover { border-color: var(--ink); }
.nav__langs { display: flex; gap: 0.9rem; margin-left: 0.5rem; padding-left: 1.5rem; border-left: 1px solid var(--line-strong); }
.nav__lang { font-size: 0.9rem; color: var(--ink-2); }
.nav__lang[aria-current] { color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 0.35em; }
.menu { display: none; }

/* Hero: headline across the page, copy bottom-left, the lion bottom-right. */
.hero { overflow: hidden; }
.hero__inner { display: flex; flex-direction: column; min-height: min(calc(100dvh - var(--nav-h)), 860px); padding: clamp(2rem, 4vw, 3.5rem) 0 clamp(2.5rem, 5vw, 4rem); }
.hero__title { font-size: var(--t-h1); line-height: 0.98; }
:lang(hy) .hero__title { font-size: clamp(2.2rem, 0.8rem + 4.8vw, 5rem); }
.line { display: block; overflow: hidden; margin-bottom: -0.12em; }
.line__in { display: block; padding-bottom: 0.12em; will-change: transform; }
.hero__row { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); align-items: start; margin-top: auto; padding-top: clamp(2rem, 4vw, 3rem); }
.hero__copy { grid-column: 1 / 7; padding-top: 0.5rem; }
.hero__lead { margin-bottom: 2rem; max-width: 34rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero__lion { grid-column: 8 / -1; justify-self: end; width: 100%; max-width: 600px; color: var(--ink); }
.hero__lion .lion-svg { width: 100%; height: auto; max-height: min(58vh, 600px); margin-left: auto; }

/* Stats band: deep blue with white only. */
.stats { background: var(--blue-deep); color: #fff; padding: clamp(2.5rem, 5vw, 4rem) 0; }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.stat { display: flex; flex-direction: column; gap: 0.6rem; padding-left: 1.25rem; border-left: 1px solid rgb(255 255 255 / 0.3); }
.stat__value { font-size: clamp(2.75rem, 1.5rem + 3.5vw, 5rem); line-height: 1; font-stretch: 118%; letter-spacing: -0.03em; }
.stat__label { font-size: 0.95rem; line-height: 1.4; color: rgb(255 255 255 / 0.82); max-width: 18rem; }

/* Festival: heading + lead, then four facts on a strong top rule. */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); margin-bottom: 2.75rem; }
.fact { border-top: 1px solid var(--ink); padding-top: 1rem; }
.fact__term { font-weight: 700; color: var(--accent-text); margin-bottom: 0.5rem; }
.fact__text { color: var(--ink-2); }

/* Young Lions: one grid, twelve cells. The format tile (yellow, 2x2), Film (2x1) and six more competitions. */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(13.5rem, auto); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 2.75rem; }
.tile { position: relative; isolation: isolate; overflow: hidden; background: var(--bg); padding: 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; }
.tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--tile-hover); transform: scaleY(0); transform-origin: bottom; transition: transform 0.5s var(--ease-out); }
@media (hover: hover) { .tile:hover::before { transform: scaleY(1); } }
.tile__name { font-size: var(--t-2xl); }
:lang(hy) .tile__name { font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem); }
:lang(hy) .activity__title { font-size: var(--t-lg); }
.tile__task { color: var(--ink-2); max-width: 22rem; }
.tile__hours { margin-top: auto; font-size: 0.9rem; font-weight: 700; color: var(--ink-2); font-stretch: 100%; }
.tile--wide { grid-column: span 2; }
.tile--rules { grid-column: span 2; grid-row: span 2; background: var(--accent); --ink: #2e2e2e; --ink-2: #4a4747; color: var(--ink); }
.tile--rules::before { display: none; }
.rules { margin-top: 0.75rem; }
.rule { border-top: 1px solid rgb(46 46 46 / 0.25); padding: 0.9rem 0; }
.rule:last-child { padding-bottom: 0; }
.rule__title { font-size: var(--t-lg); margin-bottom: 0.2rem; }
.rule__text { color: var(--ink-2); font-size: 0.95rem; max-width: 30rem; }

/* Competition: the charcoal block. Giant date on the left, body on the right, steps across the bottom. */
.competition { --bg: var(--charcoal); --ink: var(--offwhite); --ink-2: #c9c6c7; --ink-3: #a4a0a1; --line: rgb(244 244 244 / 0.18); --accent-text: var(--accent-text-inverse); background: var(--bg); color: var(--ink); border-top: 0; }
.competition__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); }
.competition__date { grid-column: 1 / 5; display: flex; flex-direction: column; color: var(--accent); }
.competition__day { font-size: clamp(7rem, 3rem + 16vw, 19rem); line-height: 0.85; letter-spacing: -0.05em; font-stretch: 125%; margin-left: -0.05em; }
.competition__month { font-size: var(--t-xl); font-weight: 700; color: var(--ink); margin-top: 1rem; padding-top: 0.9rem; border-top: 1px solid var(--line); }
.competition__body { grid-column: 6 / -1; }
.competition__body .h2 { margin-bottom: 1.25rem; }
.meta { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; margin: 2rem 0; }
.meta__item dt { font-size: 0.85rem; color: var(--ink-3); margin-bottom: 0.2rem; }
.meta__item dd { font-size: var(--t-lg); font-weight: 700; }
.competition__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1.25rem; }
.competition__note { color: var(--ink-3); }
.competition__message { font-size: var(--t-lg); font-weight: 700; max-width: 32rem; }
.steps { grid-column: 1 / -1; position: relative; margin-top: clamp(2.5rem, 5vw, 4.5rem); border-top: 1px solid var(--line); }
.steps__line { position: absolute; top: -1px; left: 0; width: 100%; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.steps__list { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); padding-top: 1.75rem; }
.step { display: grid; gap: 0.5rem; align-content: start; }
.step__index { font-size: 0.9rem; color: var(--ink-3); transition: color 0.3s; }
.step.is-active .step__index { color: var(--accent); }
.step__title { font-size: var(--t-xl); }
.step__text { color: var(--ink-2); max-width: 24rem; }

/* Representation: activities as a structured list, the two representatives beside it. */
.representation__grid { display: grid; grid-template-columns: 7fr 4fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.activity { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 2rem; padding: 1.5rem 0; border-top: 1px solid var(--line); }
.activity:last-child { border-bottom: 1px solid var(--line); }
.activity__title { font-size: var(--t-xl); }
.activity__text { color: var(--ink-2); }
.people { border-top: 1px solid var(--ink); padding-top: 1.5rem; }
.people__title { font-size: 0.95rem; font-weight: 700; color: var(--accent-text); margin-bottom: 1rem; }
.people__list { margin-bottom: 1.5rem; }
.people__name { font-size: var(--t-2xl); font-weight: 900; line-height: 1.1; padding: 0.4rem 0; letter-spacing: -0.02em; }
:lang(en) .people__name { font-stretch: 118%; }
.people__links { display: flex; flex-direction: column; align-items: flex-start; gap: 0.75rem; }

/* Contact: the yellow band. Charcoal on yellow, no blue here. */
.contact { background: var(--accent); color: var(--charcoal); --ink: #2e2e2e; --ink-2: #4a4747; --line: rgb(46 46 46 / 0.25); --accent-text: #2e2e2e; padding: var(--section) 0; }
.contact__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); align-items: end; }
.contact__title { grid-column: 1 / -1; font-size: var(--t-contact); line-height: 0.95; margin-bottom: 0.5rem; }
:lang(en) .contact__title { font-stretch: 125%; }
:lang(hy) .contact__title { font-size: clamp(2.5rem, 1rem + 6vw, 6.5rem); }
.contact__copy { grid-column: 1 / 7; }
.contact__links { grid-column: 8 / -1; }
.contact__link { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--line); font-size: var(--t-2xl); font-weight: 800; }
:lang(en) .contact__link { font-stretch: 112%; }
.contact__links li:last-child .contact__link { border-bottom: 1px solid var(--line); }
.contact__link .icon { width: 1em; height: 1em; transition: transform 0.3s var(--ease-out); }
.contact__link:hover .icon { transform: translate(0.15em, -0.15em); }

/* Footer */
.footer { background: var(--charcoal); color: var(--offwhite); --line: rgb(244 244 244 / 0.18); padding: 3rem 0 1.75rem; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--gap); }
.footer__brand { display: grid; gap: 0.4rem; align-content: start; }
.footer__lion .lion-svg { width: 52px; height: auto; margin-bottom: 0.75rem; }
.footer__name { font-weight: 800; }
.footer__note { color: #c9c6c7; font-size: 0.9rem; max-width: 20rem; }
.footer__nav, .footer__aside { display: flex; flex-direction: column; gap: 0.6rem; font-size: 0.95rem; }
.footer__nav a:hover, .footer__aside a:hover { text-decoration: underline; text-underline-offset: 0.25em; }
.footer__legal { grid-column: 1 / -1; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: 0.85rem; color: #a4a0a1; }

/* 404 */
.notfound__main { padding: 4rem 0; display: grid; gap: 3rem; max-width: 44rem; }
.notfound__brand img { height: 110px; width: auto; }
.notfound__block { display: grid; gap: 1rem; justify-items: start; }

/* Motion: initial states only when motion is allowed and JS runs (html.motion). GSAP animates to the final state. */
.motion [data-hero-headline] .line__in { transform: translateY(110%); }
.motion [data-hero-item] { opacity: 0; transform: translateY(18px); }
.motion [data-hero-media] { clip-path: inset(0 0 0 100%); }
.motion [data-reveal] { opacity: 0; transform: translateY(24px); }

/* Responsive */
@media (max-width: 1023px) {
  :root { --nav-h: 68px; }
  .menu { display: flex; align-items: center; gap: 0.6rem; margin-left: auto; min-height: 44px; font-weight: 700; }
  .menu__icon { width: 22px; display: grid; gap: 6px; }
  .menu__icon i { height: 2px; background: currentColor; transition: transform 0.3s var(--ease-out); }
  .menu[aria-expanded="true"] .menu__icon i:first-child { transform: translateY(4px) rotate(45deg); }
  .menu[aria-expanded="true"] .menu__icon i:last-child { transform: translateY(-4px) rotate(-45deg); }
  .nav { position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0; margin: 0; background: var(--bg); flex-direction: column; align-items: stretch; gap: 0; padding: 1rem var(--gutter) 2rem; overflow: auto; transform: translateX(100%); visibility: hidden; transition: transform 0.45s var(--ease-out), visibility 0s 0.45s; }
  .nav.is-open { transform: none; visibility: visible; transition: transform 0.45s var(--ease-out); }
  .nav__link { font-size: var(--t-2xl); font-weight: 900; padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
  :lang(en) .nav__link { font-stretch: 118%; }
  .nav__link:hover { border-color: var(--line); }
  .nav__langs { margin: 1.5rem 0 0; padding: 0; border: 0; gap: 1.5rem; }
  .nav__lang { font-size: var(--t-lg); }
  body.menu-open { overflow: hidden; }

  .hero__inner { min-height: 0; }
  .hero__copy { grid-column: 1 / 8; }
  .hero__lion { grid-column: 8 / -1; }
  .stats__grid { grid-template-columns: 1fr 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .tiles { grid-template-columns: 1fr 1fr; grid-auto-rows: minmax(11rem, auto); }
  .tile--rules { grid-row: auto; }
  .competition__date, .competition__body { grid-column: 1 / -1; }
  .competition__date { flex-direction: row; align-items: baseline; gap: 1.5rem; }
  .competition__month { margin: 0; padding: 0; border: 0; }
  .representation__grid { grid-template-columns: 1fr; }
  .contact__copy, .contact__links { grid-column: 1 / -1; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 767px) {
  .hero__inner { min-height: 0; }
  .hero__row { display: flex; flex-direction: column; align-items: stretch; }
  .hero__lion { width: 62%; align-self: flex-end; margin-top: 2rem; }
  .hero__lion .lion-svg { max-height: 40vh; }
  .stats__grid { gap: 1.5rem; }
  .stat__value { font-size: 2.5rem; }
  .stat__label { font-size: 0.875rem; }
  .facts, .tiles, .steps__list { grid-template-columns: 1fr; }
  .tiles { grid-auto-rows: auto; }
  .tile { min-height: 10rem; }
  .tile--rules, .tile--wide { grid-column: auto; }
  .competition__date { flex-direction: column; gap: 0; }
  .competition__month { margin-top: 0.5rem; }
  .activity { grid-template-columns: 1fr; gap: 0.5rem; }
  .meta { gap: 1.25rem 2rem; }
  .footer__grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; transition-delay: 0s !important; animation: none !important; }
}
