/* Accufy marketing home — Editorial ink
   Shared tokens / nav / buttons / section utilities: accufy-front.css */

.afy-home {
  color: var(--afy-ink);
  background: var(--afy-paper);
}

/* —— Hero: luminous mist + cinematic invoice plane —— */
.afy-hero {
  position: relative;
  /* Compact marketing band — not full-viewport tall */
  min-height: min(74vh, 620px);
  min-height: min(74dvh, 620px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(58% 48% at 88% 22%, var(--afy-teal-wash) 0%, transparent 58%),
    radial-gradient(48% 42% at 18% 28%, var(--afy-sky-wash) 0%, transparent 60%),
    radial-gradient(36% 34% at 72% 88%, var(--afy-amber-wash) 0%, transparent 55%),
    radial-gradient(50% 55% at 70% 85%, rgba(11, 18, 32, 0.05) 0%, transparent 55%),
    linear-gradient(160deg, #e4f0f4 0%, var(--afy-mist) 42%, var(--afy-lume) 100%);
  padding: 5.5rem 0 3rem;
}

/* Ambient mist drift */
.afy-hero::before {
  content: "";
  position: absolute;
  inset: -22% -14%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 46% 38% at 18% 42%, rgba(255, 255, 255, 0.55) 0%, transparent 70%),
    radial-gradient(ellipse 42% 36% at 82% 30%, rgba(14, 124, 123, 0.14) 0%, transparent 68%),
    radial-gradient(ellipse 38% 34% at 12% 70%, rgba(58, 142, 168, 0.12) 0%, transparent 65%),
    radial-gradient(ellipse 34% 30% at 62% 82%, rgba(201, 137, 58, 0.09) 0%, transparent 62%);
  animation: afy-mist-drift 26s ease-in-out infinite alternate;
  will-change: transform, opacity;
}

/* Soft luminous sweep — atmospheric, not glow spam */
.afy-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    108deg,
    transparent 0%,
    transparent 38%,
    rgba(255, 255, 255, 0.2) 47%,
    rgba(58, 142, 168, 0.08) 51%,
    rgba(201, 137, 58, 0.05) 54%,
    transparent 62%,
    transparent 100%
  );
  background-size: 240% 100%;
  background-position: 130% 0;
  animation: afy-lume-sweep 20s var(--afy-ease) 1.4s infinite;
  mix-blend-mode: soft-light;
  opacity: 0.55;
}

.afy-hero__plane {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  perspective: 1800px;
  animation: afy-plane-float 16s ease-in-out 1.6s infinite;
  will-change: transform;
}

.afy-hero__plane-inner {
  position: absolute;
  right: -10%;
  top: 50%;
  width: min(92vw, 1120px);
  height: auto;
  transform: translateY(-46%) rotateY(-22deg) rotateX(10deg) rotateZ(-3deg);
  transform-style: preserve-3d;
  animation: afy-plane-in 1.25s var(--afy-ease) 0.06s both;
  filter: drop-shadow(0 36px 64px rgba(11, 18, 32, 0.22));
}

.afy-hero__plane-inner::after {
  content: "";
  position: absolute;
  inset: 5% 3% 3% 6%;
  background:
    linear-gradient(130deg, rgba(255, 255, 255, 0.28) 0%, transparent 40%),
    repeating-linear-gradient(
      -14deg,
      transparent,
      transparent 4px,
      rgba(11, 18, 32, 0.012) 4px,
      rgba(11, 18, 32, 0.012) 5px
    );
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.afy-hero__plane svg,
.afy-hero__svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
}

.afy-hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      98deg,
      rgba(245, 248, 250, 0.98) 0%,
      rgba(245, 248, 250, 0.94) 26%,
      rgba(232, 238, 243, 0.58) 46%,
      rgba(232, 238, 243, 0.1) 60%,
      transparent 72%
    ),
    linear-gradient(
      180deg,
      rgba(238, 243, 246, 0.5) 0%,
      transparent 16%,
      transparent 84%,
      rgba(245, 248, 250, 0.35) 100%
    );
}

