/* mission-contact.css — mission statement + principles carousel, and
   the contact section with the project form.
   Roboto Condensed carries both editorial copy and the instrument voice
   across indices, labels, status readouts, and controls. */

/* -------------------------------------------------------------- mission */

.mission {
  border-top: 1px solid var(--hairline);
  background: radial-gradient(42rem 26rem at 84% 0%, rgba(var(--phosphor-rgb), 0.05), transparent 70%);
}

.mission-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(3rem, 9vw, 10rem);
}

.mission-statement h2 {
  max-width: 9ch;
  margin-top: 1.5rem;
}

.mission-statement blockquote {
  position: relative;
  max-width: 32rem;
  margin-top: 2.75rem;
  padding-left: 1.5rem;
  border-left: 2px solid var(--phosphor);
  color: var(--paper);
  font-family: var(--body);
  font-size: clamp(1.3rem, 2vw, 1.85rem);
  font-weight: 460;
  letter-spacing: -0.015em;
  line-height: 1.32;
}

.mission-statement blockquote::before {
  display: block;
  margin-bottom: 1.1rem;
  color: var(--phosphor);
  content: "//";
  font-family: var(--display);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
}

.mission-statement blockquote + p {
  max-width: 34rem;
  margin-top: 1.9rem;
  color: var(--paper-soft);
  font-family: var(--body);
  font-size: 1.04rem;
  font-weight: 390;
  line-height: 1.7;
}

.mission-statement .text-action {
  margin-top: 2.25rem;
}

/* ------------------------------------------------- principles carousel */

.principles {
  min-width: 0;
  align-self: end;
  border: 1px solid var(--hairline);
  background: var(--panel);
  box-shadow: inset 0 1px 0 rgba(var(--paper-rgb), 0.05);
}

.principles-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.75rem;
  padding-left: 1.4rem;
  border-bottom: 1px solid var(--hairline);
}

.principles-header > p,
.principle-status {
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.65rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.principle-controls {
  display: flex;
  align-self: stretch;
}

.principle-controls button {
  display: grid;
  place-items: center;
  width: 4.75rem;
  border-left: 1px solid var(--hairline);
  background: transparent;
  cursor: pointer;
  transition: background-color var(--dur-1) var(--ease-standard);
}

.principle-controls button:hover {
  background: var(--phosphor);
}

.principle-controls button img {
  width: 1.3rem;
  height: 1.3rem;
  filter: invert(91%) sepia(75%) saturate(409%) hue-rotate(33deg) brightness(103%) contrast(94%);
  transition: transform var(--dur-1) var(--ease-standard);
}

.principle-controls button:hover img {
  filter: none;
}

.principle-controls button:active img {
  transform: translateX(2px);
}

.principle-controls button:first-child img {
  transform: rotate(180deg);
}

.principle-controls button:first-child:active img {
  transform: rotate(180deg) translateX(2px);
}

.principle-viewport {
  overflow: hidden;
}

.principle-track {
  display: flex;
  transition: transform var(--dur-7) var(--ease-glide);
}

.principle-slide {
  position: relative;
  display: flex;
  min-width: 100%;
  min-height: 31rem;
  flex-direction: column;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  background:
    radial-gradient(26rem 18rem at 14% 100%, rgba(var(--phosphor-rgb), 0.06), transparent 72%),
    linear-gradient(rgba(var(--phosphor-rgb), 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--phosphor-rgb), 0.045) 1px, transparent 1px);
  background-size: 100% 100%, 3rem 3rem, 3rem 3rem;
}

/* HUD reticle ticks anchoring two corners of each slide */
.principle-slide::before,
.principle-slide::after {
  position: absolute;
  width: 0.9rem;
  height: 0.9rem;
  content: "";
  pointer-events: none;
}

.principle-slide::before {
  top: 1.1rem;
  right: 1.1rem;
  border-top: 1px solid rgba(var(--phosphor-rgb), 0.4);
  border-right: 1px solid rgba(var(--phosphor-rgb), 0.4);
}

.principle-slide::after {
  bottom: 1.1rem;
  left: 1.1rem;
  border-bottom: 1px solid rgba(var(--phosphor-rgb), 0.4);
  border-left: 1px solid rgba(var(--phosphor-rgb), 0.4);
}

.principle-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--display);
  text-transform: uppercase;
}

/* Signal-meter progress — segments fill to the current doctrine entry */
.principle-progress {
  display: flex;
  gap: 0.45rem;
  margin-top: 1.15rem;
}

.principle-progress i {
  width: 2.2rem;
  height: 2px;
  background: rgba(var(--paper-rgb), 0.12);
}

