/* Brain Energy Media — styles built from the "Brain Energy" Figma file (Iteration 4). */

/* Self-hosted fonts (SIL Open Font License), latin subset */
@font-face {
  font-family: "Urbanist";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/urbanist-latin-variable.woff2") format("woff2");
}

@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/rubik-latin-600.woff2") format("woff2");
}

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

:root {
  /* semantic tokens (Figma variable names in comments) */
  --c-black: #000000;              /* component/button/primary-bg */
  --c-white: #ffffff;              /* component/button/primary-fg */
  --c-heading: #1a1a1a;            /* component/button/primary-bg-pressed, semantic/text/heading-soft */
  --c-body: #2f2f2f;               /* semantic/text/body */
  --c-muted: #6d6d6d;              /* semantic/text/muted */
  --c-placeholder: #353535;        /* component/field/placeholder */
  --c-underline: rgba(0, 0, 0, 0.55); /* component/field/underline */
  --c-subtle: #bebebe;             /* semantic/text/subtle */
  --c-border-subtle: rgba(190, 190, 190, 0.5); /* semantic/border/subtle */
  --c-teal: #149caf;               /* semantic/accent/teal */
  --c-teal-statement: #3dafbb;
  --c-teal-soft: #78d6e0;          /* semantic/accent/teal-soft */
  --c-white-25: rgba(255, 255, 255, 0.25);

  --gradient-contact-start: #38acb9;
  --gradient-contact-end: #d6faff;

  --font: "Urbanist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-rubik: "Rubik", var(--font);

  --gutter: 120px;
  --header-h: 96px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--c-white);
  color: var(--c-black);
  font-family: var(--font);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.menu-open {
  overflow: hidden;
}

img,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

p,
h1,
h2,
h3 {
  margin: 0;
}

button {
  font: inherit;
  cursor: pointer;
}

.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;
}

:focus-visible {
  outline: 2px solid var(--c-teal);
  outline-offset: 3px;
}

/* ---------- Logo ---------- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--c-black);
}

.logo__bar {
  display: block;
  width: 2px;
  height: 40px;
  background: currentColor;
}

.logo__word {
  font-weight: 600;
  font-size: 23px;
  line-height: 1;
  white-space: nowrap;
}

.logo__word span {
  display: block;
}

.logo--light {
  color: var(--c-white);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 22px 16px 30px;
  border: 0;
  background: var(--c-black);
  color: var(--c-white);
  font-family: var(--font);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.91px;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.btn:hover {
  background: var(--c-heading);
}

.btn__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 13px;
  background: var(--c-white-25);
  transition: transform 0.2s ease;
}

.btn:hover .btn__icon {
  transform: translate(2px, -2px);
}

.btn__icon img {
  width: 14px;
  height: 14px;
}

.btn--block {
  width: 100%;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px var(--gutter);
  transition: background-color 0.25s ease, backdrop-filter 0.25s ease;
}

/* Over the dark hero video the lockup and menu icon are white until the hero scrolls away */
.site-header--over-hero:not(.is-scrolled) .logo {
  color: var(--c-white);
}

.site-header--over-hero:not(.is-scrolled) .hamburger span {
  background: var(--c-white);
}

.site-header .logo,
.site-header .hamburger span {
  transition: color 0.25s ease, background-color 0.25s ease;
}

/* "Header on scroll" state from Figma */
.site-header.is-scrolled {
  background: rgba(188, 188, 188, 0.1);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.site-header--solid {
  position: sticky;
  top: 0;
  background: var(--c-white);
}

.site-header--solid.is-scrolled {
  background: rgba(255, 255, 255, 0.85);
}

.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10.667px;
  width: 49.778px;
  height: 32px;
  padding: 0;
  border: 0;
  background: none;
  /* extend the touch target to 44×44+ */
  box-sizing: content-box;
  margin: -6px;
  padding: 6px;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 3.556px;
  border-radius: 3.556px;
  background: var(--c-black);
}

/* ---------- Menu overlay ---------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: var(--c-white);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.menu.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease;
}

.menu__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 26px var(--gutter);
  flex-shrink: 0;
}

.menu__close {
  position: relative;
  width: 32px;
  height: 22px;
  border: 0;
  background: none;
  box-sizing: content-box;
  margin: -11px -6px;
  padding: 11px 6px;
}

.menu__close span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28px;
  height: 3px;
  border-radius: 3px;
  background: var(--c-black);
}

.menu__close span:first-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.menu__close span:last-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.menu__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  max-width: calc(600px + var(--gutter) * 2);
  padding: 24px var(--gutter) 34px;
  overflow-y: auto;
}

.menu__nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu__nav li {
  padding: 14px 0;
}

.menu__link {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--c-border-subtle);
  text-decoration: none;
  color: var(--c-black);
}

.menu__num {
  font-size: 18px;
  color: var(--c-muted);
  min-width: 21px;
}

.menu__label {
  font-weight: 500;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.32px;
  transition: color 0.2s ease;
}

.menu__link:hover .menu__label,
.menu__link[aria-current="page"] .menu__label {
  color: var(--c-teal);
}

.menu__bottom {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 20px;
}

/* ---------- Contact row (icon chip + email) ---------- */
.contact-row {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.icon-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  background: var(--c-black);
}

