/**
 * Appily Fortyfive — Farm Roots (company info)
 * Layout: centered hero + story deck + category grid + legal deck + runway
 */

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

.page-company-roots .page-main {
  padding-top: 0;
}

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

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

.a45-roots-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);
}

.a45-roots-section-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(--roots-dark);
  background: rgba(46, 125, 50, 0.1);
  border-radius: 999px;
}

/* ── Hero ── */
.a45-roots-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-roots-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

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

.a45-roots-mesh {
  position: absolute;
  inset: -22%;
  background:
    radial-gradient(circle at calc(50% + var(--roots-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: a45RootsMesh 13s ease-in-out infinite alternate;
}
@keyframes a45RootsMesh {
  from { transform: scale(1); }
  to { transform: scale(1.07) rotate(2deg); }
}

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

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

.a45-roots-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-roots-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 720px;
  margin: 0 auto;
}

.a45-roots-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.45rem;
  margin-bottom: 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
}
.a45-roots-crumb a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
}
.a45-roots-crumb a:hover {
  color: #fff;
}
.a45-roots-crumb span {
  color: rgba(255, 255, 255, 0.35);
}

.a45-roots-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-roots-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--a45-secondary);
  animation: a45RootsLive 2s ease-out infinite;
}
@keyframes a45RootsLive {
  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-roots-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-roots-hero h1 em {
  font-style: normal;
  color: #b8e6a8;
}
.a45-roots-tagline {
  margin: 0 0 1.25rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.74);
  max-width: 46ch;
}

.a45-roots-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.a45-roots-metrics li {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 90px;
  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-roots-metrics li strong {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.1;
}
.a45-roots-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-roots-metrics-ref {
  border-style: dashed;
}

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

.a45-roots-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}
.a45-roots-panel-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--roots-dark);
}
.a45-roots-panel-num {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-family: var(--font-serif);
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  background: var(--a45-primary);
  flex-shrink: 0;
}

/* Story deck */
.a45-roots-deck {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: start;
  margin-top: -2.5rem;
  margin-bottom: 1.75rem;
  position: relative;
  z-index: 2;
}

.a45-roots-story {
  padding: 1.25rem 1.3rem;
  background: #fff;
  border: 1px solid var(--roots-border);
  border-radius: 22px;
  box-shadow: var(--roots-shadow);
  border-left: 4px solid var(--a45-primary);
}
.a45-roots-story p {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--roots-dark);
}
.a45-roots-story p:last-child {
  margin-bottom: 0;
}
.a45-roots-muted {
  color: var(--roots-muted) !important;
}

.a45-roots-promise {
  position: sticky;
  top: 1.25rem;
  padding: 1.15rem 1rem;
  background: var(--roots-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-roots-rail-label {
  margin: 0 0 0.75rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--roots-muted);
}
.a45-roots-promise-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.a45-roots-promise-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--roots-dark);
  background: #fff;
  border: 1px solid var(--roots-border);
  border-radius: 12px;
  animation: a45RootsPromiseIn 0.5s var(--roots-ease) both;
  animation-delay: calc(var(--promise-i, 0) * 0.06s);
}
@keyframes a45RootsPromiseIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: none; }
}
.a45-roots-promise-num {
  font-family: ui-monospace, monospace;
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--a45-primary);
  flex-shrink: 0;
}

/* Categories grid */
.a45-roots-categories {
  margin-bottom: 1.75rem;
}
.a45-roots-section-head {
  margin-bottom: 1rem;
}
.a45-roots-section-head h2 {
  margin: 0 0 0.25rem;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--roots-dark);
}
.a45-roots-section-head p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--roots-muted);
}

.a45-roots-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.65rem;
}
.a45-roots-category {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1rem 0.85rem;
  text-decoration: none !important;
  background: #fff;
  border: 1px solid var(--roots-border);
  border-radius: 18px;
  box-shadow: var(--roots-shadow);
  overflow: hidden;
  animation: a45RootsCatIn 0.5s var(--roots-ease) both;
  animation-delay: calc(var(--cat-i, 0) * 0.05s);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
@keyframes a45RootsCatIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.a45-roots-category:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 48px rgba(27, 58, 26, 0.14);
}
.a45-roots-category-glow {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  background: radial-gradient(circle at 20% 30%, rgba(129, 199, 132, 0.2), transparent 55%);
}
.a45-roots-category:hover .a45-roots-category-glow {
  opacity: 1;
}
.a45-roots-category-glyph {
  font-size: 1.65rem;
  line-height: 1;
}
.a45-roots-category strong {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--roots-dark);
  line-height: 1.25;
}
.a45-roots-category span:nth-of-type(2) {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--roots-muted);
}
.a45-roots-category-arrow {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  font-size: 0.9rem;
  color: var(--a45-secondary);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s, transform 0.2s;
}
.a45-roots-category:hover .a45-roots-category-arrow {
  opacity: 1;
  transform: none;
}