.principle-progress[data-step="1"] i:nth-child(-n + 1),
.principle-progress[data-step="2"] i:nth-child(-n + 2),
.principle-progress[data-step="3"] i:nth-child(-n + 3),
.principle-progress[data-step="4"] i:nth-child(-n + 4) {
  background: var(--phosphor);
  box-shadow: 0 0 8px rgba(var(--phosphor-rgb), 0.5);
}

/* Ghost index numeral — composed material in the slide's negative space,
   same diegetic language as the footer watermark */
.principle-ghost {
  position: absolute;
  top: 4.2rem;
  right: 1rem;
  color: rgba(var(--paper-rgb), 0.055);
  font-family: var(--display);
  font-size: clamp(8rem, 12.5vw, 15rem);
  letter-spacing: -0.04em;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-mask-image: linear-gradient(rgb(0 0 0), rgb(0 0 0 / 0.25));
  mask-image: linear-gradient(rgb(0 0 0), rgb(0 0 0 / 0.25));
}

.principle-index {
  color: var(--phosphor);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.principle-index em {
  margin-left: 0.35rem;
  color: var(--muted);
  font-style: normal;
}

.principle-source {
  color: var(--muted);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
}

.principle-slide h3 {
  max-width: 13ch;
  margin-top: auto;
  color: var(--paper);
  font-family: var(--display);
  font-size: clamp(2.2rem, 4.3vw, 4.8rem);
  font-weight: 400;
  letter-spacing: -0.06em;
  line-height: 0.88;
  text-transform: uppercase;
}

.principle-slide p {
  max-width: 26rem;
  margin-top: 2rem;
  color: var(--paper-soft);
  font-family: var(--body);
  font-weight: 390;
  line-height: 1.6;
}

/* Slide content choreography — staggered rise keyed on the current slide */
.principle-meta,
.principle-progress,
.principle-ghost,
.principle-slide h3,
.principle-slide p {
  opacity: 0;
  transform: translateY(0.85rem);
  transition: opacity var(--dur-7) var(--ease-out-expo), transform var(--dur-7) var(--ease-out-expo);
}

.principle-slide[aria-current="true"] .principle-meta {
  opacity: 1;
  transform: none;
  transition-delay: 60ms;
}

.principle-slide[aria-current="true"] .principle-progress {
  opacity: 1;
  transform: none;
  transition-delay: 100ms;
}

.principle-slide[aria-current="true"] .principle-ghost {
  opacity: 1;
  transform: none;
  transition-delay: 40ms;
}

.principle-slide[aria-current="true"] h3 {
  opacity: 1;
  transform: none;
  transition-delay: 140ms;
}

.principle-slide[aria-current="true"] p {
  opacity: 1;
  transform: none;
  transition-delay: 230ms;
}

.principles-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.4rem;
  border-top: 1px solid var(--hairline);
}

.principle-hint {
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.75;
}

/* -------------------------------------------------------------- contact */

.contact {
  border-top: 1px solid var(--hairline);
  background:
    linear-gradient(90deg, transparent 49.95%, var(--hairline-soft) 50%, transparent 50.05%),
    radial-gradient(circle at 18% 36%, rgba(var(--phosphor-rgb), 0.08), transparent 27rem),
    var(--charcoal);
}

/* Tighten the closing movement — the stretch from contact into the footer
   should hand off, not gape. */
.contact.section-space {
  padding-bottom: clamp(4.5rem, 7vw, 7.5rem);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(28rem, 1.1fr);
  gap: clamp(3rem, 10vw, 11rem);
}

.contact-copy {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
}

.contact-copy h2 {
  margin-top: 1.5rem;
  color: var(--phosphor);
}

.contact-lede {
  max-width: 30rem;
  margin-top: 2rem;
  color: var(--paper-soft);
  font-family: var(--body);
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  font-weight: 390;
  line-height: 1.65;
}

/* ------------------------------------------------ contact visual panel
   Dedicated hardware macro — the optical intake module receiving a
   phosphor signal beam. Its own asset (not the hero render): the accent
   lives diegetically inside the glass, Even Realities-style. Fills the
   column between the lede and the readout so the closing movement
   anchors on imagery, not empty ground. */

.contact-visual {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: clamp(14rem, 23vw, 22rem);
  margin: 2.75rem 0 2.4rem;
  border: 1px solid var(--hairline);
  background: var(--panel);
  overflow: hidden;
}

.contact-visual picture {
  position: absolute;
  inset: 0;
}

.contact-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 56%;
  filter: brightness(0.96) contrast(1.04);
}

/* Atmosphere scrim — sinks the render into the section's ground and
   guarantees the HUD labels read at every crop; kept light through the
   middle so the beam and glasswork carry full strength */