.afy-hero__mist {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 40% at 30% 50%, rgba(250, 252, 253, 0.45) 0%, transparent 70%),
    radial-gradient(ellipse 40% 35% at 78% 35%, rgba(58, 142, 168, 0.08) 0%, transparent 65%);
  animation: afy-mist-breathe 14s ease-in-out infinite alternate;
  opacity: 0.85;
}

.afy-hero__grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
  background-size: 200px;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.afy-hero__shell {
  position: relative;
  z-index: 2;
  width: 100%;
}

.afy-hero__content {
  position: relative;
  z-index: 2;
  max-width: 36rem;
  padding: 0.75rem 0 0.5rem;
}

/* Brand first — monumental near-black; accent rule supports, never drowns */
.afy-brand {
  display: block;
  font-size: clamp(3.55rem, 9.5vw, 6.35rem);
  font-weight: 800;
  line-height: 0.86;
  letter-spacing: -0.055em;
  color: var(--afy-ink);
  margin: 0 0 1.15rem;
  padding-bottom: 0.9rem;
  border-bottom: none;
  background-image: var(--afy-accent-rule);
  background-size: 100% 2px;
  background-position: left bottom;
  background-repeat: no-repeat;
  width: fit-content;
  max-width: 100%;
  animation: afy-rise 0.65s var(--afy-ease) both;
}

.afy-headline {
  font-size: clamp(1.22rem, 2.3vw, 1.58rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.03em;
  color: var(--afy-ink);
  margin: 0 0 0.75rem;
  max-width: 24ch;
  animation: afy-rise 0.68s var(--afy-ease) 0.14s both;
}

.afy-lede {
  font-size: clamp(1.02rem, 1.45vw, 1.12rem);
  font-weight: 400;
  line-height: 1.65;
  color: var(--afy-mute);
  margin: 0 0 1.5rem;
  max-width: 34ch;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  animation: afy-rise 0.7s var(--afy-ease) 0.26s both;
}

.afy-hero .afy-ctas {
  animation: afy-rise 0.72s var(--afy-ease) 0.4s both;
}

@keyframes afy-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes afy-plane-in {
  from {
    opacity: 0;
    transform: translateY(-42%) translateX(40px) rotateY(-22deg) rotateX(10deg) rotateZ(-3deg) scale(1.04);
  }
  to {
    opacity: 1;
    transform: translateY(-46%) rotateY(-22deg) rotateX(10deg) rotateZ(-3deg) scale(1);
  }
}

@keyframes afy-plane-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -10px, 0);
  }
}

@keyframes afy-mist-drift {
  0% {
    transform: translate3d(-2.5%, -1%, 0) scale(1);
    opacity: 0.78;
  }
  100% {
    transform: translate3d(3%, 2%, 0) scale(1.05);
    opacity: 1;
  }
}

@keyframes afy-mist-breathe {
  0% {
    opacity: 0.55;
    transform: scale(1);
  }
  100% {
    opacity: 0.9;
    transform: scale(1.04);
  }
}

@keyframes afy-lume-sweep {
  0%,
  14% {
    background-position: 135% 0;
    opacity: 0;
  }
  30% {
    opacity: 0.5;
  }
  52% {
    background-position: -45% 0;
    opacity: 0.28;
  }
  64%,
  100% {
    background-position: -45% 0;
    opacity: 0;
  }
}

/* —— 1. Product story —— */
.afy-story {
  padding-top: 6rem;
  padding-bottom: 5.5rem;
  border-top: 1px solid var(--afy-line);
  background:
    radial-gradient(ellipse 50% 40% at 100% 0%, var(--afy-sky-soft) 0%, transparent 55%),
    linear-gradient(180deg, var(--afy-lume) 0%, var(--afy-paper) 100%);
}

.afy-story__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 3rem 4.5rem;
  align-items: start;
}

