@font-face {
  font-family: Rubik;
  src: url("assets/fonts/rubik.ttf") format("truetype");
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #00323d;
  --body: #245347;
  --muted: #52756b;
  --brand: #00a367;
  --action: #007f52;
  --action-hover: #006440;
  --paper: #f3f5ef;
  --line: #cbd8d0;
  font-family: Rubik, Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
  min-height: 88px;
  padding: 22px clamp(24px, 4vw, 64px);
}
.brand-merak-link { display: block; width: 152px; flex: 0 0 auto; }
.brand-merak { display: block; width: 100%; height: auto; }
.language-switcher { display: flex; gap: 5px; margin-left: auto; }
[hidden] { display: none !important; }
.language-switcher button {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font: 500 12px/1 Rubik, Arial, sans-serif;
  letter-spacing: 0.035em;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease;
}
.language-switcher button:hover { background: var(--paper); color: var(--ink); }
.language-switcher button[aria-pressed="true"] { background: var(--ink); color: #fff; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--ink); outline-offset: 5px; }

.landing {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 560px;
  background: var(--paper);
  overflow: hidden;
}
.content {
  position: relative;
  z-index: 1;
  width: 49%;
  max-width: 720px;
  padding: 68px 3vw 72px clamp(32px, 6vw, 112px);
}
.brands {
  margin-bottom: 48px;
}
.brand-arqiv { display: block; width: 48%; height: auto; }
.description {
  max-width: 490px;
  margin: 0;
  color: var(--body);
  font-size: clamp(23px, 2.15vw, 34px);
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: -0.025em;
  text-wrap: pretty;
}
.access { margin-top: 34px; }
.portal-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 62px;
  max-width: 100%;
  padding: 19px 24px;
  border-radius: 5px;
  background: var(--action);
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  transition: background-color 180ms ease, transform 180ms ease;
}
.portal-link svg { flex: 0 0 auto; width: 22px; height: 22px; transition: transform 180ms ease; }
.portal-link:hover { background: var(--action-hover); transform: translateY(-2px); }
.portal-link:hover svg { transform: translateX(4px); }
.portal-link:active { transform: translateY(0); }
.portal-address { margin: 16px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; letter-spacing: 0.035em; }

.visual {
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  right: 0;
  width: 56%;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, #000 16%);
}
.visual-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 54% center; }
.archive-photo { opacity: 0; transition: opacity 1800ms ease-in-out; object-position: 66% center; }
.visual.show-photo .archive-photo { opacity: 1; }
.motion-toggle {
  position: absolute;
  z-index: 2;
  right: 28px;
  bottom: 24px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #ffffff70;
  border-radius: 50%;
  background: #f3f5efe8;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 180ms ease;
}
.motion-toggle:hover { background: #fff; }
.play-icon { display: none; }
.motion-toggle[aria-pressed="true"] .pause-icon { display: none; }
.motion-toggle[aria-pressed="true"] .play-icon { display: block; }
.page-footer { padding: 24px clamp(24px, 4vw, 64px); border-bottom: 4px solid var(--brand); }
.page-footer p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.page-footer a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.page-footer a:hover { color: var(--action-hover); }

@media (prefers-reduced-motion: no-preference) {
  .content { animation: arrive 750ms cubic-bezier(.2,.7,.2,1) both; }
  .visual { animation: reveal 1100ms ease-out both; }
  @keyframes arrive { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
  @keyframes reveal { from { opacity: 0; } to { opacity: 1; } }
}
@media (min-width: 1600px) {
  .content { margin-left: calc((100vw - 1600px) / 2); }
}
@media (max-width: 900px) {
  .content { width: 53%; padding-left: 32px; }
  .visual { width: 51%; }
  .description { font-size: 25px; }
  .brands { margin-bottom: 32px; }
}
@media (max-width: 680px) {
  .page-header { min-height: 72px; padding: 14px 20px; }
  .brand-merak-link { width: 128px; }
  .landing { display: flex; flex-direction: column; align-items: stretch; min-height: 0; }
  .content { width: 100%; max-width: none; padding: 36px 24px 24px; }
  .brands { max-width: 350px; margin-bottom: 28px; }
  .brand-arqiv { width: 44%; }
  .description { max-width: 490px; font-size: 22px; line-height: 1.45; }
  .access { margin-top: 24px; }
  .portal-link { font-size: 16px; min-height: 56px; padding: 16px 20px; gap: 18px; }
  .portal-address { margin-top: 12px; }
  .visual { position: relative; order: 1; flex: 1 0 clamp(230px, 67vw, 390px); width: 100%; min-height: clamp(230px, 67vw, 390px); mask-image: linear-gradient(to bottom, transparent, #000 15%); }
  .visual-image { object-position: center 51%; }
  .archive-photo { object-position: 66% center; }
  .motion-toggle { right: 20px; bottom: 18px; }
  .page-footer { padding: 22px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
