/* ===== RESET ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===== BASE ===== */
html, body {
  height: 100%;
  background: #0c0d0f;
  color: #ededed;
  font-family: "Aptos", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  opacity: 0;
  transition: opacity 0.8s ease;
}

body.loaded {
  opacity: 1;
}

/* ===== TOP BAR ===== */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 78px;
  background: rgba(12,13,15,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  z-index: 100;
}

.topbar-inner {
  max-width: 1600px;
  height: 100%;
  margin: 0 auto;
  padding: 0 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  text-decoration: none;
  font-size: 1.05rem;
  letter-spacing: 0.22em;
  color: rgba(255,255,255,0.95);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px 0;
  background: rgba(255,255,255,0.9);
}

/* ===== NAV ===== */
.nav {
  display: flex;
  gap: 2.2rem;
}

.nav a {
  position: relative;
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.6);
  padding-bottom: 6px;
  transition: color 0.25s ease;
}

.nav a:hover,
.nav a.active {
  color: #ffffff;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0%;
  height: 1px;
  background: rgba(255,255,255,0.6);
  transition: width 0.28s ease, left 0.28s ease;
}

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
  left: 0;
}

/* ===== PAGE ===== */
.page {
  padding-top: 120px;
}

.page-header {
  text-align: center;
  margin-bottom: 56px;
}

.page-header h1 {
  font-size: 2.4rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.9);
}

/* ===== CONTENT SURFACE ===== */
.content-surface {
  background: #181818;
}

.content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 6vw 130px;
}

/* ===== CONTACT ===== */
.contact-intro {
  max-width: 560px;
  margin: 0 auto 40px;
  text-align: center;
  font-size: 0.98rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.6);
}

.contact-form {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.form-field label {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 13px 16px;
  font-family: inherit;
  font-size: 0.95rem;
  color: #f3f3f3;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.14);
  outline: none;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.form-field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='none' stroke='%23999999' stroke-width='1.5' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.form-field select option {
  background: #1a1a1a;
  color: #f3f3f3;
}

.form-field textarea {
  min-height: 160px;
  resize: vertical;
  line-height: 1.5;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  border-color: rgba(255, 255, 255, 0.4);
  background-color: rgba(255, 255, 255, 0.05);
}

/* honeypot: off-screen, not display:none (so bots still fill it) */
.form-hp {
  position: absolute;
  left: -9999px;
}

.form-submit {
  align-self: flex-start;
  margin-top: 6px;
  padding: 13px 30px;
  font-family: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #f3f3f3;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.form-submit:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.form-submit:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
}

.form-success,
.form-error {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
}

.form-error {
  color: rgba(255, 170, 170, 0.85);
}

/* ===== FOOTER ===== */
.footer {
  height: 64px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.4);
}

/* ===== GRAIN ===== */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.008'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {

  .topbar {
    height: 64px;
  }

  .brand {
    font-size: 0.9rem;
    letter-spacing: 0.18em;
  }

  .menu-toggle {
    display: block;
  }

  .nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #0c0d0f;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    padding: 28px 0 36px;
    border-bottom: 1px solid rgba(255,255,255,0.06);

    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .nav.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav a {
    font-size: 0.78rem;
  }

  .page-header h1 {
    font-size: 1.8rem;
  }

  .content {
    padding: 64px 6vw 110px;
  }

  .form-submit {
    align-self: stretch;
    text-align: center;
  }
}