.afy-story__title {
  grid-column: 1;
  font-size: clamp(2.05rem, 4.2vw, 3.15rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.04em;
  color: var(--afy-ink);
  margin: 0;
  max-width: 14ch;
}

.afy-story__grid .afy-kicker {
  grid-column: 1 / -1;
}

.afy-story__body {
  grid-column: 2;
  grid-row: 2;
  border-top: 2px solid transparent;
  background-image: var(--afy-accent-rule);
  background-size: 100% 2px;
  background-position: left top;
  background-repeat: no-repeat;
  padding-top: 1.35rem;
}

.afy-story__body p {
  margin: 0 0 1.1rem;
  font-size: 1.08rem;
  line-height: 1.68;
  color: var(--afy-mute);
  max-width: 38ch;
}

.afy-story__body p:last-of-type {
  margin-bottom: 1.35rem;
  color: var(--afy-ink-soft);
  font-weight: 500;
}

/* —— 2. Core feature rows —— */
.afy-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--afy-line);
}

.afy-row {
  display: grid;
  grid-template-columns: minmax(10rem, 16rem) 1fr;
  gap: 1.5rem 3rem;
  align-items: baseline;
  padding: 1.7rem 0;
  border-bottom: 1px solid var(--afy-line);
  transition: padding-left 0.4s var(--afy-ease);
}

.afy-row:hover {
  padding-left: 0.35rem;
}

.afy-row h3 {
  font-size: 1.22rem;
  font-weight: 700;
  margin: 0;
  color: var(--afy-ink);
}

.afy-row p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--afy-mute);
  max-width: 48ch;
}

.afy-core__more {
  margin: 2.25rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  align-items: center;
  font-size: 0.92rem;
  color: var(--afy-mute);
}

.afy-core__more a {
  color: var(--afy-teal);
  font-weight: 500;
  text-decoration: none;
}

.afy-core__more a:hover {
  color: var(--afy-sky-deep);
}

/* —— 3. Denmark enterprise —— */
.afy-dk {
  background: var(--afy-paper);
}

.afy-dk__intro {
  max-width: 40rem;
  margin-bottom: 3rem;
}

.afy-dk__intro .afy-section__lede {
  margin-top: 0.75rem;
}

.afy-dk__list {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--afy-line);
}

.afy-dk__item {
  padding: 2rem 2.25rem 2rem 0;
  border-bottom: 1px solid var(--afy-line);
}

.afy-dk__item:nth-child(even) {
  padding-left: 2.25rem;
  border-left: 1px solid var(--afy-line);
}

.afy-dk__item dt {
  font-family: var(--afy-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--afy-ink);
  margin: 0 0 0.55rem;
  padding-left: 0.9rem;
  border-left: 2px solid var(--afy-teal);
}

.afy-dk__item:nth-child(2) dt {
  border-left-color: var(--afy-sky);
}

.afy-dk__item:nth-child(3) dt {
  border-left-color: var(--afy-amber);
}

.afy-dk__item:nth-child(4) dt {
  border-left-color: var(--afy-sky-deep);
}

.afy-dk__item dd {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--afy-mute);
  max-width: 40ch;
}

/* —— 4. Workflow —— */
.afy-flow__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem 1.75rem;
}

.afy-flow__step {
  position: relative;
  padding-top: 0;
}

.afy-flow__step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 0.75rem;
  left: calc(100% - 0.35rem);
  width: calc(100% - 1.25rem);
  height: 1px;
  background: linear-gradient(90deg, var(--afy-teal) 0%, var(--afy-sky) 50%, var(--afy-line) 100%);
  opacity: 0.5;
  pointer-events: none;
}

.afy-flow__num {
  display: block;
  font-family: var(--afy-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--afy-teal);
  margin-bottom: 1rem;
}

.afy-flow__step:nth-child(2) .afy-flow__num {
  color: var(--afy-sky);
}

