/* =========================================================
   Appforge — Mobile & AI Atelier
   Palette & type mirrored from the design handoff,
   with responsive behaviour added on top.
   ========================================================= */

:root {
  --bg:        #080604;
  --bg-hero:   #060503;
  --bg-contact:#0a0705;
  --bg-card:   #13100a;

  --gold:      #c9a227;
  --gold-lit:  #e8c75e;

  --ink:       #f0e7d6;
  --ink-1:     #f6efdf;
  --ink-2:     #f3ead8;
  --ink-3:     #f4ecda;
  --ink-4:     #e6ddc8;

  --muted-1:   #cabfa6;
  --muted-2:   #b6ab92;
  --muted-3:   #9a8f66;
  --muted-4:   #8a7f66;
  --muted-5:   #6f6650;

  --gold-line: rgba(201,162,39,0.16);

  --sans: 'Archivo', system-ui, sans-serif;
  --serif: 'Cormorant Garamond', Georgia, serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
}
body { overflow-x: hidden; }

::selection { background: var(--gold); color: #140f07; }

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

input, textarea, select, button { font-family: var(--sans); }
input::placeholder, textarea::placeholder { color: var(--muted-5); }
input:focus, textarea:focus, select:focus { outline: none; }

img { display: block; }

.root {
  position: relative;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  overflow: hidden;
}

/* =========================================================
   KEYFRAMES
   ========================================================= */
@keyframes wordRise {
  from { opacity: 0; transform: translateY(0.6em); filter: blur(5px); }
  to   { opacity: 1; transform: none; filter: none; }
}
@keyframes flick {
  0%, 100% { opacity: .85; }
  45%      { opacity: 1; }
  60%      { opacity: .7; }
}
@keyframes scrollHint {
  0%   { opacity: 0; transform: translateY(-6px); }
  40%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(10px); }
}
@keyframes driftA {
  0%   { transform: translate(0,0); opacity: 0; }
  12%  { opacity: .85; }
  55%  { transform: translate(16px,-46px); opacity: .6; }
  100% { transform: translate(-8px,-104px); opacity: 0; }
}
@keyframes driftB {
  0%   { transform: translate(0,0); opacity: 0; }
  16%  { opacity: .75; }
  60%  { transform: translate(-20px,-58px); opacity: .5; }
  100% { transform: translate(10px,-122px); opacity: 0; }
}
@keyframes driftC {
  0%   { transform: translate(0,0); opacity: 0; }
  20%  { opacity: .65; }
  100% { transform: translate(22px,-140px); opacity: 0; }
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-radius: 1px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.btn--solid {
  background: var(--gold);
  color: #160f06;
  padding: 15px 30px;
  font-size: 14px;
  box-shadow: 0 12px 38px rgba(201,162,39,0.34);
  border: none;
}
.btn--ghost {
  padding: 15px 28px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  border: 1px solid rgba(201,162,39,0.4);
  background: rgba(8,6,4,0.3);
}
.btn--nav {
  gap: 8px;
  padding: 11px 19px;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  box-shadow: 0 6px 26px rgba(201,162,39,0.28);
}
.btn--submit {
  margin-top: 6px;
  align-self: flex-start;
  padding: 15px 32px;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(201,162,39,0.28);
}

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(22px, 5vw, 68px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
}
.brand-mark {
  width: 15px;
  height: 15px;
  background: var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 22px rgba(201,162,39,0.7);
  display: inline-block;
  animation: flick 4s ease-in-out infinite;
}
.brand-name {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink-2);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 38px);
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
  cursor: crosshair;
  background: var(--bg-hero);
  --mx: 50%;
  --my: 44%;
  --spot: 340px;
  --glow: 300px;
}

.hero-plane { position: absolute; inset: -6% -2%; }
.hero-plane img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}
.hero-plane--dark { z-index: 0; }
.hero-plane--dark img { filter: brightness(0.16) saturate(0.7) contrast(1.05); }