.contact-visual::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background:
    linear-gradient(180deg, rgba(var(--ink-rgb), 0.55), transparent 30%, transparent 66%, rgba(var(--ink-rgb), 0.6)),
    radial-gradient(130% 100% at 50% 52%, transparent 62%, rgba(var(--ink-rgb), 0.38));
  pointer-events: none;
}

/* Reticle brackets — same corner language as the principles slides */
.contact-visual::after {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 2;
  width: 0.9rem;
  height: 0.9rem;
  content: "";
  border-top: 1px solid rgba(var(--phosphor-rgb), 0.4);
  border-right: 1px solid rgba(var(--phosphor-rgb), 0.4);
  pointer-events: none;
}

.visual-hud {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  pointer-events: none;
  font-family: var(--display);
  font-size: 0.56rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.visual-hud::before {
  position: absolute;
  bottom: 0.9rem;
  left: 0.9rem;
  width: 0.9rem;
  height: 0.9rem;
  content: "";
  border-bottom: 1px solid rgba(var(--phosphor-rgb), 0.4);
  border-left: 1px solid rgba(var(--phosphor-rgb), 0.4);
}

.visual-hud > span {
  position: absolute;
  color: rgba(var(--paper-rgb), 0.55);
}

.visual-hud > span:nth-child(1) {
  top: 1rem;
  left: 1.1rem;
  color: var(--phosphor);
}

.visual-hud > span:nth-child(2) {
  top: 1rem;
  right: 2.2rem;
}

.visual-hud > span:nth-child(3) {
  bottom: 1rem;
  left: 2.2rem;
}

.visual-hud > span:nth-child(4) {
  right: 1.1rem;
  bottom: 1rem;
}

/* Scan sweep — a slow phosphor readout line passing through the frame */
.visual-scan {
  position: absolute;
  inset: 0;
  z-index: 1;
  transform: translateY(-100%);
  background: linear-gradient(
    180deg,
    transparent 82%,
    rgba(var(--phosphor-rgb), 0.06) 94%,
    rgba(var(--phosphor-rgb), 0.28) 99.7%,
    transparent 100%
  );
  animation: visual-scan 8.5s linear infinite;
  pointer-events: none;
}

@keyframes visual-scan {
  to {
    transform: translateY(100%);
  }
}

/* margin-top auto sinks the readout to the section floor, so the left
   column's negative space reads composed against the tall form. */
.contact-details {
  display: grid;
  gap: 1.1rem;
  width: 100%;
  margin-top: auto;
  padding-top: 1.6rem;
  border-top: 1px solid var(--hairline);
}

.contact-lede + .contact-details {
  min-height: 0;
}

.contact-details a,
.contact-details p {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--paper-soft);
  font-family: var(--display);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.contact-details a {
  width: max-content;
  transition: color var(--dur-1) var(--ease-standard);
}

.contact-details a:hover,
.contact-details a:focus-visible {
  color: var(--phosphor);
}

.contact-status {
  color: var(--muted);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status-dot {
  flex: 0 0 auto;
  width: 0.5rem;
  height: 0.5rem;
  margin-inline: 0.5rem;
  background: var(--phosphor);
  box-shadow: 0 0 10px rgba(var(--phosphor-rgb), 0.7);
  animation: status-pulse 2.4s var(--ease-standard) infinite;
}

@keyframes status-pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.35;
  }
}

/* ---------------------------------------------------------- project form
   The intake instrument: a machined ledger of full-bleed cells divided by
   hairlines — no floating labels over void. Every input has a visible
   surface at rest (faint paper fill inside a hairline shell); focus swaps
   the shell to phosphor and draws a sweep along its lower edge. */

.project-form {
  display: flex;
  align-self: stretch;
  flex-direction: column;
  padding: 0;
  border: 1px solid var(--hairline);
  background: var(--panel);
  box-shadow: inset 0 1px 0 rgba(var(--paper-rgb), 0.05);
}

.form-topline {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.4rem;
  padding-inline: 1.4rem;
  border-bottom: 1px solid var(--hairline);
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.form-status {
  display: inline-flex;
  align-items: center;
  color: var(--paper-soft);
}

.form-status .status-dot {
  margin-right: 0.55rem;
  margin-left: 0;
}

.form-fields {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

.field-row {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--hairline);
}

.field-row .field + .field {
  border-left: 1px solid var(--hairline);
}

.field {
  display: grid;
  gap: 0.8rem;
  padding: 1.25rem 1.4rem 1.4rem;
  grid-template-rows: auto 1fr;
}

/* The message cell absorbs the column's spare height — the instrument
   meets the left column's floor instead of leaving void beneath it. */
.field-area {
  flex: 1 1 auto;
  border-bottom: 1px solid var(--hairline);
}

.field label {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  color: var(--paper-soft);
  font-family: var(--display);
  font-size: 0.64rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  transition: color var(--dur-1) var(--ease-standard);
}

.field-index {
  color: var(--phosphor);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
}

.field:focus-within label {
  color: var(--paper);
}

/* Input shell — the visible surface at rest and the sweep's anchor */
.input-shell {
  position: relative;
  display: grid;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--hairline-soft);
  border-radius: 0;
  outline: 0;
  background: rgba(var(--paper-rgb), 0.03);
  caret-color: var(--phosphor);
  color: var(--paper);
  font-family: var(--body);
  font-size: 1rem;
  transition:
    background-color var(--dur-2) var(--ease-standard),
    border-color var(--dur-2) var(--ease-standard),
    box-shadow var(--dur-3) var(--ease-standard);
}