.afy-flow__step:nth-child(3) .afy-flow__num {
  color: var(--afy-amber-deep);
}

.afy-flow__step:nth-child(4) .afy-flow__num {
  color: var(--afy-sky-deep);
}

.afy-flow__step h3 {
  font-size: 1.28rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--afy-ink);
}

.afy-flow__step p {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.55;
  color: var(--afy-mute);
}

.afy-flow__extra {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--afy-line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.afy-flow__extra-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  margin-bottom: 0.85rem;
}

.afy-flow__extra-item h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
  color: var(--afy-ink);
}

.afy-flow__extra-item p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.5;
  color: var(--afy-mute);
}

/* —— 5. Pricing teaser —— */
.afy-price__band {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem 3rem;
  padding: 0.5rem 0 0.5rem;
  border-left: 2px solid transparent;
  background-image: linear-gradient(180deg, var(--afy-teal) 0%, var(--afy-sky) 55%, var(--afy-amber) 100%);
  background-size: 2px 100%;
  background-position: left top;
  background-repeat: no-repeat;
  padding-left: 1.75rem;
}

.afy-price__copy {
  max-width: 32rem;
}

.afy-price__copy .afy-section__title {
  margin-bottom: 0.65rem;
}

.afy-price__action {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* —— Quotes —— */
.afy-quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.5rem;
}

.afy-quote {
  margin: 0;
  padding-left: 1rem;
  border-left: 2px solid var(--afy-teal);
}

.afy-quote:nth-child(2) {
  border-left-color: var(--afy-sky);
}

.afy-quote:nth-child(3) {
  border-left-color: var(--afy-amber);
}

.afy-quote blockquote {
  margin: 0 0 1.25rem;
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--afy-ink);
  font-weight: 500;
}

.afy-quote__who {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.afy-quote__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: var(--afy-cloud);
  flex-shrink: 0;
}

.afy-quote__meta {
  font-size: 0.9rem;
  color: var(--afy-mute);
  margin: 0;
}

.afy-quote__meta strong {
  display: block;
  color: var(--afy-ink);
  font-weight: 600;
}

/* —— 6. Final CTA —— */
.afy-cta {
  text-align: center;
  padding: 5.5rem 0;
}

.afy-cta .afy-section__title {
  color: var(--afy-white);
  max-width: 22ch;
  margin-left: auto;
  margin-right: auto;
}

.afy-cta .afy-section__lede {
  margin-bottom: 0.85rem;
}

.afy-cta .afy-ctas {
  justify-content: center;
  margin-top: 1.75rem;
  animation: none;
}

