/* Appily Fiftythree — Atlas Charter company UI */

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

@keyframes afco-rise {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes afco-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.45); opacity: .35; }
}
@keyframes afco-spin {
  to { transform: rotate(360deg); }
}
@keyframes afco-glow {
  0%, 100% { opacity: .5; }
  50% { opacity: 1; }
}

.afco-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;
}
.afco-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7DCFB6;
  animation: afco-pulse 1.8s ease-out infinite;
}
.afco-lede {
  margin: 0;
  max-width: 46ch;
  color: rgba(244, 247, 250, .72);
  font-size: 15px;
  line-height: 1.65;
}

/* ── Hero ── */
.afco-hero {
  position: relative;
  overflow: hidden;
  padding: 52px 0 64px;
  color: #F4F7FA;
  background: linear-gradient(125deg, #15202B 0%, #1B2430 48%, #1A4A52 100%);
}
.afco-hero-mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 48% 55% at 85% 30%, rgba(184, 92, 56, .3), transparent 55%),
    radial-gradient(ellipse 40% 45% at 10% 90%, rgba(42, 111, 122, .22), transparent 50%),
    repeating-linear-gradient(-14deg, transparent 0 30px, rgba(255,255,255,.03) 30px 31px);
  pointer-events: none;
  animation: afco-glow 6s ease-in-out infinite;
}
.afco-compass {
  position: absolute;
  right: 7%;
  top: 50%;
  width: min(200px, 32vw);
  aspect-ratio: 1;
  transform: translateY(-50%);
  pointer-events: none;
}
.afco-compass-ring {
  position: absolute;
  inset: 0;
  border: 1px dashed rgba(232, 196, 180, .35);
  border-radius: 50%;
  animation: afco-spin 24s linear infinite;
}
.afco-compass-cross {
  position: absolute;
  inset: 18%;
  border: 1px solid rgba(125, 207, 182, .28);
  border-radius: 50%;
}
.afco-compass-cross::before,
.afco-compass-cross::after {
  content: "";
  position: absolute;
  background: rgba(232, 196, 180, .35);
}
.afco-compass-cross::before {
  left: 50%;
  top: 8%;
  bottom: 8%;
  width: 1px;
  transform: translateX(-50%);
}
.afco-compass-cross::after {
  top: 50%;
  left: 8%;
  right: 8%;
  height: 1px;
  transform: translateY(-50%);
}
.afco-compass-core {
  position: absolute;
  inset: 32%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--afco-copper), #9A4528);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: .06em;
  box-shadow: 0 14px 36px rgba(184, 92, 56, .4);
}

.afco-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr .9fr;
  gap: 28px;
  align-items: end;
  animation: afco-rise .65s var(--afco-ease) both;
}
.afco-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;
}
.afco-hero-copy h1 em {
  font-style: italic;
  font-weight: 500;
  color: #F0D2C4;
}
.afco-metrics {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.afco-metrics li {
  padding: 14px 12px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  display: grid;
  gap: 4px;
}
.afco-metrics strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: #E8C4B4;
  word-break: break-word;
}
.afco-metrics span {
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(244, 247, 250, .55);
}

/* ── Chapter rail ── */
.afco-chapters {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(243, 245, 248, .92);
  border-bottom: 1px solid var(--afco-line);
  backdrop-filter: blur(10px);
}
.afco-chapters-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.afco-chapter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--afco-muted);
  border-bottom: 3px solid transparent;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.afco-chapter span {
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--afco-copper);
}
.afco-chapter:hover { color: var(--afco-ink); background: rgba(255,255,255,.55); }
.afco-chapter.is-active {
  color: var(--afco-ink);
  border-bottom-color: var(--afco-copper);
  background: #fff;
}

/* ── Stage mosaic ── */
.afco-stage {
  padding: 36px 0 80px;
  background:
    radial-gradient(ellipse 40% 30% at 90% 10%, rgba(184, 92, 56, .06), transparent 50%),
    linear-gradient(180deg, var(--afco-mist) 0%, #F7F9FB 100%);
}
.afco-mosaic {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 16px;
  align-items: start;
}

.afco-panel {
  background: var(--afco-paper);
  border: 1px solid var(--afco-line);
  padding: 26px 26px 28px;
  animation: afco-rise .65s var(--afco-ease) both;
  transition: transform .3s var(--afco-ease), box-shadow .3s ease;
}
.afco-panel:hover {
  box-shadow: 0 22px 44px -36px rgba(21, 32, 43, .4);
}
.afco-panel-story {
  grid-column: 1 / -1;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
  animation-delay: .05s;
}
.afco-panel-offer { animation-delay: .1s; }
.afco-panel-legal {
  animation-delay: .15s;
  background: linear-gradient(165deg, #15202B 0%, #1B2C36 55%, #1A4A52 100%);
  color: #F4F7FA;
  border-color: transparent;
}
.afco-panel-contact {
  grid-column: 1 / -1;
  animation-delay: .2s;
}

.afco-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--afco-line);
}
.afco-panel-legal .afco-panel-head {
  border-bottom-color: rgba(255, 255, 255, .12);
}
.afco-panel-tag {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--afco-copper);
}
.afco-panel-legal .afco-panel-tag { color: #E8C4B4; }
.afco-panel-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--afco-ink);
  max-width: 18ch;
}
.afco-panel-legal .afco-panel-head h2 { color: #F4F7FA; }
.afco-registered {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border: 2px solid rgba(232, 196, 180, .65);
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #E8C4B4;
  transform: rotate(-12deg);
  flex-shrink: 0;
}

.afco-panel-body p {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--afco-muted);
  max-width: 68ch;
}
.afco-panel-legal .afco-panel-body p { color: rgba(244, 247, 250, .72); }

