/*!
 * Magnumen website
 * Copyright (c) 2026 Magnumen Capital. All rights reserved.
 */

@font-face {
  font-family: "TWK Ghost";
  src: url("../fonts/TWKGhost-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}
:root {
  --navy: #0F1B2D;
  --silver: #C0C5CC;
  --text: #E4E7EB;
  --muted: #A9B1BC;
  --line: rgba(192, 197, 204, 0.18);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  background: radial-gradient(120% 80% at 50% 38%, #16263D 0%, var(--navy) 62%);
  background-color: var(--navy);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: max(56px, env(safe-area-inset-top)) 24px 32px;
  text-align: center;
}

/* Wordmark + rule */
.mark {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}
h1 {
  font-family: "TWK Ghost", "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(2.5rem, 10.5vw, 7.5rem);
  line-height: 1;
  letter-spacing: 0.06em;
  margin-right: -0.06em; /* optical centring of tracked capitals */
  white-space: nowrap;
  display: flex;
}
h1 span {
  display: inline-block;
  background: linear-gradient(180deg, #F1F3F5 0%, var(--silver) 45%, #8E949C 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0;
  transform: translateY(0.18em);
  filter: blur(6px);
}
.rule {
  height: 1px;
  width: calc(100% + 34vw);       /* wider than the wordmark */
  max-width: 92vw;
  margin: clamp(36px, 6vw, 64px) 0;
  background: linear-gradient(90deg, transparent 0%, var(--silver) 18%, var(--silver) 82%, transparent 100%);
  opacity: 0.55;
  transform: scaleX(0);
}

/* Offices */
.offices {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  max-width: 920px;
}
.offices li {
  padding: 4px 28px;
  border-left: 1px solid var(--line);
  opacity: 0;
  transform: translateY(10px);
}
.offices li:first-child { border-left: 0; }
.city {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--silver);
  margin-bottom: 12px;
}
address {
  font-style: normal;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
}
.contact {
  margin-top: clamp(40px, 6vw, 60px);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  opacity: 0;
}
.open-form {
  font: inherit;
  letter-spacing: 0.04em;
  color: var(--text);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 6px 2px 4px;
  cursor: pointer;
  transition: border-color .25s, color .25s;
}
.open-form:hover, .open-form:focus-visible { border-color: var(--silver); color: #fff; outline: none; }

/* Contact sheet */
.scrim {
  position: fixed; inset: 0;
  background: rgba(6, 12, 22, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .35s var(--ease);
  z-index: 10;
}
.sheet {
  position: fixed;
  left: 50%; top: 50%;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  transform: translate(-50%, -46%) scale(.98);
  opacity: 0;
  background: #13223A;
  border: 1px solid rgba(192, 197, 204, 0.16);
  border-radius: 14px;
  padding: 36px 28px 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  transition: opacity .35s var(--ease), transform .45s var(--ease);
  z-index: 11;
  text-align: left;
}
.open .scrim { opacity: 1; }
.open .sheet { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.close {
  position: absolute; top: 10px; right: 12px;
  width: 36px; height: 36px;
  font-size: 1.5rem; line-height: 1;
  color: var(--muted); background: none; border: 0; cursor: pointer; border-radius: 50%;
}
.close:hover, .close:focus-visible { color: var(--text); background: rgba(255,255,255,0.06); outline: none; }
.sheet-title {
  font-family: "TWK Ghost", "Times New Roman", serif;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  color: var(--silver);
  margin-bottom: 22px;
}
.field { display: block; margin-bottom: 16px; }
.field span {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit;
  font-size: 16px; /* prevents iOS zoom */
  color: var(--text);
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(192, 197, 204, 0.28);
  border-radius: 0;
  padding: 8px 0;
  outline: none;
  transition: border-color .2s;
  -webkit-appearance: none;
  appearance: none;
}
.field select {
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 10px) 55%, calc(100% - 5px) 55%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.field select option { background: #13223A; color: var(--text); }
.field textarea { resize: none; min-height: 56px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--silver); }
.err { min-height: 1.2em; font-size: 0.8rem; color: #E8A0A0; margin: 2px 0 10px; }
.send {
  width: 100%;
  font: inherit;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--navy);
  background: linear-gradient(180deg, #E9ECEF 0%, var(--silver) 100%);
  border: 0;
  border-radius: 999px;
  padding: 14px 20px;
  cursor: pointer;
  transition: transform .15s, opacity .2s;
}
.send:active { transform: scale(.98); }
.send[disabled] { opacity: .6; cursor: default; }
.thanks p:last-child { color: var(--muted); line-height: 1.6; }
@media (max-width: 680px) {
  .sheet {
    left: 0; right: 0; top: auto; bottom: 0;
    width: 100%;
    max-height: 92dvh;
    border-radius: 18px 18px 0 0;
    padding: 34px 22px max(22px, env(safe-area-inset-bottom));
    transform: translateY(100%);
  }
  .open .sheet { transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .scrim, .sheet { transition: opacity .2s; }
}
footer {
  padding: 20px 24px max(20px, env(safe-area-inset-bottom));
  text-align: center;
  font-size: 0.72rem;
  color: rgba(169, 177, 188, 0.55);
  letter-spacing: 0.06em;
  opacity: 0;
}

/* Intro animation, runs once the font is ready (class added by script) */
.ready .rule { animation: draw 1.1s var(--ease) forwards; }
.ready h1 span { animation: letter 1s var(--ease) forwards; animation-delay: calc(0.55s + var(--i) * 0.07s); }
.ready .offices li { animation: up .9s var(--ease) forwards; animation-delay: calc(1.45s + var(--i) * 0.12s); }
.ready .contact { animation: fade .9s var(--ease) 1.9s forwards; }
.ready footer { animation: fade .9s var(--ease) 2.1s forwards; }

@keyframes draw   { to { transform: scaleX(1); } }
@keyframes letter { to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes up     { to { opacity: 1; transform: none; } }
@keyframes fade   { to { opacity: 1; } }

/* Mobile */
@media (max-width: 680px) {
  main { justify-content: flex-start; padding-top: max(18vh, 72px); }
  .rule { width: 100%; max-width: none; align-self: stretch; }
  .mark { width: 100%; }
  .offices { grid-template-columns: 1fr; max-width: 340px; }
  .offices li { border-left: 0; padding: 22px 0; }
  .offices li + li { border-top: 1px solid var(--line); }
  .offices li:first-child { padding-top: 0; }
  .contact { margin-top: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .rule, h1 span, .offices li, .contact, footer {
    animation: none !important; opacity: 1; transform: none; filter: none;
  }
}