.field input {
  min-height: 3.2rem;
}

.field textarea {
  min-height: 12rem;
  height: 100%;
  resize: none; /* no default browser grip — the instrument stays machined */
}

.field:hover input:not(:focus),
.field:hover textarea:not(:focus) {
  border-color: var(--hairline);
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(var(--phosphor-rgb), 0.45);
  background: var(--phosphor-faint);
  box-shadow: 0 0 20px rgba(var(--phosphor-rgb), 0.07);
}

/* Keep the shell's paper fill under autofill's yellow stamp */
.field input:-webkit-autofill {
  -webkit-box-shadow: inset 0 0 0 3rem var(--panel);
  -webkit-text-fill-color: var(--paper);
}

/* Instrument focus sweep — phosphor line draws along the shell's floor */
.input-shell::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  background: var(--phosphor);
  transition: transform var(--dur-5) var(--ease-out-expo);
  pointer-events: none;
}

.field:focus-within .input-shell::after {
  transform: scaleX(1);
}

/* Live character readout — instrument telemetry in the message cell */
.field-count {
  position: absolute;
  right: 0.9rem;
  bottom: 0.8rem;
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  pointer-events: none;
  transition: color var(--dur-1) var(--ease-standard);
}

.field-count:empty {
  display: none;
}

.field:focus-within .field-count {
  color: var(--phosphor);
}

.form-actions {
  display: grid;
  flex: 0 0 auto;
  gap: 0.95rem;
  padding: 1.4rem;
}

.form-submit {
  width: 100%;
  cursor: pointer;
}

.form-note {
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------- breakpoints */

@media (max-width: 980px) {
  .mission-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .mission-statement {
    max-width: 47rem;
  }

  .principles {
    width: min(100%, 47rem);
    justify-self: end;
  }

  .principle-hint {
    display: none;
  }

  .contact {
    background:
      radial-gradient(circle at 18% 20%, rgba(var(--phosphor-rgb), 0.08), transparent 24rem),
      var(--charcoal);
  }

  .contact-details {
    margin-top: 2.5rem;
  }

  .contact-visual {
    min-height: 16rem;
    margin: 2.5rem 0 0;
  }

  .project-form {
    width: min(100%, 48rem);
    justify-self: end;
  }
}

@media (max-width: 760px) {
  .mission-grid {
    gap: 4rem;
  }

  .principles {
    width: 100%;
  }

  .principles-header {
    min-height: 4rem;
    padding-left: 1rem;
  }

  .principle-controls button {
    width: 4rem;
  }

  .principle-slide {
    min-height: 24rem;
    padding: 1.4rem;
  }

  .principle-slide::before {
    top: 0.85rem;
    right: 0.85rem;
  }

  .principle-slide::after {
    bottom: 0.85rem;
    left: 0.85rem;
  }

  .principle-slide h3 {
    font-size: clamp(2.3rem, 10.5vw, 4rem);
  }

  .principles-footer {
    padding: 1rem;
  }

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

  .field-row .field + .field {
    border-top: 1px solid var(--hairline);
    border-left: 0;
  }

  .field {
    padding: 1.1rem 1rem 1.25rem;
  }

  .field textarea {
    min-height: 10.5rem;
  }

  .form-actions {
    padding: 1.15rem 1rem 1.3rem;
  }

  .form-topline {
    padding-inline: 1rem;
  }

  .contact-visual {
    min-height: 14rem;
    margin-top: 2.25rem;
  }

  .visual-hud {
    font-size: 0.52rem;
  }

  .principle-ghost {
    top: 4rem;
    right: 0.75rem;
    font-size: clamp(6.5rem, 26vw, 8.5rem);
  }

  .principle-progress i {
    width: 1.8rem;
  }
}

@media (max-width: 480px) {
  .principles-header > p {
    max-width: 8rem;
  }

  .principle-source {
    display: none;
  }
}

@media print {
  .contact-visual,
  .principle-ghost {
    display: none;
  }
}
