/* ============================================================
   CUSTOM PROPERTIES
   ============================================================ */
:root {
  --color-bg:       #000000;
  --color-surface:  #ffffff;
  --color-text:     #ffffff;
  --color-text-inv: #0a0a0a;
  --color-muted:    #888888;
  --color-accent:   #e2e2e2;
  --color-border:   rgba(255, 255, 255, 0.08);
  --color-error:    #d95f5f;

  --nav-height:     72px;
  --container-max:  1160px;
  --container-pad:  clamp(1.5rem, 5vw, 4rem);
  --section-pad:    clamp(5rem, 10vw, 9rem);

  --font-sans: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --ease:        200ms ease;
  --ease-nav:    250ms ease;
  --ease-enter:  350ms cubic-bezier(0.0, 0.0, 0.2, 1.0);
  --ease-exit:   200ms cubic-bezier(0.4, 0.0, 1.0, 1.0);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

/* Offset anchor targets so fixed nav doesn't overlap */
[id] {
  scroll-margin-top: var(--nav-height);
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-sans);
}

/* Reduce 300ms tap delay on mobile */
a, button, input, textarea, select, [role="button"] {
  touch-action: manipulation;
}

/* Reinforce [hidden] — author display rules can override the UA stylesheet */
[hidden] {
  display: none !important;
}

/* ============================================================
   ACCESSIBILITY — FOCUS RING
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* ============================================================
   SKIP LINK
   ============================================================ */
.skip-link {
  position: absolute;
  top: -200%;
  left: 0;
  padding: 0.75rem 1.5rem;
  background: var(--color-accent);
  color: var(--color-bg);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 9999;
  transition: top 0.15s var(--ease-enter);
  white-space: nowrap;
  outline: none;
}

.skip-link:focus-visible {
  top: 0;
  outline: none;
}

/* ============================================================
   LAYOUT UTILITY
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* ============================================================
   ENTRANCE ANIMATIONS
   ============================================================ */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--ease-enter), transform var(--ease-enter);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.section-heading {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.section-sub {
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-muted);
  margin-bottom: 2.5rem;
  font-weight: 300;
}

/* ============================================================
   BUTTON
   ============================================================ */
.btn-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2.5rem;
  min-height: 44px;
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background-color: transparent;
  transition: background-color var(--ease), color var(--ease), opacity var(--ease);
  cursor: pointer;
  line-height: 1;
}

.btn-accent:hover {
  background-color: var(--color-accent);
  color: var(--color-bg);
}

.btn-accent:focus-visible {
  background-color: var(--color-accent);
  color: var(--color-bg);
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}

.btn-accent:disabled,
.btn-accent.loading {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============================================================
   NAV
   ============================================================ */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background-color var(--ease-nav), backdrop-filter var(--ease-nav);
}

#nav.scrolled {
  background-color: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-logo .logo-img {
  height: 34px;
  width: auto;
  transition: opacity var(--ease);
}

.nav-logo:hover .logo-img {
  opacity: 0.75;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}

.nav-links li a {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text);
  transition: color var(--ease);
  padding-block: 4px;
}

.nav-links li a:hover {
  color: var(--color-accent);
}

.nav-links li a:focus-visible {
  color: var(--color-accent);
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.nav-links li a.active {
  color: var(--color-accent);
}

/* Hamburger — 44×44px touch target */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 11px 11px;
  min-width: 44px;
  min-height: 44px;
  z-index: 101;
  position: relative;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1px;
  background-color: var(--color-text);
  transition: transform var(--ease-nav), opacity var(--ease-nav);
  transform-origin: center;
}

.nav-hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile overlay */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: var(--color-bg);
  z-index: 99;
  align-items: center;
  justify-content: center;
}

.nav-overlay.open {
  display: flex;
  animation: overlay-in 250ms var(--ease-enter) both;
}

@keyframes overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.nav-overlay-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.75rem;
}

.nav-overlay-links li a {
  font-size: clamp(28px, 8vw, 42px);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text);
  transition: color var(--ease);
}

.nav-overlay-links li a:hover {
  color: var(--color-accent);
}

.nav-overlay-links li a:focus-visible {
  color: var(--color-accent);
  outline: 2px solid var(--color-accent);
  outline-offset: 6px;
  border-radius: 2px;
}

/* ============================================================
   HERO
   ============================================================ */
#hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2rem;
  padding-top: var(--nav-height);
  padding-inline: var(--container-pad);
  padding-bottom: 4rem;
}

.hero-logo {
  width: 100%;
  max-width: 420px;
  height: auto;
}

.hero-rule {
  width: 100%;
  max-width: 420px;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.18);
}

.hero-tagline {
  font-size: 12px;
  letter-spacing: 0.24em;
  color: var(--color-muted);
  text-transform: uppercase;
  font-weight: 400;
}

/* ============================================================
   CONTACT
   ============================================================ */
#contact .section-heading {
  margin-bottom: 3rem;
}

#contact {
  background-color: var(--color-bg);
  color: var(--color-text);
  padding-block: var(--section-pad);
  text-align: center;
}

#contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 560px;
  margin-inline: auto;
  text-align: left;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-field label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.required-mark {
  color: var(--color-accent);
}

.form-field input,
.form-field textarea {
  background-color: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  padding: 0.875rem 1rem;
  min-height: 44px;
  outline: none;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color var(--ease);
  resize: vertical;
  width: 100%;
}

.form-field textarea {
  min-height: 120px;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: transparent;
}

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

.form-field input:focus-visible,
.form-field textarea:focus-visible {
  border-color: var(--color-accent);
  outline: none;
}

.form-field input.error,
.form-field textarea.error {
  border-color: var(--color-error);
}

.field-error {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--color-error);
  min-height: 1.2em;
  line-height: 1.2;
}

.form-confirmation {
  font-size: 16px;
  color: var(--color-text);
  padding-block: 0.5rem;
  letter-spacing: 0.02em;
  font-weight: 300;
}

/* Social + meta */
.contact-social {
  margin-top: 3.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.social-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
}

.contact-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.hero-city {
  font-size: 14px;
  letter-spacing: 0.32em;
  color: var(--color-muted);
  text-transform: uppercase;
  font-weight: 400;
}

.hero-est {
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--color-muted);
  text-transform: uppercase;
  font-weight: 400;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  color: var(--color-muted);
  transition: color var(--ease);
}

.social-link:hover {
  color: var(--color-text);
}

.social-link:focus-visible {
  color: var(--color-text);
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
  border-radius: 2px;
}

/* ============================================================
   FOOTER
   ============================================================ */
#footer {
  background-color: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding-block: 2rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 13px;
  color: var(--color-muted);
  letter-spacing: 0.02em;
  font-weight: 300;
}

.footer-links {
  display: flex;
  gap: 1.75rem;
}

.footer-links li a {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
  transition: color var(--ease);
  padding-block: 4px;
}

.footer-links li a:hover {
  color: var(--color-text);
}

.footer-links li a:focus-visible {
  color: var(--color-text);
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
  border-radius: 2px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-logo {
    max-width: 260px;
  }

  .hero-rule {
    max-width: 260px;
  }
}

/* ============================================================
   ACCESSIBILITY — REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .fade-up {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .nav-overlay.open {
    animation: none;
  }
}
