/**
 * Appily Forty — Orchard About Hub
 * Layout: hero + stats + story/trails + benefits + legal + contact
 */

.page-company-forty.a40-company-forty {
  background: var(--a40-warm);
}
.page-company-forty .page-main { padding-top: 0; }

.a40-ab { padding-bottom: 3.5rem; }

/* Reveal */
.a40-ab-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1), transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.a40-ab-reveal.is-visible { opacity: 1; transform: none; }

/* Hero */
.a40-ab-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 4vw, 2.75rem) 0 1.25rem;
  background: var(--a40-hero-gradient);
  margin-bottom: 1.75rem;
}
.a40-ab-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.a40-ab-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(55px);
  opacity: 0.45;
  animation: a40-ab-blob 14s ease-in-out infinite;
}
.a40-ab-blob--1 { width: 300px; height: 300px; top: -12%; right: 6%; background: var(--a40-blob-warm); }
.a40-ab-blob--2 { width: 240px; height: 240px; bottom: -15%; left: 0; background: var(--a40-blob-cool); animation-delay: -5s; }
.a40-ab-ring {
  position: absolute;
  top: 50%;
  right: 10%;
  width: min(220px, 28vw);
  aspect-ratio: 1;
  border: 2px dashed rgba(45, 106, 79, 0.14);
  border-radius: 50%;
  transform: translateY(-50%);
  animation: a40-ab-spin 24s linear infinite;
}
@keyframes a40-ab-blob {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(10px, -8px); }
}
@keyframes a40-ab-spin { to { transform: translateY(-50%) rotate(360deg); } }

.a40-ab-hero-top {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: center;
  margin-bottom: 1.25rem;
}

.a40-ab-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.78rem;
  color: var(--a40-muted);
}
.a40-ab-crumb a {
  color: var(--a40-muted);
  text-decoration: none !important;
  font-weight: 600;
}
.a40-ab-crumb a:hover { color: var(--a40-orange); }
.a40-ab-crumb [aria-current="page"] { color: var(--a40-ink); font-weight: 700; }

.a40-ab-eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--a40-orange);
}
.a40-ab-hero h1 {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--a40-ink);
}
.a40-ab-hero h1 span {
  color: var(--a40-orange); -webkit-text-fill-color: var(--a40-orange); background: none;
}
.a40-ab-tagline {
  margin: 0;
  max-width: 48ch;
  font-size: 0.92rem;
  color: var(--a40-muted);
  line-height: 1.6;
}

.a40-ab-ref-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: var(--a40-surface);
  border: 2px solid var(--a40-border);
  box-shadow: 0 10px 32px rgba(33, 37, 41, 0.08);
  text-align: center;
  flex-shrink: 0;
}
.a40-ab-ref-icon { font-size: 1.5rem; line-height: 1; margin-bottom: 0.1rem; }
.a40-ab-ref-badge strong {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--a40-green-dark);
  letter-spacing: 0.06em;
}
.a40-ab-ref-badge span:last-child {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--a40-muted);
  letter-spacing: 0.04em;
}

.a40-ab-stats {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.a40-ab-stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.65rem 1rem;
  background: var(--a40-surface);
  border: 1px solid var(--a40-border);
  border-radius: 12px;
  min-width: 120px;
  box-shadow: 0 4px 16px rgba(33, 37, 41, 0.04);
}
.a40-ab-stat strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--a40-green-dark);
}
.a40-ab-stat span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--a40-muted);
}

/* Intro split */
.a40-ab-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 1.25rem;
  align-items: start;
  margin-bottom: 1.5rem;
}

.a40-ab-story,
.a40-ab-trails {
  background: var(--a40-surface);
  border: 1px solid var(--a40-border);
  border-radius: 16px;
  padding: 1.35rem 1.4rem 1.4rem;
  box-shadow: 0 8px 28px rgba(33, 37, 41, 0.06);
}
.a40-ab-story h2,
.a40-ab-trails h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--a40-ink);
}
.a40-ab-story p {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  color: var(--a40-muted);
  line-height: 1.65;
}
.a40-ab-story p:last-child { margin-bottom: 0; }
.a40-ab-muted { font-style: italic; opacity: 0.9; }

.a40-ab-trail-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 360px;
  overflow-y: auto;
}
.a40-ab-trail-grid li {
  animation: a40-ab-trail-in 0.4s ease both;
  animation-delay: calc(var(--trail-i, 0) * 0.04s);
}
@keyframes a40-ab-trail-in {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: none; }
}
.a40-ab-trail-grid a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  background: var(--a40-cream);
  border: 1px solid var(--a40-border);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--a40-ink);
  text-decoration: none !important;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.a40-ab-trail-grid a:hover {
  border-color: var(--a40-orange);
  background: rgba(224, 122, 47, 0.08);
  transform: translateX(4px);
  color: var(--a40-orange);
}
.a40-ab-trail-icon { font-size: 1rem; line-height: 1; }