.afco-seals {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.afco-seals li {
  padding: 8px 12px;
  border: 1px solid var(--afco-line);
  background: var(--afco-mist);
  font-size: 12px;
  font-weight: 600;
  color: var(--afco-ink);
}

/* Aisles */
.afco-aisles {
  display: grid;
  gap: 8px;
  margin: 4px 0 20px;
}
.afco-aisle {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--afco-line);
  background: var(--afco-mist);
  color: var(--afco-ink);
  transition: transform .25s var(--afco-ease), border-color .2s ease, background .2s ease;
}
.afco-aisle:hover {
  transform: translateX(4px);
  border-color: rgba(184, 92, 56, .45);
  background: #fff;
}
.afco-aisle-code {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--afco-copper);
}
.afco-aisle-name { font-size: 14px; font-weight: 600; }
.afco-aisle-go { color: var(--afco-teal); font-weight: 700; }

.afco-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}
.afco-btn-primary {
  background: var(--afco-copper) !important;
  border-color: var(--afco-copper) !important;
  transition: transform .25s var(--afco-ease), filter .25s ease;
}
.afco-btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.afco-btn-ghost {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--afco-line);
  color: var(--afco-ink);
  font-weight: 600;
  font-size: 14px;
  background: transparent;
  transition: border-color .2s ease, color .2s ease;
}
.afco-btn-ghost:hover {
  border-color: var(--afco-copper);
  color: var(--afco-copper);
}

/* Legal grid */
.afco-legal {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid rgba(255, 255, 255, .14);
}
.afco-legal-cell {
  padding: 14px 14px 12px;
  border-right: 1px solid rgba(255, 255, 255, .1);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  display: grid;
  gap: 6px;
}
.afco-legal-cell:nth-child(2n) { border-right: 0; }
.afco-legal-wide { grid-column: 1 / -1; border-right: 0; }
.afco-legal-cell span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(232, 196, 180, .75);
}
.afco-legal-cell p {
  margin: 0 !important;
  font-size: 14px !important;
  font-weight: 600;
  color: #F4F7FA !important;
  max-width: none !important;
  line-height: 1.4 !important;
}
.afco-mono {
  font-family: ui-monospace, Consolas, monospace !important;
  letter-spacing: .04em;
}

/* Contact */
.afco-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-bottom: 20px;
  border: 1px solid var(--afco-line);
}
.afco-contact-grid > div {
  padding: 14px;
  border-right: 1px solid var(--afco-line);
  border-bottom: 1px solid var(--afco-line);
  display: grid;
  gap: 6px;
}
.afco-contact-grid > div:nth-child(2n) { border-right: 0; }
.afco-contact-wide { grid-column: 1 / -1; border-right: 0; }
.afco-contact-grid span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--afco-muted);
}
.afco-contact-grid p {
  margin: 0 !important;
  font-size: 15px !important;
  font-weight: 600;
  color: var(--afco-ink) !important;
  max-width: none !important;
}
.afco-contact-grid a { color: var(--afco-teal); }
.afco-contact-grid a:hover { color: var(--afco-copper); }

.afco-policies {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
.afco-policies a {
  display: grid;
  gap: 6px;
  padding: 14px 12px;
  border: 1px solid var(--afco-line);
  background: var(--afco-mist);
  color: var(--afco-ink);
  font-size: 13px;
  font-weight: 600;
  transition: transform .25s var(--afco-ease), border-color .2s ease, background .2s ease;
}
.afco-policies a span {
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--afco-copper);
}
.afco-policies a:hover {
  transform: translateY(-2px);
  border-color: rgba(184, 92, 56, .45);
  background: #fff;
}

/* ── Responsive ── */
@media (max-width: 980px) {
  .afco-hero-grid { grid-template-columns: 1fr; }
  .afco-compass { opacity: .28; right: -6%; }
  .afco-mosaic { grid-template-columns: 1fr; }
  .afco-panel-story { clip-path: none; }
  .afco-policies { grid-template-columns: 1fr 1fr; }
  .afco-chapters-inner { overflow-x: auto; }
  .afco-chapter { white-space: nowrap; min-width: max-content; padding: 14px 16px; }
}

@media (max-width: 640px) {
  .afco-hero { padding: 40px 0 52px; }
  .afco-compass { display: none; }
  .afco-metrics { grid-template-columns: 1fr 1fr; }
  .afco-panel { padding: 20px 18px 22px; }
  .afco-legal,
  .afco-contact-grid { grid-template-columns: 1fr; }
  .afco-legal-cell,
  .afco-legal-cell:nth-child(2n),
  .afco-contact-grid > div,
  .afco-contact-grid > div:nth-child(2n) {
    border-right: 0;
  }
  .afco-legal-wide,
  .afco-contact-wide { grid-column: auto; }
  .afco-policies { grid-template-columns: 1fr; }
  .afco-actions { flex-direction: column; align-items: stretch; }
  .afco-btn-primary,
  .afco-btn-ghost { justify-content: center; width: 100%; }
  .afco-chapter span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .afco-compass-ring,
  .afco-pulse,
  .afco-hero-mesh,
  .afco-hero-grid,
  .afco-panel {
    animation: none !important;
  }
  .afco-aisle:hover,
  .afco-policies a:hover,
  .afco-btn-primary:hover,
  .afco-panel:hover {
    transform: none;
  }
}