.hero-plane--lit {
  z-index: 1;
  -webkit-mask-image: radial-gradient(circle var(--spot) at var(--mx) var(--my), #000 0%, #000 34%, rgba(0,0,0,0) 72%);
          mask-image: radial-gradient(circle var(--spot) at var(--mx) var(--my), #000 0%, #000 34%, rgba(0,0,0,0) 72%);
}
.hero-plane--lit img { filter: brightness(1.04) saturate(1.05) contrast(1.04); }

.hero-glow {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  mix-blend-mode: screen;
  background: radial-gradient(circle var(--glow) at var(--mx) var(--my), rgba(232,199,94,0.20), rgba(232,199,94,0) 70%);
}

.hero-motes {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}
.mote {
  position: absolute;
  border-radius: 50%;
  background: rgba(245,224,156,0.8);
  box-shadow: 0 0 7px rgba(245,224,156,0.7);
}

.hero-vignette { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.hero-vignette--radial {
  background: radial-gradient(120% 110% at 50% 40%, rgba(6,5,3,0) 38%, rgba(6,5,3,0.55) 78%, rgba(6,5,3,0.94) 100%);
}
.hero-vignette--linear {
  background: linear-gradient(180deg, rgba(6,5,3,0.7) 0%, rgba(6,5,3,0) 20%, rgba(6,5,3,0) 52%, rgba(6,5,3,0.92) 100%);
}

.hero-copy {
  position: absolute;
  z-index: 4;
  left: 0; right: 0;
  bottom: clamp(64px, 11vh, 128px);
  padding: 0 clamp(24px, 6vw, 90px);
  pointer-events: none;
}
.hero-copy-inner { max-width: 1180px; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
  animation: wordRise .8s ease both;
  animation-delay: .1s;
}
.eyebrow-rule {
  width: 38px;
  height: 1px;
  background: var(--gold);
  display: inline-block;
  flex: none;
}
.eyebrow-rule--gold { width: 40px; }
.eyebrow-text {
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-lit);
}
.eyebrow-text--gold { letter-spacing: 0.3em; color: var(--gold); }

.hero-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(46px, 7.4vw, 116px);
  line-height: 0.98;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--ink-1);
  text-shadow: 0 12px 60px rgba(0,0,0,0.7);
}
.hero-title .line { display: block; }
.hero-title .word {
  display: inline-block;
  animation: wordRise .9s cubic-bezier(.2,.75,.25,1) both;
}
.hero-title .word--em { font-style: italic; color: var(--gold-lit); }

.hero-lede {
  max-width: 540px;
  margin: 30px 0 0;
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.66;
  color: var(--muted-1);
  animation: wordRise 1s ease both;
  animation-delay: .78s;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 38px;
  pointer-events: auto;
  animation: wordRise 1s ease both;
  animation-delay: .92s;
}

.hero-hint-move {
  position: absolute;
  z-index: 4;
  top: calc(50% - 10px);
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted-3);
  animation: flick 3.5s ease-in-out infinite;
  text-shadow: 0 2px 18px rgba(0,0,0,0.8);
  text-align: center;
  width: max-content;
  max-width: 80vw;
}
.hero-hint-scroll {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted-4);
  animation: scrollHint 2.6s ease-in-out infinite;
  white-space: nowrap;
}

/* =========================================================
   CONTACT
   ========================================================= */
.contact {
  position: relative;
  z-index: 1;
  padding: clamp(90px, 11vw, 150px) clamp(24px, 6vw, 90px);
  background: var(--bg-contact);
  border-top: 1px solid var(--gold-line);
}
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: start;
}

.contact-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 4.4vw, 62px);
  line-height: 1.04;
  margin: 0 0 26px;
  color: var(--ink-3);
}
.em { font-style: italic; color: var(--gold-lit); }
.contact-lede {
  max-width: 380px;
  font-size: 15.5px;
  line-height: 1.68;
  color: var(--muted-2);
  margin: 0 0 34px;
}
.contact-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}
.meta-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-4);
  margin-bottom: 6px;
}
.meta-value {
  font-family: var(--serif);
  font-size: 21px;
  color: var(--ink-4);
}

