/**
 * Appily Fortyfive — Produce Relay (contact)
 * Layout: centered hero + channel mosaic + rail | form deck + dark runway
 */

.page-contact-relay {
  --relay-dark: #0f2410;
  --relay-mid: #1a3318;
  --relay-glass: rgba(255, 255, 255, 0.92);
  --relay-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --relay-shadow: 0 18px 50px rgba(27, 58, 26, 0.12);
  --relay-muted: #5a6b58;
  --relay-border: rgba(27, 58, 26, 0.1);
  --relay-blush: rgba(129, 199, 132, 0.12);
  background: var(--a45-cream);
}

.page-contact-relay .page-main {
  padding-top: 0;
}

.a45-relay {
  padding-bottom: 0;
}

/* ── Reveal ── */
.a45-relay-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s var(--relay-ease), transform 0.65s var(--relay-ease);
}
.a45-relay-reveal.is-visible {
  opacity: 1;
  transform: none;
}

.a45-relay-kicker {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

/* ── Hero ── */
.a45-relay-hero {
  position: relative;
  padding: clamp(2.5rem, 5.5vw, 3.75rem) 0 clamp(4rem, 8vw, 5.5rem);
  overflow: hidden;
  color: #f4faf0;
  text-align: center;
}

.a45-relay-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.a45-relay-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, var(--relay-dark) 0%, var(--relay-mid) 55%, #243d22 100%);
  z-index: -1;
}

.a45-relay-mesh {
  position: absolute;
  inset: -22%;
  background:
    radial-gradient(circle at calc(50% + var(--relay-parallax-x, 0) * 60px) 38%, rgba(129, 199, 132, 0.38), transparent 42%),
    radial-gradient(circle at 18% 72%, rgba(255, 111, 0, 0.18), transparent 38%),
    radial-gradient(circle at 82% 58%, rgba(46, 125, 50, 0.42), transparent 35%);
  animation: a45RelayMesh 13s ease-in-out infinite alternate;
}
@keyframes a45RelayMesh {
  from { transform: scale(1); }
  to { transform: scale(1.07) rotate(2deg); }
}

.a45-relay-slice {
  position: absolute;
  width: 130%;
  height: 50%;
  opacity: 0.1;
}
.a45-relay-slice--1 {
  top: -10%;
  left: -15%;
  background: linear-gradient(135deg, var(--a45-leaf), transparent);
  transform: rotate(-6deg);
}
.a45-relay-slice--2 {
  bottom: -15%;
  right: -18%;
  background: linear-gradient(-45deg, var(--a45-secondary), transparent);
  transform: rotate(4deg);
}

.a45-relay-orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(129, 199, 132, 0.22);
  animation: a45RelaySpin 24s linear infinite;
}
.a45-relay-orbit--1 {
  width: min(340px, 48vw);
  height: min(340px, 48vw);
  top: -18%;
  right: -8%;
}
@keyframes a45RelaySpin {
  to { transform: rotate(360deg); }
}

.a45-relay-slash {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 80px;
  background: var(--a45-cream);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

.a45-relay-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 640px;
  margin: 0 auto;
}

.a45-relay-live {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.32rem 0.75rem;
  margin-bottom: 0.65rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}
.a45-relay-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--a45-secondary);
  animation: a45RelayLive 2s ease-out infinite;
}
@keyframes a45RelayLive {
  0% { box-shadow: 0 0 0 0 rgba(255, 111, 0, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(255, 111, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 111, 0, 0); }
}

.a45-relay-hero h1 {
  margin: 0 0 0.55rem;
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.02em;
}
.a45-relay-hero h1 em {
  font-style: normal;
  color: #b8e6a8;
}
.a45-relay-lede {
  margin: 0 0 1.25rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.74);
  max-width: 46ch;
}

.a45-relay-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.a45-relay-metrics li {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 100px;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  backdrop-filter: blur(8px);
}
.a45-relay-metrics li strong {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.1;
}
.a45-relay-metrics li span {
  margin-top: 0.2rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}
.a45-relay-metrics-hours {
  max-width: 220px;
}
.a45-relay-metrics-hours span {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.68rem;
  line-height: 1.35;
  text-align: center;
}

/* ── Stage ── */
.a45-relay-stage {
  padding: clamp(1.5rem, 3vw, 2.25rem) 0 2.5rem;
}

/* ── Channel mosaic ── */
.a45-relay-mosaic {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.55rem;
  margin-top: -2.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 2;
}
.a45-relay-mosaic-cell {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  background: #fff;
  border: 1px solid var(--relay-border);
  border-radius: 16px;
  box-shadow: var(--relay-shadow);
  text-decoration: none !important;
  color: inherit;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.a45-relay-mosaic-cell:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(27, 58, 26, 0.14);
  border-color: rgba(46, 125, 50, 0.25);
}
.a45-relay-mosaic-cell--wide {
  grid-column: span 2;
}
.a45-relay-mosaic-num {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--relay-muted);
  flex-shrink: 0;
}
.a45-relay-mosaic-icon {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
}
.a45-relay-mosaic-cell strong {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--relay-dark);
  margin-bottom: 0.15rem;
}
.a45-relay-mosaic-cell small {
  display: block;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--relay-muted);
  word-break: break-word;
}

/* ── Deck: rail + form ── */
.a45-relay-deck {
  display: grid;
  grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: start;
  margin-bottom: 1.75rem;
}

.a45-relay-rail {
  position: sticky;
  top: 1.25rem;
  padding: 1.15rem 1rem;
  background: var(--relay-glass);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 18px;
  box-shadow: 0 8px 28px rgba(27, 58, 26, 0.06);
  backdrop-filter: blur(10px);
}
.a45-relay-rail-label {
  margin: 0 0 0.65rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--relay-muted);
}

