:root {
  --bg: #070705;
  --ivory: #f1ece2;
  --ivory-soft: rgba(241, 236, 226, 0.76);
  --ivory-faint: rgba(241, 236, 226, 0.42);
  --ink: #11100e;
  --line: rgba(241, 236, 226, 0.58);
  --ease-out: cubic-bezier(.2,.75,.25,1);
  --shell-pad-x: clamp(20px, 5.2vw, 42px);
  --safe-top: max(18px, env(safe-area-inset-top));
  --safe-bottom: max(16px, env(safe-area-inset-bottom));

  /* Set dynamically from landing.config.js -> media.appearance */
  --media-opacity: .92;
  --media-blur: 1.25px;
  --media-brightness: .82;
  --media-saturation: .90;
  --media-scale: 1.012;
  --overlay-top: .12;
  --overlay-middle: .18;
  --overlay-bottom: .58;
  --overlay-vignette: .14;
  --overlay-desktop-sides: .16;
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--bg);
}

body {
  overflow: hidden;
  color: var(--ivory);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }

.landing {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100svh;
  min-height: 610px;
  overflow: hidden;
  background: var(--bg);
}

.media,
.media__visual,
.media__poster,
.media__poster img,
.media__video,
.media__veil,
.media__grain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.media { z-index: -3; overflow: hidden; background: #080806; }

/*
 * The poster and video live in one visual layer. Applying opacity/filtering
 * here guarantees the still frame and moving video look identical and avoids
 * a brightness jump when autoplay starts.
 */
.media__visual {
  z-index: 0;
  opacity: var(--media-opacity);
  filter:
    blur(var(--media-blur))
    brightness(var(--media-brightness))
    saturate(var(--media-saturation));
  transform: scale(var(--media-scale));
  transform-origin: center center;
  will-change: filter, opacity, transform;
}

.media__poster { display: block; z-index: 0; }
.media__poster img,
.media__video { object-fit: cover; object-position: 50% 50%; }
.media__poster img { display: block; }

.media__video {
  z-index: 1;
  opacity: 0;
  transition: opacity 900ms var(--ease-out);
}
.media__video.is-ready { opacity: 1; }

.media__veil {
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg,
      rgba(0, 0, 0, var(--overlay-top)) 0%,
      rgba(0, 0, 0, var(--overlay-middle)) 48%,
      rgba(0, 0, 0, var(--overlay-bottom)) 100%),
    radial-gradient(ellipse at 50% 45%, transparent 30%, rgba(0, 0, 0, var(--overlay-vignette)) 100%);
}

.media__grain {
  z-index: 3;
  pointer-events: none;
  opacity: .09;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.shell {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: calc(var(--safe-top) + 8px) var(--shell-pad-x) calc(var(--safe-bottom) + 10px);
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  direction: ltr;
  opacity: 0;
  transform: translateY(-8px);
  animation: reveal .72s .12s var(--ease-out) forwards;
}

.language {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  direction: ltr;
}

.language__item {
  appearance: none;
  border: 0;
  padding: 7px 0;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .30em;
  opacity: .55;
  transition: opacity 180ms ease;
}
.language__item.is-active { opacity: 1; }
.language__item:hover { opacity: 1; }
.language__item:focus-visible,
.menu-cta:focus-visible {
  outline: 2px solid var(--ivory);
  outline-offset: 4px;
}

.language__divider {
  width: 1px;
  height: 14px;
  background: var(--line);
}

.icon-link {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  opacity: .94;
  transition: opacity 180ms ease, transform 180ms ease;
}
.icon-link:hover { opacity: 1; transform: translateY(-1px); }
.icon-link svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}
.icon-link .icon-fill { fill: currentColor; stroke: none; }

.content {
  display: grid;
  align-content: center;
  justify-items: center;
  padding-top: clamp(12px, 2.2vh, 26px);
}

.brand {
  text-align: center;
  direction: ltr;
  margin-bottom: clamp(18px, 2.8vh, 30px);
  opacity: 0;
  transform: translateY(10px);
  animation: reveal .9s .22s var(--ease-out) forwards;
}

