/* Appily Fiftythree — Atlas Relay contact UI */

.af-contact {
  --afct-ink: var(--ts-ink, #15202B);
  --afct-paper: #fff;
  --afct-mist: var(--ts-paper, #F3F5F8);
  --afct-copper: var(--ts-wine, #B85C38);
  --afct-teal: var(--ts-grove, #2A6F7A);
  --afct-line: var(--ts-line, #CDD4DE);
  --afct-muted: var(--ts-muted, #5E6B7A);
  --afct-ease: var(--ease-out, cubic-bezier(.22, 1, .36, 1));
}

@keyframes afct-rise {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes afct-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.45); opacity: .35; }
}
@keyframes afct-spin {
  to { transform: rotate(360deg); }
}
@keyframes afct-wave {
  0%, 100% { transform: scaleY(.35); opacity: .45; }
  50% { transform: scaleY(1); opacity: 1; }
}
@keyframes afct-spark {
  0%, 100% { opacity: .2; transform: scale(.8); }
  50% { opacity: 1; transform: scale(1.15); }
}

.afct-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #E8C4B4;
}
.afct-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7DCFB6;
  animation: afct-pulse 1.8s ease-out infinite;
}
.afct-lede {
  margin: 0;
  max-width: 44ch;
  color: rgba(244, 247, 250, .72);
  font-size: 15px;
  line-height: 1.65;
}

/* ── Hero ── */
.afct-hero {
  position: relative;
  overflow: hidden;
  padding: 52px 0 58px;
  color: #F4F7FA;
  background: linear-gradient(125deg, #15202B 0%, #1B2430 48%, #1A4A52 100%);
}
.afct-hero-orbits {
  position: absolute;
  right: 6%;
  top: 50%;
  width: min(340px, 42vw);
  aspect-ratio: 1;
  transform: translateY(-50%);
  pointer-events: none;
}
.afct-orbit {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(232, 196, 180, .18);
  border-radius: 50%;
}
.afct-orbit-a {
  inset: 12%;
  border-color: rgba(125, 207, 182, .22);
  animation: afct-spin 28s linear infinite;
  border-style: dashed;
}
.afct-orbit-b {
  inset: 28%;
  border-color: rgba(184, 92, 56, .35);
  animation: afct-spin 18s linear infinite reverse;
}
.afct-orbit-c {
  inset: 44%;
  background: radial-gradient(circle, rgba(184, 92, 56, .35), transparent 70%);
  border-color: transparent;
}
.afct-spark {
  position: absolute;
  top: 18%;
  right: 22%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #E8C4B4;
  box-shadow: 0 0 18px rgba(232, 196, 180, .8);
  animation: afct-spark 2.4s ease-in-out infinite;
}
.afct-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.35fr .75fr;
  gap: 28px;
  align-items: end;
  animation: afct-rise .65s var(--afct-ease) both;
}
.afct-hero-copy h1 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.03em;
}
.afct-hero-copy h1 em {
  font-style: italic;
  font-weight: 500;
  color: #F0D2C4;
}
.afct-hero-meter {
  padding: 18px 18px 14px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(8px);
  display: grid;
  gap: 10px;
}
.afct-meter-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  font-size: 12px;
}
.afct-meter-row span {
  color: rgba(244, 247, 250, .55);
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: 10px;
}
.afct-meter-row strong {
  font-weight: 600;
  text-align: right;
  color: #F4F7FA;
}
.afct-wave {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 28px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, .12);
}
.afct-wave i {
  flex: 1;
  height: 100%;
  background: linear-gradient(180deg, #E8C4B4, var(--afct-copper));
  transform-origin: bottom;
  animation: afct-wave 1.2s ease-in-out infinite;
  opacity: .8;
}
.afct-wave i:nth-child(2) { animation-delay: .1s; }
.afct-wave i:nth-child(3) { animation-delay: .2s; }
.afct-wave i:nth-child(4) { animation-delay: .3s; }
.afct-wave i:nth-child(5) { animation-delay: .15s; }
.afct-wave i:nth-child(6) { animation-delay: .25s; }
.afct-wave i:nth-child(7) { animation-delay: .05s; }
.afct-wave i:nth-child(8) { animation-delay: .35s; }

/* ── Channel strip ── */
.afct-channels {
  position: relative;
  z-index: 2;
  margin-top: -28px;
  padding: 0 0 8px;
}
.afct-channel-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  animation: afct-rise .65s var(--afct-ease) .08s both;
}
.afct-ch {
  display: grid;
  gap: 6px;
  padding: 16px 16px 18px;
  background: var(--afct-paper);
  border: 1px solid var(--afct-line);
  box-shadow: 0 16px 36px -28px rgba(21, 32, 43, .45);
  text-decoration: none;
  color: inherit;
  transition: transform .3s var(--afct-ease), border-color .25s ease;
  min-width: 0;
}
a.afct-ch:hover,
.afct-ch:hover {
  transform: translateY(-3px);
  border-color: rgba(184, 92, 56, .45);
}
.afct-ch-code {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--afct-copper);
}
.afct-ch-key {
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--afct-muted);
}
.afct-ch strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--afct-ink);
  line-height: 1.35;
  word-break: break-word;
}
.afct-ch strong a {
  color: inherit;
}
.afct-ch strong a:hover { color: var(--afct-copper); }

/* ── Studio ── */
.afct-studio {
  padding: 36px 0 80px;
  background:
    radial-gradient(ellipse 50% 40% at 10% 0%, rgba(42, 111, 122, .08), transparent 55%),
    linear-gradient(180deg, var(--afct-mist) 0%, #F7F9FB 100%);
}
.afct-studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, .7fr);
  gap: 22px;
  align-items: start;
}