.contact-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid rgba(201,162,39,0.2);
  padding: clamp(28px, 3.5vw, 46px);
  overflow: hidden;
}
.card-glow {
  position: absolute;
  top: -30%;
  right: -10%;
  width: 60%;
  height: 90%;
  pointer-events: none;
  background: radial-gradient(circle at 70% 20%, rgba(232,199,94,0.1), rgba(0,0,0,0) 65%);
}

.card-sent {
  position: relative;
  min-height: 430px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
}
.card-sent[hidden] { display: none; }
.card-sent-mark {
  width: 54px;
  height: 54px;
  background: var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 34px rgba(201,162,39,0.6);
  display: inline-block;
  animation: flick 3.5s ease-in-out infinite;
}
.card-sent-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 34px;
  margin: 18px 0 0;
  color: var(--ink-3);
}
.card-sent-text {
  max-width: 340px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted-2);
  margin: 0;
}

.card-form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.card-form[hidden] { display: none; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.field-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-4);
}
.field-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(201,162,39,0.3);
  color: var(--ink);
  font-size: 16px;
  padding: 8px 0;
}
.field-input:focus { border-bottom-color: var(--gold); }
.field-select { background: #0c0906; }
.field-textarea { resize: vertical; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--gold-line);
  padding: 46px clamp(24px, 6vw, 90px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--bg);
}
.brand-mark--footer {
  width: 14px;
  height: 14px;
  box-shadow: none;
  animation: none;
}
.brand-name--footer { font-size: 20px; }
.footer-links { display: flex; gap: 26px; }
.footer-links a { font-size: 13px; color: var(--muted-3); }
.footer-copy {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted-5);
}

/* =========================================================
   REVEAL — initial hidden states set by JS via [data-reveal];
   these classes just guarantee a sensible pre-JS baseline.
   ========================================================= */
[data-reveal]:not([data-shown]) { will-change: opacity, transform, filter; }

/* =========================================================
   RESPONSIVE
   ========================================================= */

/* Tablet / small laptop */
@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: clamp(36px, 7vw, 56px);
  }
  .contact-lede { max-width: 520px; }
}

/* Large phones / portrait tablets */
@media (max-width: 720px) {
  .nav { padding: 16px clamp(18px, 5vw, 40px); }
  .brand-name { font-size: 20px; }

  .hero { min-height: 560px; }
  .hero-copy { bottom: clamp(40px, 9vh, 96px); }
  .hero-lede { margin-top: 22px; }
  .hero-cta { gap: 14px; margin-top: 30px; }
  .hero-hint-move { letter-spacing: 0.2em; }
}

/* Phones */
@media (max-width: 560px) {
  .nav { padding: 14px 18px; }
  .brand { gap: 10px; }
  .brand-mark { width: 13px; height: 13px; }
  .brand-name { font-size: 18px; }
  .btn--nav { padding: 10px 15px; font-size: 11.5px; }

  .hero { min-height: 540px; cursor: default; }
  .hero-hint-move { top: calc(50% - 6px); }

  .field-row { grid-template-columns: 1fr; gap: 22px; }
  .contact-meta { gap: 22px; }

  /* full-bleed CTAs read better on a narrow screen */
  .hero-cta .btn { flex: 1 1 auto; justify-content: center; }
  .btn--submit { align-self: stretch; justify-content: center; }

  .footer { gap: 16px; }
  .footer-copy { width: 100%; order: 3; }
}

/* Short / landscape phones — keep the hero usable */
@media (max-height: 560px) and (max-width: 900px) {
  .hero { height: auto; min-height: 0; padding: 96px 0 56px; }
  .hero-copy { position: static; transform: none !important; padding: 0 clamp(24px,6vw,90px); }
  .hero-hint-move, .hero-hint-scroll { display: none; }
}

/* =========================================================
   ACCESSIBILITY — honour reduced-motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .mote { display: none; }
}