.icon-chip img {
  width: 22px;
  height: 22px;
}

.contact-row__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  white-space: nowrap;
}

.contact-row__label {
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--c-body);
}

.contact-row__value {
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--c-heading);
}

.contact-row:hover .contact-row__value {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 1920 / 1080;
  background: var(--c-black);
  overflow: hidden;
}

.hero video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__video--mobile {
  display: none;
}

/* ---------- Statement ---------- */
.statement {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 700px;
  padding: 72px 24px;
  background: var(--c-white);
  scroll-margin-top: var(--header-h);
}

.statement p {
  max-width: 868px;
  font-size: 40px;
  line-height: 1.3;
  text-align: center;
  color: #111111;
}

.statement strong {
  font-weight: 400;
  color: var(--c-teal-statement);
}

/* ---------- Contact ---------- */
.contact {
  padding: 120px 80px;
  background: linear-gradient(-60.83deg, var(--gradient-contact-start) 1.4424%, var(--gradient-contact-end) 100%);
  scroll-margin-top: calc(var(--header-h) - 60px);
}

.contact__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 60px;
}

.contact__info {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 420px;
  flex-shrink: 0;
}

.contact__intro {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact__heading {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-weight: 500;
  color: var(--c-heading);
}

.contact__eyebrow {
  font-size: 20px;
  letter-spacing: 2px;
}

.contact__title {
  font-weight: 500;
  font-size: 46px;
  line-height: 1.15;
}

.contact__lede {
  font-size: 17px;
  line-height: 1.5;
  color: var(--c-body);
}

.form-card {
  width: 700px;
  max-width: 100%;
  padding: 0 44px;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  filter: drop-shadow(0 18px 23px rgba(40, 42, 44, 0.1));
}

.form-card__title {
  display: none;
  font-family: var(--font-rubik);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.26px;
  color: var(--c-heading);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 34px;
}

.field {
  display: block;
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0 0 18px;
  border: 0;
  border-bottom: 1px solid var(--c-underline);
  border-radius: 0;
  background: transparent;
  color: var(--c-heading);
  font-family: var(--font);
  font-size: 21px;
  line-height: normal;
  outline: none;
  transition: border-color 0.2s ease;
}

.field input::placeholder {
  color: var(--c-placeholder);
  opacity: 1;
}

.field input:focus,
.field textarea:focus {
  border-bottom-color: var(--c-black);
}

.field--message {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field__label {
  display: block;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--c-underline);
  font-size: 21px;
  color: var(--c-placeholder);
}

.field textarea {
  height: 118px;
  padding-bottom: 18px;
  font-size: 16.5px;
  line-height: 1.6;
  resize: vertical;
}

.field textarea::placeholder {
  color: var(--c-placeholder);
  opacity: 1;
}

.form__status {
  min-height: 0;
  font-size: 15px;
  color: var(--c-heading);
}

.form__status:empty {
  display: none;
}

/* ---------- Page title (legal) ---------- */
.page-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 48px var(--gutter);
  text-align: center;
  background: linear-gradient(-23.52deg, var(--gradient-contact-start) 1.4424%, var(--gradient-contact-end) 100%);
}

.page-title h1 {
  font-weight: 500;
  font-size: 46px;
  line-height: 1.15;
}

.page-title p {
  font-size: 13px;
  color: var(--c-body);
}

/* ---------- Legal content ---------- */
.legal {
  display: flex;
  flex-direction: column;
  gap: 56px;
  padding: 0 var(--gutter) 110px;
}

.legal__rule {
  height: 1px;
  border: 0;
  margin: 0;
  background: var(--c-border-subtle);
}

.legal__intro {
  max-width: 760px;
  font-size: 24px;
  line-height: 1.5;
  color: var(--c-body);
}

.legal__section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 760px;
}

.legal__section h2 {
  font-weight: 600;
  font-size: 24px;
  line-height: 1.3;
  color: var(--c-heading);
}

.legal__section p {
  font-size: 17px;
  line-height: 1.5;
  color: var(--c-body);
}

.legal a {
  color: var(--c-teal);
  overflow-wrap: anywhere;
}

/* ---------- Footer ---------- */
.site-footer {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding: 64px var(--gutter) 40px;
  background: var(--c-black);
  color: var(--c-subtle);
}

.site-footer__main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.site-footer__tagline {
  font-size: 14px;
}

.site-footer__links {
  display: flex;
  flex-direction: column;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
  white-space: nowrap;
}

.site-footer a {
  text-decoration: none;
}

.site-footer__links a:hover,
.site-footer__links a[aria-current="page"] {
  color: var(--c-teal-soft);
}

