/**
 * Frequency Desk — contact instrument
 * Unique to contact.php · Chakra Petch + Nunito Sans
 * Independent of a36-lantern / scroll / hanging-tag patterns
 */

:root {
  --fq-paper: #e9edf2;
  --fq-panel: #f6f8fb;
  --fq-ink: #0e1116;
  --fq-mute: #5a6472;
  --fq-amber: #f59e0b;
  --fq-amber-ink: #1a1200;
  --fq-signal: #059669;
  --fq-well: #141920;
  --fq-line: rgba(14, 17, 22, 0.1);
  --fq-display: "Chakra Petch", "Segoe UI", sans-serif;
  --fq-body: "Nunito Sans", "Segoe UI", sans-serif;
  --fq-mono: "Martian Mono", ui-monospace, monospace;
  --fq-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --fq-max: 1100px;
}

*,
*::before,
*::after { box-sizing: border-box; }

body.fq-contact {
  margin: 0;
  min-height: 100vh;
  font-family: var(--fq-body);
  color: var(--fq-ink);
  background: var(--fq-paper);
  -webkit-font-smoothing: antialiased;
}

body.fq-contact a { color: inherit; text-decoration: none; }
body.fq-contact button,
body.fq-contact input,
body.fq-contact textarea {
  font: inherit;
  color: inherit;
}
body.fq-contact .fq-root button {
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

.fq-root {
  position: relative;
  min-height: 100vh;
  overflow-x: visible;
  padding-bottom: calc(var(--kb-keybed-h, 132px) + 2.5rem);
}

body.fq-contact .a77-bare-main {
  display: block;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

.fq-sky {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 55% 40% at 100% 0%, rgba(245, 158, 11, 0.18), transparent 55%),
    radial-gradient(ellipse 45% 35% at 0% 50%, rgba(5, 150, 105, 0.1), transparent 50%),
    linear-gradient(170deg, #dfe5ec 0%, var(--fq-paper) 48%, #e6ebf1 100%);
}

.fq-sky::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.55;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 11px,
      rgba(14, 17, 22, 0.035) 11px,
      rgba(14, 17, 22, 0.035) 12px
    );
  mask-image: linear-gradient(180deg, #000 0%, transparent 72%);
}

.fq-sky::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 22%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.55), transparent);
  animation: fqSweep 6.5s ease-in-out infinite;
}

@keyframes fqSweep {
  0%, 100% { transform: translateY(0); opacity: 0.35; }
  50% { transform: translateY(28px); opacity: 0.9; }
}

/* Mast */
.fq-mast {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  max-width: var(--fq-max);
  margin: 0 auto;
  padding: clamp(1.2rem, 3.5vw, 2.2rem) clamp(1.1rem, 4vw, 2rem) 0;
}

.fq-brand {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.fq-brand-mark {
  font-family: var(--fq-mono);
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fq-signal);
}

.fq-brand strong {
  font-family: var(--fq-display);
  font-size: clamp(1.55rem, 4.2vw, 2.55rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  overflow-wrap: anywhere;
  max-width: 14ch;
}

.fq-brand em {
  font-style: normal;
  font-size: 0.95rem;
  color: var(--fq-mute);
}

.fq-air {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: var(--fq-well);
  color: #e8edf4;
  font-family: var(--fq-mono);
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fq-air i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fq-amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.25);
  animation: fqBlink 1.5s ease-in-out infinite;
}

@keyframes fqBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* Hero */
.fq-hero {
  position: relative;
  z-index: 2;
  max-width: var(--fq-max);
  margin: 0 auto;
  padding: clamp(1.4rem, 4vw, 2.5rem) clamp(1.1rem, 4vw, 2rem) 1rem;
}

.fq-hero h1 {
  margin: 0 0 0.55rem;
  font-family: var(--fq-display);
  font-size: clamp(1.55rem, 3.2vw, 2.15rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.fq-hero p {
  margin: 0;
  max-width: 42ch;
  color: var(--fq-mute);
  line-height: 1.5;
  font-size: 1.05rem;
}

/* Tuner strip */
.fq-tuner {
  position: relative;
  z-index: 2;
  max-width: var(--fq-max);
  margin: 0 auto 1.25rem;
  padding: 0 clamp(1.1rem, 4vw, 2rem);
}

.fq-tuner-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 1.1rem;
  border-radius: 14px;
  background: var(--fq-well);
  color: #e8edf4;
  overflow: hidden;
}

.fq-tuner-freq {
  font-family: var(--fq-display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fq-amber);
  line-height: 1;
}

.fq-tuner-freq span {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--fq-mono);
  font-size: 0.5rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(232, 237, 244, 0.5);
}