.a45-relay-topics {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.a45-relay-topic {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--relay-border);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--relay-dark);
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s, color 0.2s;
}
.a45-relay-topic:hover {
  border-color: rgba(46, 125, 50, 0.3);
  background: var(--relay-blush);
}
.a45-relay-topic.is-active {
  background: var(--a45-primary);
  border-color: var(--a45-primary);
  color: #fff;
  transform: translateX(4px);
}

.a45-relay-routes {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--relay-border);
}
.a45-relay-routes a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--relay-dark);
  text-decoration: none;
  transition: color 0.2s;
}
.a45-relay-routes a:hover {
  color: var(--a45-primary);
}
.a45-relay-routes a span {
  color: var(--a45-secondary);
  transition: transform 0.2s;
}
.a45-relay-routes a:hover span {
  transform: translateX(3px);
}

/* Form panel */
.a45-relay-form-wrap {
  padding: 1.25rem 1.3rem;
  background: #fff;
  border: 1px solid var(--relay-border);
  border-radius: 22px;
  box-shadow: var(--relay-shadow);
  border-left: 4px solid var(--a45-primary);
}

.a45-relay-form-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}
.a45-relay-form-badge {
  display: inline-block;
  margin-bottom: 0.35rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--relay-dark);
  background: rgba(46, 125, 50, 0.1);
  border-radius: 999px;
}
.a45-relay-form-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--relay-dark);
}
.a45-relay-ref {
  font-family: ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--relay-muted);
  padding: 0.35rem 0.65rem;
  background: var(--relay-blush);
  border-radius: 999px;
}

.a45-relay-form-lede {
  margin: 0 0 1.15rem;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--relay-muted);
}

.a45-relay-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
}
.a45-relay-notice.is-success {
  background: rgba(129, 199, 132, 0.18);
  border: 1px solid rgba(46, 125, 50, 0.2);
}
.a45-relay-notice.is-error {
  background: #fef2f2;
  border: 1px solid rgba(185, 28, 28, 0.18);
}
.a45-relay-notice-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.8);
}
.a45-relay-notice.is-success .a45-relay-notice-icon {
  color: var(--a45-primary);
}
.a45-relay-notice.is-error .a45-relay-notice-icon {
  color: #9b2c2c;
}
.a45-relay-notice strong {
  display: block;
  font-size: 0.88rem;
  color: var(--relay-dark);
}
.a45-relay-notice p {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: var(--relay-muted);
  line-height: 1.45;
}

.a45-relay-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.a45-relay-field-wide {
  grid-column: 1 / -1;
}
.a45-relay-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.a45-relay-field > span:first-child {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--relay-dark);
}
.a45-relay-field input,
.a45-relay-field textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  font: inherit;
  font-size: 0.88rem;
  color: var(--relay-dark);
  background: var(--relay-blush);
  border: 1px solid var(--relay-border);
  border-radius: 12px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.a45-relay-field input:focus,
.a45-relay-field textarea:focus {
  outline: none;
  border-color: rgba(46, 125, 50, 0.35);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}
.a45-relay-field textarea {
  min-height: 120px;
  resize: vertical;
}
.a45-relay-char {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--relay-muted);
  text-align: right;
}

.a45-relay-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1.25rem;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(120deg, var(--a45-primary), #2e7d32);
  box-shadow: 0 8px 22px rgba(46, 125, 50, 0.28);
  cursor: pointer;
  transition: filter 0.2s, transform 0.2s;
}
.a45-relay-submit:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
}
.a45-relay-submit-arrow {
  transition: transform 0.2s;
}
.a45-relay-submit:hover .a45-relay-submit-arrow {
  transform: translateX(4px);
}

/* ── Runway ── */
.a45-relay-runway {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  background: linear-gradient(145deg, var(--relay-dark), #162a14);
  border-radius: 22px;
  box-shadow: 0 16px 48px rgba(15, 36, 16, 0.25);
}
.a45-relay-tile {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  text-decoration: none !important;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
}
.a45-relay-tile:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(129, 199, 132, 0.35);
}
.a45-relay-tile-num {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.35);
}
.a45-relay-tile-icon {
  font-size: 1.35rem;
  line-height: 1;
}
.a45-relay-tile strong {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: #f4faf0;
}
.a45-relay-tile small {
  display: block;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.55);
}
.a45-relay-tile-arrow {
  margin-left: auto;
  font-size: 1rem;
  color: var(--a45-secondary);
  transition: transform 0.2s;
}
.a45-relay-tile:hover .a45-relay-tile-arrow {
  transform: translateX(3px);
}
.a45-relay-tile--wide {
  grid-column: 1 / -1;
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .a45-relay-deck {
    grid-template-columns: 1fr;
  }
  .a45-relay-rail {
    position: static;
  }
  .a45-relay-topics {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .a45-relay-topic {
    flex: 1 0 calc(50% - 0.25rem);
    min-width: 120px;
  }
  .a45-relay-topic.is-active {
    transform: none;
  }
  .a45-relay-mosaic-cell--wide {
    grid-column: span 1;
  }
}

@media (max-width: 720px) {
  .a45-relay-fields {
    grid-template-columns: 1fr;
  }
  .a45-relay-mosaic {
    grid-template-columns: 1fr;
  }
  .a45-relay-metrics-hours {
    max-width: none;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .a45-relay-runway {
    grid-template-columns: 1fr;
  }
  .a45-relay-tile--wide {
    grid-column: auto;
  }
  .a45-relay-topics {
    flex-direction: column;
  }
  .a45-relay-topic {
    flex: 1 0 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .a45-relay-mesh,
  .a45-relay-orbit,
  .a45-relay-live-dot {
    animation: none;
  }
}