.afct-console {
  background: var(--afct-paper);
  border: 1px solid var(--afct-line);
  padding: 28px 28px 30px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
  box-shadow: 0 24px 50px -40px rgba(21, 32, 43, .4);
  animation: afct-rise .7s var(--afct-ease) .12s both;
}
.afct-console-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--afct-line);
}
.afct-console-tag {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--afct-copper);
}
.afct-console-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--afct-ink);
}
.afct-console-ref {
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--afct-muted);
  white-space: nowrap;
  padding: 8px 10px;
  border: 1px solid var(--afct-line);
  background: var(--afct-mist);
}

.afct-notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  margin-bottom: 18px;
  border: 1px solid var(--afct-line);
}
.afct-notice-ok {
  background: rgba(42, 111, 122, .08);
  border-color: rgba(42, 111, 122, .35);
}
.afct-notice-err {
  background: rgba(184, 92, 56, .08);
  border-color: rgba(184, 92, 56, .4);
  color: var(--afct-ink);
  font-size: 14px;
}
.afct-notice-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: var(--afct-teal);
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
}
.afct-notice strong {
  display: block;
  margin-bottom: 4px;
  color: var(--afct-ink);
}
.afct-notice p {
  margin: 0;
  font-size: 13px;
  color: var(--afct-muted);
}

.afct-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.afct-field {
  display: grid;
  gap: 7px;
  margin: 0;
}
.afct-field-span { grid-column: 1 / -1; }
.afct-field span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--afct-muted);
}
.afct-field span em {
  font-style: normal;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: none;
  opacity: .7;
}
.afct-field input,
.afct-field textarea {
  width: 100%;
  border: 1px solid var(--afct-line);
  background: var(--afct-mist);
  color: var(--afct-ink);
  padding: 12px 14px;
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.afct-field textarea { resize: vertical; min-height: 130px; }
.afct-field input:focus,
.afct-field textarea:focus {
  border-color: var(--afct-copper);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(184, 92, 56, .14);
}
.afct-form-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.afct-form-foot p {
  margin: 0;
  font-size: 13px;
  color: var(--afct-muted);
  max-width: 36ch;
}
.afct-form-foot a { color: var(--afct-teal); }
.afct-form-foot a:hover { color: var(--afct-copper); }
.afct-submit {
  min-width: 160px;
  justify-content: center;
  background: var(--afct-copper) !important;
  border-color: var(--afct-copper) !important;
  transition: transform .25s var(--afct-ease), filter .25s ease;
}
.afct-submit:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

/* ── Side rail ── */
.afct-side {
  display: grid;
  gap: 14px;
  animation: afct-rise .7s var(--afct-ease) .18s both;
}
.afct-side-tag {
  margin: 0 0 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--afct-copper);
}
.afct-legal,
.afct-topics,
.afct-shortcuts {
  background: var(--afct-paper);
  border: 1px solid var(--afct-line);
  padding: 18px;
}
.afct-legal {
  background: linear-gradient(160deg, #15202B 0%, #1B2C36 60%, #1A4A52 100%);
  color: #F4F7FA;
  border-color: transparent;
}
.afct-legal .afct-side-tag { color: #E8C4B4; }
.afct-legal strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 8px;
}
.afct-legal span {
  display: block;
  font-size: 13px;
  color: rgba(244, 247, 250, .65);
  line-height: 1.45;
}
.afct-gst {
  margin-top: 12px !important;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: 12px !important;
  letter-spacing: .04em;
}
.afct-topics ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.afct-topics li {
  padding: 10px 12px;
  background: var(--afct-mist);
  border-left: 3px solid var(--afct-teal);
  font-size: 13px;
  font-weight: 500;
  color: var(--afct-ink);
}
.afct-shortcuts {
  display: grid;
  gap: 0;
  padding: 18px 14px;
}
.afct-shortcuts .afct-side-tag { padding: 0 4px; }
.afct-shortcuts a {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px 8px;
  border-top: 1px solid var(--afct-line);
  color: var(--afct-ink);
  font-size: 14px;
  font-weight: 500;
  transition: color .2s ease, padding-left .25s var(--afct-ease);
}
.afct-shortcuts a:first-of-type { border-top: 0; }
.afct-shortcuts a span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--afct-muted);
}
.afct-shortcuts a:hover {
  color: var(--afct-copper);
  padding-left: 12px;
}

/* ── Responsive ── */
@media (max-width: 980px) {
  .afct-hero-grid { grid-template-columns: 1fr; }
  .afct-hero-orbits { opacity: .35; right: -8%; }
  .afct-channel-strip { grid-template-columns: 1fr 1fr; }
  .afct-studio-grid { grid-template-columns: 1fr; }
  .afct-console { clip-path: none; }
}

@media (max-width: 640px) {
  .afct-hero { padding: 40px 0 48px; }
  .afct-channels { margin-top: -20px; }
  .afct-channel-strip { grid-template-columns: 1fr; }
  .afct-fields { grid-template-columns: 1fr; }
  .afct-console { padding: 22px 18px 24px; }
  .afct-console-head { flex-direction: column; }
  .afct-form-foot { flex-direction: column; align-items: stretch; }
  .afct-submit { width: 100%; }
  .afct-hero-orbits { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .afct-orbit-a,
  .afct-orbit-b,
  .afct-spark,
  .afct-pulse,
  .afct-wave i,
  .afct-hero-grid,
  .afct-channel-strip,
  .afct-console,
  .afct-side {
    animation: none !important;
  }
  .afct-ch:hover,
  .afct-submit:hover,
  .afct-shortcuts a:hover {
    transform: none;
    padding-left: 8px;
  }
}
