/* =========================================================
   GLOBAL (shared across pages)
   Base tokens, typography, header/nav, footer and mobile drawer.
   Page-specific visuals live in each page CSS.
   ========================================================= */

:root {
  /* Brand */
  --brand-color: #0b0d12;

  /* Navigation */
  --nav-color: #e3e3e3;
  --nav-hover-color: #121113;
  --nav-active-color: #121113;

  /* Layout constants */
  --header-h: 64px;
  --brand-size: 120px;
}

/* =========================================================
   Fonts
   ========================================================= */

/* Golos Text — body text */
@font-face {
  font-family: "Golos Text";
  src: url("../assets/fonts/GolosText-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Dela Gothic One — headings */
@font-face {
  font-family: "Dela Gothic One";
  src: url("../assets/fonts/DelaGothicOne-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Corben — footnote brand */
@font-face {
  font-family: "Corben";
  src: url("../assets/fonts/Corben-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* =========================================================
   Base
   ========================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  height: 100%;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  font-family:
    "Golos Text",
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    sans-serif;
  line-height: 1.5;
  color: #0b0d12;
  background: #ffffff;
  min-height: 100%;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Dela Gothic One", sans-serif;
  font-weight: 400;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid #0b0d12;
  outline-offset: 2px;
}

/* Shared content wrapper */
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 16px 40px;
}

@media (min-width: 768px) {
  .section-inner {
    padding: 40px 20px 60px;
  }
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =========================================================
   Header / Navigation
   ========================================================= */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;

  background: transparent;
  border-bottom: none;

  transition: background-color 180ms ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  padding: 10px 16px;
  max-width: 1100px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .header-inner {
    padding: 16px 20px;
  }
}

/* Brand / Logo (masked SVG so color comes from currentColor) */
.brand {
  display: inline-flex;
  align-items: center;
  color: var(--brand-color);
}

.brand-logo {
  display: inline-block;
  width: var(--brand-size, 120px);
  height: var(--brand-size, 120px);

  background-color: currentColor;

  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;

  -webkit-mask-image: url("../assets/svg/logo-short.svg");
  mask-image: url("../assets/svg/logo-short.svg");
}

/* Nav */
.nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  font-size: 14px;
  padding: 8px 10px;
  text-transform: uppercase;
  color: var(--nav-color);

  transition:
    color 160ms ease,
    background-color 160ms ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--nav-hover-color);
}

@media (min-width: 768px) {
  .nav-link {
    font-size: 15px;
  }
}

/* Current page indicator (desktop + normal nav) */
.nav-link[aria-current="page"] {
  color: var(--nav-color);
  position: relative;
  font-weight: 500;
}

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background-color: #e2360e;
  opacity: 0.9;
}

/* Helper label */
.kicker {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #e3e3e3;
}

/* Shared CTA base (theme colors are page-specific) */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;

  padding: 14px 20px;
  border: 2px solid transparent;

  font-family: "Dela Gothic One", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  text-decoration: none;

  transition:
    background-color 160ms ease,
    color 160ms ease,
    border-color 160ms ease,
    transform 120ms ease;
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  background: #121113;
  color: #e3e3e3;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.footer-footnote {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}

.footnote-text {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0;
  line-height: 1.2;
}

.footnote-main {
  font-family: "Golos Text", sans-serif;
  font-weight: 500;
  font-size: 12px;
  color: #e3e3e3;
}

.footnote-studio {
  font-family: "Corben", serif;
  font-weight: 700;
  font-size: 12px;
  color: #e3e3e3;
  margin-left: 3px;
}

.footnote-logo {
  height: 20px;
  width: auto;
  display: inline-block;
  margin: 10px;
}

/* Footer — Mobile (2-line layout) */
@media (max-width: 767px) {
  .footer-footnote {
    width: 100%;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }

  .footnote-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2px;
  }

  .footnote-main {
    display: block;
  }

  .footnote-studio {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
  }

  .footnote-logo {
    height: 14px;
    width: auto;
    margin: 8px;
  }
}

/* =========================================================
   Mobile drawer menu
   ========================================================= */

.menu-toggle {
  display: none;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--nav-color);
  cursor: pointer;
}

/* hamburger lines */
.menu-toggle-lines {
  display: inline-block;
  width: 22px;
  height: 14px;
  position: relative;

  background: linear-gradient(currentColor, currentColor);
  background-size: 100% 2px;
  background-repeat: no-repeat;
  background-position: center;
}

.menu-toggle-lines::before,
.menu-toggle-lines::after,
.menu-toggle-lines span {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.menu-toggle-lines::before {
  top: 0;
}

.menu-toggle-lines::after {
  bottom: 0;
}

/* Drawer base (hidden by default) */
.mobile-drawer {
  display: none;
}

/* Mobile behavior */
@media (max-width: 767px) {
  /* Header layout */
  .header-inner {
    position: relative;
    justify-content: flex-start;
    width: 100%;
    padding-left: 16px;
    padding-right: 16px;
  }

  /* Show hamburger */
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10002;
  }

  /* Center logo on mobile */
  .brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10001;
  }

  /* Hide desktop nav on mobile */
  .nav--desktop {
    display: none;
  }

  /* Drawer overlay: full screen */
  .mobile-drawer {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;

    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
    z-index: 10000;
  }

  /* Drawer panel */
  .nav--drawer {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;

    padding: 0 24px;
    place-content: center;
    justify-items: center;

    background: #121113;

    display: grid;
    gap: 14px;

    transform: translateX(100%);
    transition: transform 240ms ease;
  }

  .nav--drawer .nav-link {
    font-size: 28px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #e3e3e3;

    padding: 14px 18px;
    min-width: 100vw;
    text-align: center;

    transition:
      background-color 160ms ease,
      color 160ms ease;
  }

  .nav--drawer .nav-link:hover,
  .nav--drawer .nav-link:focus-visible {
    background: #e3e3e3;
    color: #121113;
  }

  /* Current page in drawer: highlight + bold; remove underline */
  .nav--drawer .nav-link[aria-current="page"]::after {
    display: none;
  }

  .nav--drawer a.is-current,
  .nav--drawer a[aria-current="page"] {
    color: #e2360e;
    font-weight: 700;
  }

  /* Hamburger -> X when menu is open */
  body.menu-open .menu-toggle-lines {
    background: none;
  }

  body.menu-open .menu-toggle-lines::before {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
  }

  body.menu-open .menu-toggle-lines::after {
    bottom: auto;
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
  }

  /* Open state (toggled by JS on body) */
  body.menu-open .mobile-drawer {
    opacity: 1;
    pointer-events: auto;
  }

  body.menu-open .nav--drawer {
    transform: translateX(0);
  }

  /* Drawer: swap logo mask to logo-full and scale it */
  body.menu-open .brand-logo {
    -webkit-mask-image: url("../assets/svg/logo-full.svg");
    mask-image: url("../assets/svg/logo-full.svg");

    width: 90vw;
    color: #e2360e;
    margin-top: 100px;
  }

  /* Drawer: crystal at the bottom */
  .drawer-crystal {
    position: absolute;
    left: 50%;
    bottom: 10vh;
    transform: translateX(-50%);

    width: 110px;
    height: 110px;

    background-color: #e2360e;

    -webkit-mask: url("../assets/svg/crystal.svg") no-repeat center;
    mask: url("../assets/svg/crystal.svg") no-repeat center;
    -webkit-mask-size: contain;
    mask-size: contain;

    opacity: 1;
    pointer-events: none;
  }
}