.brand__identity {
  min-height: clamp(44px, 11vw, 70px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand__logo {
  display: block;
  width: auto;
  height: auto;
  max-width: min(56vw, 210px);
  max-height: clamp(54px, 13vw, 84px);
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 3px 24px rgba(0,0,0,.22));
}

.brand__logo[hidden],
.brand__word[hidden],
.brand__rule[hidden],
.brand__descriptor[hidden] {
  display: none !important;
}

.brand__word {
  font-size: clamp(38px, 9vw, 64px);
  font-weight: 300;
  line-height: .95;
  letter-spacing: .17em;
  margin-right: -.17em;
  text-shadow: 0 3px 24px rgba(0,0,0,.24);
}

.brand__rule {
  display: block;
  width: 26px;
  height: 1px;
  margin: 14px auto 13px;
  background: rgba(255,255,255,.84);
}

.brand__descriptor {
  white-space: nowrap;
  font-size: clamp(8px, 2vw, 10px);
  font-weight: 500;
  letter-spacing: .30em;
  margin-top: 9px;
  margin-right: -.30em;
  color: rgba(255,255,255,.92);
}

.statement {
  text-align: center;
  direction: ltr;
  opacity: 0;
  transform: translateY(14px);
  animation: reveal 1s .38s var(--ease-out) forwards;
}

.statement__title {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", "Arial Narrow", sans-serif;
  font-size: clamp(58px, 16.7vw, 106px);
  font-stretch: condensed;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.015em;
  color: #f3eee5;
  text-transform: uppercase;
  text-shadow: 0 3px 30px rgba(0,0,0,.26);
}
.statement__title span { display: block; }

.statement__tagline {
  margin: clamp(12px, 1.8vh, 18px) 0 0;
  font-size: clamp(10px, 2.4vw, 11px);
  line-height: 1;
  font-weight: 500;
  letter-spacing: .22em;
  margin-right: -.22em;
  color: rgba(255,255,255,.94);
  white-space: nowrap;
}
.statement__tagline span { padding: 0 .20em 0 .04em; }

.actions {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: clamp(16px, 2.3vh, 22px);
  opacity: 0;
  transform: translateY(12px);
  animation: reveal .9s .55s var(--ease-out) forwards;
}

.menu-cta {
  position: relative;
  width: min(calc(100% - 18px), 420px);
  min-height: 59px;
  padding: 0 24px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  background: rgba(243, 238, 229, .97);
  color: var(--ink);
  box-shadow: 0 14px 36px rgba(0,0,0,.25), inset 0 0 0 1px rgba(255,255,255,.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 220ms var(--ease-out), background 220ms ease, box-shadow 220ms ease;
  direction: rtl;
}
.menu-cta:hover {
  transform: translateY(-2px);
  background: #f7f2e9;
  box-shadow: 0 18px 42px rgba(0,0,0,.32), inset 0 0 0 1px rgba(255,255,255,.55);
}
.menu-cta:active { transform: translateY(0) scale(.992); }

.menu-cta__label {
  text-align: center;
  font-family: Tahoma, "Segoe UI", sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  direction: auto;
  unicode-bidi: plaintext;
}
.menu-cta__label.is-latin {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: .16em;
}

.menu-cta__arrow {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: scaleX(-1);
}
html[dir="ltr"] .menu-cta__arrow { transform: none; }

.quick-actions {
  width: min(100%, 450px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid rgba(255,255,255,.18);
  border-bottom: 1px solid rgba(255,255,255,.13);
  background: rgba(0,0,0,.08);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.quick-action {
  position: relative;
  min-width: 0;
  min-height: 58px;
  padding: 10px 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(255,255,255,.88);
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}
.quick-action:nth-child(odd) { border-inline-end: 1px solid rgba(255,255,255,.13); }
.quick-action:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.13); }
.quick-action:hover {
  color: #fff;
  background: rgba(255,255,255,.07);
}
.quick-action:active { transform: scale(.985); }
.quick-action.is-unconfigured { color: rgba(255,255,255,.84); }

.quick-action svg {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.quick-action svg .icon-fill { fill: currentColor; stroke: none; }
.quick-action__text {
  min-width: 0;
  display: grid;
  gap: 2px;
  text-align: start;
}
.quick-action__text strong,
.quick-action__text small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: Tahoma, "Segoe UI", sans-serif;
  font-style: normal;
}
.quick-action__text strong {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.22;
}
.quick-action__text small {
  font-size: 10px;
  font-weight: 400;
  line-height: 1.25;
  color: rgba(255,255,255,.62);
}
.quick-action__text .is-latin {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .09em;
}
.quick-action__text strong.is-latin { font-size: 10.5px; font-weight: 650; }
.quick-action__text small.is-latin { font-size: 8.5px; }


.config-toast {
  position: absolute;
  z-index: 30;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  width: max-content;
  max-width: calc(100% - 40px);
  padding: 9px 14px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: rgba(10,10,8,.88);
  color: rgba(255,255,255,.92);
  box-shadow: 0 10px 30px rgba(0,0,0,.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: Tahoma, "Segoe UI", sans-serif;
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 180ms ease, transform 180ms ease;
}
.config-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }


.transition {
  position: absolute;
  z-index: 20;
  inset: 0;
  pointer-events: none;
  background: #080806;
  opacity: 0;
  transition: opacity 280ms ease;
}
.transition.is-active { opacity: 1; }

@keyframes reveal {
  to { opacity: 1; transform: translateY(0); }
}

@media (max-height: 730px) and (max-width: 767px) {
  .content { padding-top: 6px; }
  .brand { margin-bottom: 15px; }
  .brand__identity { min-height: 40px; }
  .brand__logo { max-height: 66px; }
  .brand__descriptor { margin-top: 7px; }
  .statement__title { font-size: clamp(54px, 15.5vw, 74px); }
  .statement__tagline { margin-top: 10px; font-size: 9.5px; }
  .menu-cta { min-height: 54px; }
  .actions { gap: 12px; }
  .quick-action { min-height: 50px; padding: 7px 8px; }
  .quick-action svg { width: 20px; height: 20px; }
  .quick-action__text strong { font-size: 12px; }
  .quick-action__text small { font-size: 9px; }
}

@media (min-width: 768px) {
  :root { --shell-pad-x: clamp(38px, 5vw, 72px); }

  .landing { min-height: 680px; }
  .media__poster img,
  .media__video { object-position: 50% 52%; }

  .media__veil {
    background:
      linear-gradient(90deg,
        rgba(0,0,0,var(--overlay-desktop-sides)) 0%,
        rgba(0,0,0,0) 30%,
        rgba(0,0,0,0) 70%,
        rgba(0,0,0,var(--overlay-desktop-sides)) 100%),
      linear-gradient(180deg,
        rgba(0,0,0,var(--overlay-top)) 0%,
        rgba(0,0,0,var(--overlay-middle)) 48%,
        rgba(0,0,0,var(--overlay-bottom)) 100%),
      radial-gradient(ellipse at 50% 45%, transparent 32%, rgba(0,0,0,var(--overlay-vignette)) 100%);
  }

  /*
   * Desktop is an independent composition, not a stretched mobile layout.
   * Keep the interface in the calm central area of the media and size it
   * against both viewport width and height so short/wide screens cannot clip.
   */
  .shell {
    max-width: 1440px;
    grid-template-rows: auto minmax(0, 1fr) auto;
    padding-top: calc(var(--safe-top) + 6px);
    padding-bottom: calc(var(--safe-bottom) + 8px);
  }

  .topbar { padding-top: 2px; }
  .language__item { font-size: 12px; }

  .content {
    min-height: 0;
    align-content: center;
    justify-items: center;
    padding: clamp(8px, 1.5vh, 16px) 0;
  }

  .brand {
    margin: 0 0 clamp(14px, 1.8vh, 20px);
    text-align: center;
  }
  .brand__identity {
    justify-content: center;
    min-height: clamp(58px, 8.5vh, 84px);
  }
  .brand__logo {
    max-width: min(26vw, 270px);
    max-height: min(100px, 10.5vh);
    object-position: center;
  }
  .brand__word {
    font-size: clamp(48px, min(5.2vw, 8vh), 76px);
  }
  .brand__rule { margin-inline: auto; }
  .brand__descriptor {
    margin-top: clamp(6px, .8vh, 9px);
    font-size: clamp(8px, min(.72vw, 1.2vh), 10px);
  }

  .statement { text-align: center; }
  .statement__title {
    align-items: center;
    font-size: clamp(72px, min(7.2vw, 11.5vh), 116px);
  }
  .statement__tagline {
    margin-top: clamp(8px, 1.2vh, 12px);
    text-align: center;
    font-size: clamp(9.5px, min(.8vw, 1.4vh), 11px);
  }

  .actions {
    width: min(100%, 560px);
    grid-template-columns: minmax(0, 1fr);
    justify-items: stretch;
    justify-content: center;
    align-items: center;
    gap: clamp(10px, 1.5vh, 14px);
    margin-inline: auto;
  }
  .menu-cta {
    width: 100%;
    max-width: none;
    min-height: clamp(54px, 6.7vh, 60px);
  }
  .quick-actions { width: 100%; }
  .quick-action {
    min-height: clamp(52px, 6.5vh, 58px);
    padding: 9px 11px;
  }
  .quick-action__text strong { font-size: 11px; }
  .quick-action__text small { font-size: 9px; }
}

/* Four compact secondary actions fit cleanly in one row on normal desktops. */
@media (min-width: 960px) {
  .quick-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid rgba(255,255,255,.18);
    border-bottom: 1px solid rgba(255,255,255,.13);
  }
  .quick-action:nth-child(odd) { border-inline-end: 0; }
  .quick-action:nth-child(-n+2) { border-bottom: 0; }
  .quick-action:not(:last-child) { border-inline-end: 1px solid rgba(255,255,255,.13); }
}

/* Short desktop/laptop viewports need tighter vertical rhythm. */
@media (min-width: 768px) and (max-height: 760px) {
  .shell {
    padding-top: calc(var(--safe-top) + 2px);
    padding-bottom: calc(var(--safe-bottom) + 4px);
  }
  .content { padding: 4px 0; }
  .brand { margin-bottom: 10px; }
  .brand__identity { min-height: 54px; }
  .brand__logo { max-height: min(74px, 9.8vh); }
  .brand__descriptor { margin-top: 5px; }
  .statement__title {
    font-size: clamp(64px, min(6.5vw, 10.5vh), 94px);
  }
  .statement__tagline { margin-top: 6px; }
  .actions { gap: 8px; }
  .menu-cta { min-height: 52px; }
  .quick-action { min-height: 50px; padding-block: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .media__video { display: none; }
}