.a45-roots-category.tone-leaf:hover { border-color: rgba(76, 175, 80, 0.4); }
.a45-roots-category.tone-root:hover { border-color: rgba(141, 110, 99, 0.4); }
.a45-roots-category.tone-cruc:hover { border-color: rgba(129, 199, 132, 0.45); }
.a45-roots-category.tone-pepper:hover { border-color: rgba(255, 111, 0, 0.35); }
.a45-roots-category.tone-gourd:hover { border-color: rgba(255, 193, 7, 0.35); }
.a45-roots-category.tone-pod:hover { border-color: rgba(46, 125, 50, 0.35); }
.a45-roots-category.tone-exotic:hover { border-color: rgba(156, 39, 176, 0.3); }

/* Legal deck */
.a45-roots-legal-deck {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: start;
  margin-bottom: 1.25rem;
}

.a45-roots-registry {
  padding: 1.25rem 1.3rem;
  background: #fff;
  border: 1px solid var(--roots-border);
  border-radius: 22px;
  box-shadow: var(--roots-shadow);
}
.a45-roots-registry .a45-roots-panel-head {
  justify-content: space-between;
  align-items: flex-start;
}
.a45-roots-registry-code {
  font-family: ui-monospace, monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--roots-muted);
  padding: 0.3rem 0.6rem;
  background: var(--roots-blush);
  border-radius: 999px;
}

.a45-roots-registry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0;
}
.a45-roots-reg-cell {
  padding: 0.65rem 0.75rem;
  background: var(--roots-blush);
  border-radius: 12px;
  border: 1px solid rgba(27, 58, 26, 0.06);
}
.a45-roots-reg-cell--wide {
  grid-column: 1 / -1;
}
.a45-roots-reg-cell dt {
  margin: 0 0 0.2rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--roots-muted);
}
.a45-roots-reg-cell dd {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--roots-dark);
  line-height: 1.4;
  word-break: break-word;
}

.a45-roots-contact {
  position: sticky;
  top: 1.25rem;
  padding: 1.15rem 1.2rem;
  background: linear-gradient(145deg, rgba(46, 125, 50, 0.08), rgba(129, 199, 132, 0.15));
  border: 1px solid var(--roots-border);
  border-radius: 22px;
  box-shadow: var(--roots-shadow);
}
.a45-roots-contact-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.a45-roots-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}
.a45-roots-contact-icon {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
}
.a45-roots-contact-list strong {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--roots-muted);
  margin-bottom: 0.15rem;
}
.a45-roots-contact-list p {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--roots-dark);
}
.a45-roots-contact-list a {
  color: var(--a45-primary);
  text-decoration: none;
}
.a45-roots-contact-list a:hover {
  text-decoration: underline;
}
.a45-roots-contact-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.62rem 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff !important;
  text-decoration: none !important;
  background: linear-gradient(120deg, var(--a45-primary), #2e7d32);
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(46, 125, 50, 0.25);
  transition: filter 0.2s, transform 0.2s;
}
.a45-roots-contact-cta:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
}

/* What we sell */
.a45-roots-sell {
  margin-bottom: 1.75rem;
  padding: 1.25rem 1.3rem;
  background: #fff;
  border: 1px solid var(--roots-border);
  border-radius: 22px;
  box-shadow: var(--roots-shadow);
  border-left: 4px solid var(--a45-leaf);
}
.a45-roots-sell p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--roots-dark);
}

/* Runway */
.a45-roots-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(--roots-dark), #162a14);
  border-radius: 22px;
  box-shadow: 0 16px 48px rgba(15, 36, 16, 0.25);
}
.a45-roots-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-roots-tile:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(129, 199, 132, 0.35);
}
.a45-roots-tile--primary {
  background: rgba(129, 199, 132, 0.15);
  border-color: rgba(129, 199, 132, 0.3);
}
.a45-roots-tile-num {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.35);
}
.a45-roots-tile-icon {
  font-size: 1.35rem;
  line-height: 1;
}
.a45-roots-tile strong {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: #f4faf0;
}
.a45-roots-tile small {
  display: block;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.55);
}
.a45-roots-tile-arrow {
  margin-left: auto;
  font-size: 1rem;
  color: var(--a45-secondary);
  transition: transform 0.2s;
}
.a45-roots-tile:hover .a45-roots-tile-arrow {
  transform: translateX(3px);
}
.a45-roots-tile--wide {
  grid-column: 1 / -1;
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .a45-roots-deck,
  .a45-roots-legal-deck {
    grid-template-columns: 1fr;
  }
  .a45-roots-promise,
  .a45-roots-contact {
    position: static;
  }
}

@media (max-width: 720px) {
  .a45-roots-registry-grid {
    grid-template-columns: 1fr;
  }
  .a45-roots-reg-cell--wide {
    grid-column: auto;
  }
  .a45-roots-category-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

@media (max-width: 480px) {
  .a45-roots-runway {
    grid-template-columns: 1fr;
  }
  .a45-roots-tile--wide {
    grid-column: auto;
  }
  .a45-roots-metrics li {
    flex: 1 0 calc(50% - 0.3rem);
    min-width: 0;
  }
}

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