/* —— Responsive —— */
@media (max-width: 991.98px) {
  .afy-hero {
    min-height: auto;
    align-items: flex-start;
    padding: 5.5rem 0 0;
  }

  .afy-hero__plane-inner {
    right: -20%;
    top: auto;
    bottom: -8%;
    width: min(94vw, 660px);
    transform: translateY(0) rotateY(-14deg) rotateX(7deg) rotateZ(-2deg);
    opacity: 0.5;
    animation: afy-plane-in-m 1.05s var(--afy-ease) 0.1s both;
  }

  .afy-hero::after {
    opacity: 0.35;
  }

  .afy-hero__scrim {
    background:
      linear-gradient(
        180deg,
        rgba(245, 248, 250, 0.98) 0%,
        rgba(245, 248, 250, 0.94) 40%,
        rgba(232, 238, 243, 0.7) 60%,
        rgba(232, 238, 243, 0.32) 78%,
        transparent 100%
      );
  }

  .afy-hero__content {
    max-width: 100%;
    padding: 0.35rem 0 9.5rem;
  }

  .afy-brand {
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
  }

  .afy-headline {
    max-width: 28ch;
  }

  .afy-lede {
    max-width: 42ch;
    margin-bottom: 1.45rem;
  }

  .afy-story__grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .afy-story__title,
  .afy-story__body {
    grid-column: 1;
    grid-row: auto;
  }

  .afy-story__title {
    max-width: 16ch;
  }

  .afy-row {
    grid-template-columns: 1fr;
    gap: 0.4rem;
    padding: 1.4rem 0;
  }

  .afy-row:hover {
    padding-left: 0;
  }

  .afy-dk__list {
    grid-template-columns: 1fr;
  }

  .afy-dk__item:nth-child(even) {
    padding-left: 0;
    border-left: 0;
  }

  .afy-flow__steps {
    grid-template-columns: 1fr 1fr;
    gap: 2rem 1.5rem;
  }

  .afy-flow__step:not(:last-child)::after {
    display: none;
  }

  .afy-flow__extra {
    grid-template-columns: 1fr;
  }

  .afy-feature,
  .afy-feature--flip {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .afy-feature--flip .afy-feature__copy,
  .afy-feature--flip .afy-feature__visual {
    order: unset;
  }

  .afy-price__band {
    flex-direction: column;
    align-items: flex-start;
  }

  .afy-blog-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .afy-hero {
    padding-top: 5rem;
  }

  .afy-brand {
    font-size: clamp(2.95rem, 15vw, 3.65rem);
    letter-spacing: -0.05em;
    margin-bottom: 0.95rem;
    padding-bottom: 0.75rem;
  }

  .afy-headline {
    font-size: clamp(1.18rem, 4.5vw, 1.38rem);
    max-width: 100%;
    margin-bottom: 0.7rem;
  }

  .afy-lede {
    max-width: 100%;
    font-size: 1.02rem;
    margin-bottom: 1.35rem;
  }

  .afy-hero__plane-inner {
    width: 120%;
    right: -30%;
    bottom: -10%;
    opacity: 0.38;
  }

  .afy-hero__content {
    padding-bottom: 8.75rem;
  }

  .afy-btn {
    min-height: 3.25rem;
    font-size: 1rem;
  }

  .afy-section {
    padding: 4rem 0;
  }

  .afy-story {
    padding-top: 4.5rem;
  }

  .afy-flow__steps {
    grid-template-columns: 1fr;
  }

  .afy-ctas {
    flex-direction: column;
    align-items: stretch;
  }

  .afy-btn {
    width: 100%;
  }

  .afy-price__action {
    width: 100%;
    flex-direction: column;
  }

  .afy-price__action .afy-btn {
    width: 100%;
  }

  .afy-price__band {
    padding-left: 1.15rem;
  }
}

@keyframes afy-plane-in-m {
  from {
    opacity: 0;
    transform: translateY(30px) rotateY(-14deg) rotateX(7deg) rotateZ(-2deg) scale(1.03);
  }
  to {
    opacity: 0.5;
    transform: translateY(0) rotateY(-14deg) rotateX(7deg) rotateZ(-2deg) scale(1);
  }
}

@media (min-width: 1400px) {
  .afy-hero__plane-inner {
    width: min(84vw, 1220px);
    right: -7%;
  }

  .afy-hero__content {
    max-width: 38rem;
  }
}

.afy-home [data-aos] {
  pointer-events: auto;
}

.afy-home .afy-row[data-aos],
.afy-home .afy-dk__item[data-aos],
.afy-home .afy-flow__step[data-aos],
.afy-home .afy-quote[data-aos] {
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  .afy-hero::before,
  .afy-hero::after,
  .afy-hero__plane,
  .afy-hero__mist,
  .afy-brand,
  .afy-headline,
  .afy-lede,
  .afy-ctas,
  .afy-hero__plane-inner {
    animation: none !important;
  }

  .afy-hero::before,
  .afy-hero::after,
  .afy-hero__mist {
    opacity: 0.7;
    transform: none;
  }

  .afy-btn:hover,
  .afy-btn:focus-visible,
  .afy-text-link:hover,
  .afy-text-link:focus-visible,
  .afy-row:hover {
    transform: none;
    padding-left: 0;
  }

  .afy-home [data-aos] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