.fq-tuner-band {
  position: relative;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.fq-tuner-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 10px,
    rgba(255, 255, 255, 0.08) 10px,
    rgba(255, 255, 255, 0.08) 11px
  );
}

.fq-tuner-needle {
  position: absolute;
  top: 2px;
  bottom: 2px;
  width: 3px;
  left: 62%;
  background: var(--fq-amber);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
  animation: fqNeedle 8s ease-in-out infinite alternate;
}

@keyframes fqNeedle {
  from { left: 28%; }
  to { left: 78%; }
}

.fq-tuner-meta {
  font-family: var(--fq-mono);
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(232, 237, 244, 0.55);
  text-align: right;
  max-width: 12rem;
}

/* Board */
.fq-board {
  position: relative;
  z-index: 2;
  max-width: var(--fq-max);
  margin: 0 auto;
  padding: 0 clamp(1.1rem, 4vw, 2rem) 1.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 1rem;
  align-items: start;
}

/* Composer — broadcast log fields */
.fq-composer {
  border-radius: 18px;
  background: var(--fq-panel);
  border: 1px solid var(--fq-line);
  padding: clamp(1.2rem, 2.5vw, 1.65rem);
  box-shadow: 0 16px 40px rgba(14, 17, 22, 0.06);
}

.fq-composer-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1rem;
}

.fq-composer-head h2 {
  margin: 0;
  font-family: var(--fq-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.fq-composer-head span {
  font-family: var(--fq-mono);
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fq-mute);
}

.fq-notice {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.fq-notice.is-ok {
  background: rgba(5, 150, 105, 0.1);
  border: 1px solid rgba(5, 150, 105, 0.28);
}

.fq-notice.is-err {
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.25);
  color: #9a1c1c;
}

.fq-notice strong {
  display: block;
  font-family: var(--fq-display);
  font-size: 1rem;
  margin-bottom: 0.15rem;
}

.fq-notice p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--fq-mute);
  line-height: 1.4;
}

.fq-notice.is-err p { color: #9a1c1c; }

.fq-form {
  display: grid;
  gap: 0.15rem;
}

.fq-jack {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  padding: 0.7rem 0;
  border-bottom: 1px dashed var(--fq-line);
}

.fq-jack:last-of-type {
  border-bottom: none;
  margin-bottom: 0.5rem;
}

.fq-jack-label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-top: 0.65rem;
}

.fq-jack-label b {
  font-family: var(--fq-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.fq-jack-label span {
  font-family: var(--fq-mono);
  font-size: 0.48rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fq-mute);
}

.fq-jack input,
.fq-jack textarea {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: none;
  border-radius: 10px;
  background: rgba(14, 17, 22, 0.04);
  outline: none;
  transition: background 0.25s, box-shadow 0.25s;
}

.fq-jack input:focus,
.fq-jack textarea:focus {
  background: #fff;
  box-shadow: 0 0 0 2px var(--fq-amber);
}

.fq-jack.is-live .fq-jack-label b {
  color: var(--fq-signal);
}


.fq-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.75rem;
  padding: 0.95rem 1.4rem;
  border-radius: 999px;
  background: var(--fq-amber);
  color: var(--fq-amber-ink) !important;
  font-family: var(--fq-display);
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.25s var(--fq-ease), background 0.25s;
}

.fq-submit:hover {
  transform: translateY(-1px);
  background: #ffb020;
}

.fq-submit::after {
  content: "↗";
  opacity: 0.7;
}

/* Channel stack — VU meters, not tags */
.fq-channels {
  display: grid;
  gap: 0.65rem;
}

.fq-channel {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  gap: 0.85rem;
  align-items: stretch;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  background: var(--fq-panel);
  border: 1px solid var(--fq-line);
  transition: transform 0.25s var(--fq-ease), border-color 0.25s;
}

.fq-channel:hover {
  transform: translateX(3px);
  border-color: rgba(245, 158, 11, 0.4);
}

.fq-vu {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-start;
  gap: 3px;
  padding: 0.2rem 0;
}

.fq-vu i {
  display: block;
  height: 7px;
  border-radius: 2px;
  background: rgba(14, 17, 22, 0.1);
}

.fq-vu i:nth-child(-n+3) { background: var(--fq-signal); }
.fq-vu i:nth-child(4),
.fq-vu i:nth-child(5) { background: var(--fq-amber); }
.fq-vu.is-low i:nth-child(n+4) { background: rgba(14, 17, 22, 0.1); }
.fq-vu.is-mid i:nth-child(5) { background: rgba(14, 17, 22, 0.1); }