.site-footer__rule {
  height: 1px;
  border: 0;
  margin: 0;
  background: var(--c-border-subtle);
}

.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-footer__copy {
  font-size: 13px;
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--c-teal-soft);
  white-space: nowrap;
}

.back-to-top img {
  width: 15px;
  height: 15px;
  transition: transform 0.2s ease;
}

.back-to-top:hover img {
  transform: translateY(-2px);
}

/* ---------- Tablet ---------- */
@media (max-width: 1279px) {
  :root {
    --gutter: 64px;
  }

  .contact {
    padding: 100px 64px;
  }

  .contact__info {
    width: 360px;
  }

  .form-card {
    padding: 0;
  }
}

@media (max-width: 1023px) {
  .contact__inner {
    flex-direction: column;
    gap: 56px;
  }

  .contact__info,
  .form-card {
    width: 100%;
  }

  .statement p {
    font-size: 32px;
  }
}

/* ---------- Mobile (390 frame) ---------- */
@media (max-width: 767px) {
  :root {
    --gutter: 24px;
    --header-h: 72px;
  }

  .site-header {
    padding: 14px 20px;
  }

  .logo {
    gap: 2.88px;
  }

  .logo__bar {
    width: 1.44px;
    height: 28.8px;
  }

  .logo__word {
    font-size: 16.56px;
  }

  .logo--footer {
    gap: 3.4px;
  }

  .logo--footer .logo__bar {
    width: 1.7px;
    height: 34px;
  }

  .logo--footer .logo__word {
    font-size: 19.55px;
  }

  .hamburger {
    gap: 7px;
    width: 32px;
    height: 23px;
    margin: -10px -6px;
    padding: 10px 6px;
  }

  .hamburger span {
    height: 3px;
    border-radius: 3px;
  }

  .menu__top {
    height: auto;
    padding: 18px 24px 10px;
  }

  .menu__body {
    padding: 24px 24px 34px;
  }

  .hero {
    aspect-ratio: 1080 / 1920;
  }

  .hero__video--desktop {
    display: none;
  }

  .hero__video--mobile {
    display: block;
  }

  .statement {
    min-height: 0;
    padding: 72px 24px;
  }

  .statement p {
    font-size: 24px;
    line-height: 1.45;
    color: var(--c-black);
  }

  .statement strong {
    color: var(--c-teal);
  }

  .contact {
    padding: 64px 24px;
    background: linear-gradient(-83.13deg, var(--gradient-contact-start) 1.4424%, var(--gradient-contact-end) 100%);
    scroll-margin-top: 0;
  }

  .contact__inner {
    gap: 44px;
  }

  .contact__info,
  .contact__intro {
    gap: 16px;
  }

  .contact__heading {
    gap: 16px;
  }

  .contact__eyebrow {
    font-size: 16px;
    color: #191919;
  }

  .contact__title {
    font-size: 32px;
    line-height: 1.1;
    letter-spacing: -0.32px;
  }

  .contact__lede {
    font-size: 15.5px;
    line-height: 1.6;
  }

  .contact__info .contact-row {
    padding-top: 12px;
  }

  .contact-row__value {
    font-size: 16px;
    line-height: normal;
  }

  .form-card {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 0;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    filter: none;
  }

  .form-card__title {
    display: block;
  }

  .form {
    gap: 28px;
  }

  .field input {
    padding-bottom: 14px;
    font-size: 18px;
  }

  .field--message {
    gap: 14px;
  }

  .field__label {
    padding-bottom: 14px;
    font-size: 18px;
  }

  .field textarea {
    height: 104px;
    font-size: 16px;
    line-height: normal;
    padding-bottom: 14px;
  }

  .form .btn {
    font-weight: 700;
  }

  .page-title {
    padding: 48px 24px;
    background: linear-gradient(-55.52deg, var(--gradient-contact-start) 1.4424%, var(--gradient-contact-end) 100%);
  }

  .page-title h1 {
    font-size: 30px;
    line-height: 1.2;
  }

  .legal {
    gap: 40px;
    padding: 0 24px 72px;
  }

  .legal__intro {
    font-size: 20px;
    line-height: 1.45;
  }

  .legal__section {
    gap: 10px;
  }

  .legal__section h2 {
    font-size: 19px;
  }

  .legal__section p {
    font-size: 15.5px;
    line-height: 1.6;
  }

  .site-footer {
    gap: 28px;
    padding: 48px 24px 32px;
  }

  .site-footer__main {
    flex-direction: column;
    gap: 28px;
  }

  .site-footer__brand {
    gap: 28px;
  }

  .site-footer__tagline {
    line-height: 1.5;
  }

  .site-footer__links {
    flex-direction: row;
    gap: 14px;
  }

  .site-footer__bottom {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 14px;
  }

  .site-footer__copy {
    font-size: 12.5px;
  }

  .back-to-top {
    font-weight: 500;
    letter-spacing: 0.52px;
  }
}

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

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
