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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: #0F0F0F;
  color: #F0F0F0;
  overflow-x: hidden;
  font-family: 'Cormorant Garamond', serif;
  min-height: 100vh;
}

::selection {
  background: rgba(201, 168, 76, 0.13);
  color: #F0F0F0;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #0F0F0F; }
::-webkit-scrollbar-thumb { background: #2A2A2A; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #6B6B6B; }

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

/* ==================== GRAIN OVERLAY ==================== */
.grain {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 200;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* ==================== TOP BAR ==================== */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 28px 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: transparent;
  transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  opacity: 0;
  animation: fadeIn 1.4s ease 0.6s forwards;
}

.topbar.scrolled {
  background-color: rgba(15, 15, 15, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.topbar-mark {
  display: flex;
  align-items: center;
  transition: opacity 0.4s ease;
}

.topbar-mark:hover { opacity: 0.75; }

.topbar-cube {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.topbar-signin {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.01em;
  color: #6B6B6B;
  transition: color 0.4s ease;
}

.topbar-signin:hover { color: #C9A84C; }

/* ==================== HERO ==================== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 0 56px;
  overflow: hidden;
  background: radial-gradient(ellipse 70% 50% at 50% 45%, #121110 0%, #0F0F0F 100%);
}

.hero-glow {
  position: absolute;
  top: 38%; left: 50%;
  transform: translate(-50%, -50%);
  width: 900px; height: 900px;
  background: radial-gradient(ellipse, rgba(201, 168, 76, 0.15) 0%, rgba(201, 168, 76, 0.05) 40%, transparent 65%);
  pointer-events: none;
  opacity: 0;
  animation: glowFadeIn 3s ease forwards, breathe 9s ease-in-out 3s infinite;
}

@keyframes glowFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  50% { transform: translate(-50%, -50%) scale(1.12); opacity: 0.55; }
}

.hero-stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-cube {
  width: 280px;
  height: 280px;
  object-fit: contain;
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  filter: drop-shadow(0 0 40px rgba(201, 168, 76, 0.45));
  will-change: filter;
  animation: cubeIn 1.8s cubic-bezier(0.22, 1, 0.36, 1) 0.4s forwards,
             cubeBreathe 9s ease-in-out 3s infinite;
}

@keyframes cubeIn {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes cubeBreathe {
  0%, 100% { filter: drop-shadow(0 0 40px rgba(201, 168, 76, 0.45)); }
  50% { filter: drop-shadow(0 0 64px rgba(201, 168, 76, 0.24)); }
}

.hero-caption {
  margin-top: 56px;
  opacity: 0;
  animation: fadeUp 1.4s cubic-bezier(0.22, 1, 0.36, 1) 1.4s forwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-wordmark {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: #C9A84C;
  opacity: 0.78;
  text-indent: 0.36em;
}

.hero-rule {
  width: 24px;
  height: 1px;
  background-color: #C9A84C;
  opacity: 0.3;
  margin: 32px auto;
}

.hero-lede {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.5;
  color: #F0F0F0;
  max-width: 640px;
  letter-spacing: 0.005em;
  text-wrap: balance;
}

.scroll-indicator {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  animation: fadeIn 2s ease 2.6s forwards;
}

.scroll-indicator-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(180deg, transparent 0%, #6B6B6B 100%);
  animation: scrollPulse 2.8s ease-in-out infinite;
}

@keyframes fadeIn { to { opacity: 1; } }

@keyframes scrollPulse {
  0%, 100% { opacity: 0.2; transform: scaleY(1); transform-origin: top; }
  50% { opacity: 0.5; transform: scaleY(1.15); transform-origin: top; }
}

/* ==================== BODY ==================== */
.body {
  padding: 140px 56px 80px;
  display: flex;
  justify-content: center;
}

.body-inner {
  max-width: 560px;
  width: 100%;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: all 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.body-inner.visible {
  opacity: 1;
  transform: translateY(0);
}

.body-text {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(18px, 1.9vw, 21px);
  line-height: 1.65;
  color: #C5C5C5;
  letter-spacing: 0.005em;
  text-wrap: pretty;
}

.body-text + .body-text {
  margin-top: 36px;
}

.body-thesis,
.body-coda {
  text-wrap: balance;
}

.body-coda {
  margin-top: 72px;
}

/* ==================== INQUIRY ==================== */
.inquiry {
  padding: 80px 56px 120px;
  display: flex;
  justify-content: center;
}

.inquiry-inner {
  max-width: 440px;
  width: 100%;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: all 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.inquiry-inner.visible {
  opacity: 1;
  transform: translateY(0);
}

.inquiry-rule {
  width: 28px;
  height: 1px;
  background-color: #C9A84C;
  opacity: 0.35;
  margin: 0 auto 44px;
}

.inquiry-prompt {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-style: italic;
  font-size: clamp(16px, 1.6vw, 18px);
  color: #C9A84C;
  opacity: 0.8;
  margin-bottom: 36px;
  letter-spacing: 0.01em;
}

.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.inquiry-form { width: 100%; }

.inquiry-field {
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(201, 168, 76, 0.2);
  padding-bottom: 12px;
  transition: border-color 0.4s ease;
}

.inquiry-field:focus-within {
  border-bottom-color: rgba(201, 168, 76, 0.6);
}

.inquiry-field input[type="email"] {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 8px 4px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 300;
  color: #F0F0F0;
  letter-spacing: 0.02em;
}

.inquiry-field input[type="email"]::placeholder {
  color: #6B6B6B;
  font-weight: 300;
}

.inquiry-submit {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px 4px 8px 16px;
  color: #9A9A9A;
  transition: color 0.3s ease;
  font-size: 15px;
  display: flex;
  align-items: center;
}

.inquiry-submit:hover { color: #C9A84C; }

.inquiry-arrow {
  display: inline-block;
  transition: transform 0.3s ease;
}

.inquiry-submit:hover .inquiry-arrow { transform: translateX(3px); }

.inquiry-success {
  margin-top: 8px;
  padding: 16px 0;
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
}

.inquiry-success p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  font-weight: 400;
  color: #C5C5C5;
  letter-spacing: 0.005em;
  line-height: 1.6;
}

.inquiry-alt {
  margin-top: 48px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12.5px;
  font-weight: 300;
  color: #6B6B6B;
  letter-spacing: 0.03em;
}

.inquiry-mailto {
  color: #9A9A9A;
  border-bottom: 1px solid rgba(201, 168, 76, 0.15);
  transition: all 0.3s ease;
  padding-bottom: 1px;
}

.inquiry-mailto:hover {
  color: #C9A84C;
  border-bottom-color: #C9A84C;
}

/* ==================== FOOTER ==================== */
.footer {
  padding: 32px 56px 36px;
  border-top: 1px solid #1F1F1F;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.footer-line, .footer-copy {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.04em;
}

.footer-line {
  color: #6B6B6B;
}

.footer-dot {
  margin: 0 8px;
  color: #3A3A3A;
}

.footer-link {
  color: #6B6B6B;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: #9A9A9A;
}

.footer-copy {
  color: #4A4A4A;
}

/* ==================== MOBILE ==================== */
@media (max-width: 768px) {
  .topbar {
    padding: 22px 24px;
  }

  .topbar-cube { width: 30px; height: 30px; }
  .topbar-signin { font-size: 11.5px; }

  .hero {
    padding: 0 24px;
    min-height: 85vh;
  }

  .hero-cube {
    width: 200px;
    height: 200px;
  }

  .hero-caption {
    margin-top: 44px;
  }

  .hero-rule {
    margin: 24px auto;
  }

  .hero-lede {
    font-size: clamp(19px, 5vw, 22px);
    max-width: 400px;
  }

  .scroll-indicator { display: none; }

  .body {
    padding: 64px 24px 64px;
  }

  .body-text {
    font-size: clamp(17px, 4.5vw, 20px);
  }

  .body-text + .body-text {
    margin-top: 32px;
  }

  .body-coda {
    margin-top: 56px;
  }

  .inquiry {
    padding: 60px 24px 100px;
  }

  .inquiry-rule {
    margin-bottom: 36px;
  }

  .inquiry-prompt {
    margin-bottom: 32px;
  }

  .inquiry-alt {
    margin-top: 40px;
    font-size: 12px;
  }

  .footer {
    padding: 28px 24px;
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-wordmark { font-size: 10.5px; letter-spacing: 0.32em; }
  .hero-cube {
    width: 175px;
    height: 175px;
  }
}
