:root {
  color-scheme: dark;
  --ink: #080e0b;
  --white: #f2f4f0;
  --muted: #a9b6ae;
  --composition-width: 1920px;
  --gutter: clamp(1.5rem, 5.1vw, 6rem);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--ink);
  color: var(--white);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
::selection { background: var(--white); color: var(--ink); }

.atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  background-color: var(--ink);
}

.media-field {
  position: absolute;
  inset: 0;
}

.signal-still { display: block; width: 100%; height: 100%; }
.signal-image,
.signal-video {
  display: block;
  width: 100%;
  height: 100%;
  /* Fill the screen proportionally; the viewport crops the footage's edges. */
  object-fit: cover;
  object-position: center;
  filter: brightness(.88) saturate(.9);
}
.signal-video { position: absolute; inset: 0; opacity: 0; transition: opacity .65s ease; }
.atmosphere.video-ready .signal-video { opacity: 1; }

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 11, 8, .57) 0%, rgba(5, 11, 8, .18) 50%, transparent 76%),
              linear-gradient(0deg, rgba(5, 11, 8, .70) 0%, transparent 28%, transparent 75%, rgba(5, 11, 8, .2) 100%);
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  padding: 0 var(--gutter);
  display: flex;
  flex-direction: column;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2.4rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: .9rem;
}

.brand img { display: block; width: 48px; height: auto; }
.brand span { font-size: 1.06rem; font-weight: 600; letter-spacing: .22em; white-space: nowrap; }
.origin { display: inline-flex; align-items: center; gap: .65rem; color: var(--muted); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.origin img { display: block; width: 24px; height: 16px; border-radius: 1px; }

main {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 3rem 0 5.4rem;
}

.intro { max-width: 64rem; }
h1 {
  margin: 0;
  font-size: clamp(3rem, 6vw, 7.5rem);
  line-height: 1.08;
  font-weight: 400;
  letter-spacing: -.06em;
  overflow-wrap: anywhere;
}
h1 > span { display: block; }
h1 > span:last-child { color: #d2dbd2; }

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.6rem 0 1.9rem;
  border-top: 1px solid rgba(197, 218, 203, .17);
}
footer small { font-size: .75rem; color: var(--muted); letter-spacing: .045em; }
.contact {
  color: var(--white);
  font-size: .875rem;
  line-height: 1.8;
  letter-spacing: .025em;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(197, 218, 203, .38);
  text-underline-offset: .42em;
  transition: color .2s, text-decoration-color .2s;
}
.contact:hover { color: var(--white); text-decoration-color: var(--white); }
.contact:focus-visible { outline: 2px solid var(--white); outline-offset: 8px; border-radius: 1px; }
.footer-actions { display: flex; align-items: center; gap: 2.3rem; }
.motion-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-width: 76px;
  min-height: 44px;
  padding: .35rem .25rem;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: #c2cdc4;
  font: inherit;
  font-size: .875rem;
  cursor: pointer;
}
.motion-toggle[hidden] { display: none; }
.motion-toggle:hover { color: var(--white); }
.motion-toggle:focus-visible { outline: 2px solid var(--white); outline-offset: 4px; }
.motion-icon { width: 14px; height: 14px; flex: none; }
.icon-pause { display: none; }
.motion-toggle.is-playing .icon-pause { display: block; }
.motion-toggle.is-playing .icon-play { display: none; }

@media (prefers-reduced-motion: reduce) {
  .signal-video { transition: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .header, footer { animation: appear 1.1s ease-out both; }
  .intro { animation: arrive 1.3s cubic-bezier(.2, .65, .3, 1) both; }
  @keyframes appear { from { opacity: 0; } to { opacity: 1; } }
  @keyframes arrive { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
}

@media (min-width: 1700px) {
  .page { max-width: var(--composition-width); margin-inline: auto; }
}

@media (max-width: 640px) {
  .header { padding: 1.8rem 0; align-items: flex-start; }
  .brand { gap: .65rem; }
  .brand img { width: 39px; }
  .brand span { font-size: .94rem; letter-spacing: .18em; }
  .origin { font-size: .75rem; letter-spacing: .04em; padding-top: .35rem; }
  main { padding: 5.5rem 0 7rem; }
  h1 { font-size: clamp(2rem, 9.4vw, 3.7rem); letter-spacing: -.06em; line-height: 1.12; }
  .atmosphere::after { background: linear-gradient(90deg, rgba(5, 11, 8, .50), rgba(5, 11, 8, .10)), linear-gradient(0deg, #080e0b 0%, transparent 32%, transparent 72%, rgba(5,11,8,.2)); }
  footer { padding: 1.1rem 0 1.4rem; gap: .65rem; flex-wrap: wrap; }
  .footer-actions { gap: .8rem; margin-left: auto; }
}

@media (max-width: 350px) {
  .origin > span { display: none; }
  footer { flex-wrap: wrap; }
  .footer-actions { width: 100%; justify-content: space-between; }
}

/* Match the picture source and motion controller's portrait breakpoint. */
@media (max-aspect-ratio: 1/1) {
  main {
    align-items: flex-start;
    padding: clamp(2rem, 6svh, 5rem) 0 3rem;
  }
  /* Preserve the native portrait clip's dark upper area when cropping. */
  .signal-image, .signal-video {
    object-position: center top;
  }
  .atmosphere::after {
    background: linear-gradient(0deg, rgba(5, 11, 8, .78) 0%, rgba(5, 11, 8, .12) 16%, transparent 35%);
  }
}

@media (max-height: 520px) and (min-width: 641px) {
  .header { padding: 1.3rem 0; }
  main { padding: 1rem 0 2rem; }
  h1 { font-size: 4rem; }
}