/* Benefits */
.a40-ab-benefits {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}
.a40-ab-benefit {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.1rem;
  background: linear-gradient(160deg, var(--a40-green-dark) 0%, #1a3d2e 100%);
  border-radius: 14px;
  color: #fff;
  font-size: 0.84rem;
  line-height: 1.45;
  animation: a40-ab-ben-in 0.45s ease both;
  animation-delay: calc(var(--ben-i, 0) * 0.08s);
  box-shadow: 0 8px 24px rgba(26, 61, 46, 0.2);
}
@keyframes a40-ab-ben-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.a40-ab-benefit-num {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--a40-gold);
}

/* Legal */
.a40-ab-legal {
  background: var(--a40-surface);
  border: 1px solid var(--a40-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(33, 37, 41, 0.06);
  margin-bottom: 1.25rem;
}
.a40-ab-legal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.25rem 1.4rem;
  background: var(--a40-cream);
  border-bottom: 1px solid var(--a40-border);
}
.a40-ab-legal-tag {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--a40-mint);
  margin-bottom: 0.2rem;
}
.a40-ab-legal-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--a40-ink);
}
.a40-ab-legal-code {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(64, 145, 108, 0.1);
  color: var(--a40-green-dark);
}

.a40-ab-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.a40-ab-table th,
.a40-ab-table td {
  padding: 0.75rem 1.4rem;
  border-bottom: 1px solid var(--a40-border);
  text-align: left;
  vertical-align: top;
}
.a40-ab-table tr:last-child th,
.a40-ab-table tr:last-child td { border-bottom: 0; }
.a40-ab-table th {
  width: 32%;
  font-weight: 700;
  color: var(--a40-muted);
  background: rgba(255, 252, 247, 0.6);
}
.a40-ab-table td { color: var(--a40-ink); line-height: 1.5; }

/* Contact row */
.a40-ab-contact {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}
.a40-ab-contact-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  background: var(--a40-surface);
  border: 1px solid var(--a40-border);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(33, 37, 41, 0.04);
  transition: transform 0.2s, border-color 0.2s;
}
.a40-ab-contact-card:hover {
  transform: translateY(-3px);
  border-color: rgba(64, 145, 108, 0.3);
}
.a40-ab-contact-icon {
  font-size: 1.25rem;
  line-height: 1;
  margin-bottom: 0.25rem;
}
.a40-ab-contact-card strong {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--a40-muted);
}
.a40-ab-contact-card p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--a40-ink);
  line-height: 1.45;
  word-break: break-word;
}
.a40-ab-contact-card a {
  color: var(--a40-orange);
  font-weight: 600;
  text-decoration: none !important;
}
.a40-ab-contact-card a:hover { text-decoration: underline !important; }

/* Actions */
.a40-ab-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
}
.a40-ab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.15rem;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none !important;
  transition: background 0.2s, transform 0.2s, border-color 0.2s, color 0.2s;
}
.a40-ab-btn--primary {
  background: var(--a40-ink);
  color: #fff !important;
}
.a40-ab-btn--primary:hover {
  background: var(--a40-green-dark);
  transform: translateY(-2px);
}
.a40-ab-btn--ghost {
  background: transparent;
  color: var(--a40-ink) !important;
  border: 1px solid var(--a40-border);
}
.a40-ab-btn--ghost:hover {
  border-color: var(--a40-orange);
  color: var(--a40-orange) !important;
}

/* Responsive */
@media (max-width: 960px) {
  .a40-ab-hero-top { grid-template-columns: 1fr; }
  .a40-ab-ref-badge { justify-self: start; }
  .a40-ab-intro { grid-template-columns: 1fr; }
  .a40-ab-benefits { grid-template-columns: 1fr 1fr; }
  .a40-ab-contact { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .a40-ab-benefits { grid-template-columns: 1fr; }
  .a40-ab-table th,
  .a40-ab-table td { display: block; width: 100%; padding: 0.65rem 1rem; }
  .a40-ab-table th { border-bottom: 0; padding-bottom: 0.25rem; background: transparent; }
}

@media (prefers-reduced-motion: reduce) {
  .a40-ab-reveal, .a40-ab-trail-grid li, .a40-ab-benefit { animation: none !important; transition: none; opacity: 1; transform: none; }
  .a40-ab-blob, .a40-ab-ring { animation: none !important; }
}