.fq-channel strong {
  display: block;
  font-family: var(--fq-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.2rem;
}

.fq-channel p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--fq-mute);
  line-height: 1.4;
  word-break: break-word;
}

.fq-channel a {
  color: var(--fq-ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.fq-channel a:hover { color: var(--fq-signal); }

/* Geo plate — address differently */
.fq-geo {
  margin-top: 0.35rem;
  border-radius: 16px;
  overflow: hidden;
  background: var(--fq-well);
  color: #e8edf4;
}

.fq-geo-map {
  position: relative;
  height: 110px;
  background:
    radial-gradient(circle at 30% 40%, rgba(5, 150, 105, 0.25), transparent 45%),
    radial-gradient(circle at 70% 60%, rgba(245, 158, 11, 0.2), transparent 40%),
    linear-gradient(135deg, #1a222d, #12171f);
}

.fq-geo-map::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
}

.fq-geo-pin {
  position: absolute;
  left: 58%;
  top: 42%;
  width: 14px;
  height: 14px;
  margin: -7px;
  border-radius: 50%;
  background: var(--fq-amber);
  box-shadow: 0 0 0 8px rgba(245, 158, 11, 0.2);
  animation: fqBlink 2s ease-in-out infinite;
}

.fq-geo-body {
  padding: 1rem 1.1rem 1.15rem;
}

.fq-geo-body span {
  font-family: var(--fq-mono);
  font-size: 0.5rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fq-amber);
}

.fq-geo-body strong {
  display: block;
  margin: 0.35rem 0 0.45rem;
  font-family: var(--fq-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.fq-geo-body p {
  margin: 0;
  font-size: 0.88rem;
  color: rgba(232, 237, 244, 0.7);
  line-height: 1.45;
}

/* Transmit ports — social / quick links */
.fq-ports {
  position: relative;
  z-index: 2;
  max-width: var(--fq-max);
  margin: 0 auto 1.5rem;
  padding: 0 clamp(1.1rem, 4vw, 2rem);
}

.fq-ports h2 {
  margin: 0 0 0.75rem;
  font-family: var(--fq-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.fq-port-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.fq-port {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.05rem;
  border-radius: 12px;
  background: var(--fq-well);
  color: #e8edf4 !important;
  transition: transform 0.25s var(--fq-ease), background 0.25s;
}

.fq-port:hover {
  transform: translateY(-2px);
  background: #1c2430;
}

.fq-port b {
  font-family: var(--fq-display);
  font-size: 1rem;
  font-weight: 700;
}

.fq-port span {
  font-family: var(--fq-mono);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(232, 237, 244, 0.5);
}

.fq-topics {
  position: relative;
  z-index: 2;
  max-width: var(--fq-max);
  margin: 0 auto 1.25rem;
  padding: 0 clamp(1.1rem, 4vw, 2rem);
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.fq-topics span {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--fq-line);
  background: rgba(255, 255, 255, 0.55);
  font-family: var(--fq-mono);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fq-mute);
}

.fq-colophon {
  position: relative;
  z-index: 2;
  max-width: var(--fq-max);
  margin: 0 auto;
  padding: 1.25rem clamp(1.1rem, 4vw, 2rem) 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  border-top: 1px solid var(--fq-line);
  font-size: 0.85rem;
  color: var(--fq-mute);
}

.fq-colophon strong {
  font-family: var(--fq-display);
  font-weight: 700;
  color: var(--fq-ink);
}

.fq-colophon nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.fq-colophon nav a:hover { color: var(--fq-signal); }

[data-fq-rise] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s var(--fq-ease), transform 0.55s var(--fq-ease);
  transition-delay: calc(var(--fq-delay, 0) * 70ms);
}

[data-fq-rise].is-in {
  opacity: 1;
  transform: none;
}

.fq-root[data-fq-ready="0"] [data-fq-rise] {
  animation: fq-rise-fallback 0.01s linear 1.4s forwards;
}

@keyframes fq-rise-fallback {
  to { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .fq-board {
    grid-template-columns: 1fr;
  }

  .fq-tuner-inner {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .fq-tuner-meta { text-align: left; max-width: none; }

  .fq-port-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .fq-mast {
    flex-direction: column;
    align-items: flex-start;
  }

  .fq-jack {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .fq-jack-label { padding-top: 0; }

  .fq-port-row {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fq-sky::after,
  .fq-air i,
  .fq-tuner-needle,
  .fq-geo-pin,
  [data-fq-rise] {
    animation: none !important;
    transition: none !important;
    opacity: 1;
    transform: none;
  }
}
