/* ==========================================================================
   ACE AXIS — Components: buttons, hero, hero visual
   ========================================================================== */

/* ---------- Buttons ---------- */
.btn {
  --btn-pad-y: 0.95rem;
  --btn-pad-x: 1.5rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  min-height: 48px;
  padding: var(--btn-pad-y) var(--btn-pad-x);
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.btn__arrow {
  width: 14px;
  height: 14px;
  transition: transform var(--dur) var(--ease-out);
}
.btn:hover .btn__arrow,
.btn:focus-visible .btn__arrow { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }

.btn--primary {
  color: #fff;
  background-color: var(--blue-600);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 10px 30px -12px rgba(47, 107, 255, 0.55);
}
/* Sweep on hover, along the axis angle */
.btn--primary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, var(--blue-500), var(--blue-400));
  transform: translateX(-101%) skewX(var(--axis-angle));
  transform-origin: left;
  transition: transform 520ms var(--ease-out);
}
.btn--primary:hover::before,
.btn--primary:focus-visible::before { transform: translateX(0) skewX(0deg); }

.btn--ghost {
  color: var(--silver-200);
  border: 1px solid var(--line-strong);
}
.btn--ghost:hover,
.btn--ghost:focus-visible {
  color: var(--white);
  border-color: rgba(214, 222, 236, 0.5);
}

.btn--sm { --btn-pad-y: 0.7rem; --btn-pad-x: 1.15rem; min-height: 42px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--header-h) + clamp(2.5rem, 1rem + 4vw, 4.5rem));
  overflow: hidden;
  isolation: isolate;
}

/* One controlled light source, upper right — like a studio light on a dark surface */
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -30%;
  right: -20%;
  width: 90vw;
  height: 110vh;
  background:
    radial-gradient(closest-side, rgba(70, 120, 255, 0.16), rgba(70, 120, 255, 0.05) 55%, transparent 75%);
  pointer-events: none;
}
/* Soft floor shadow, grounds the composition */
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: auto 0 0 0;
  height: 40%;
  background: linear-gradient(180deg, transparent, var(--navy-900));
  pointer-events: none;
}

.hero__grid {
  flex: 1;
  display: grid;
  gap: clamp(3rem, 2rem + 4vw, 5rem);
  align-items: center;
}

.hero__content { max-width: 44rem; }

.hero__eyebrow {
  margin-bottom: var(--space-6);
}
.hero__eyebrow::before {
  content: "";
  width: 28px;
  height: 1.5px;
  background: var(--blue-400);
  transform: rotate(var(--axis-angle));
}

.hero__title {
  font-size: var(--text-hero);
  line-height: 0.98;
  font-weight: 600;
}
.hero__title .line { display: block; }

.hero__lede {
  margin-top: var(--space-6);
  max-width: 34rem;
  font-size: var(--text-md);
  line-height: 1.6;
  color: var(--silver-300);
}
.hero__lede strong { color: var(--silver-200); font-weight: 500; }

/* Pricing, stated plainly in the hero */
.hero__pricing {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: start;
  margin-top: var(--space-6);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.hero__price {
  display: flex;
  flex-direction: column-reverse;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-7) var(--space-4) 0;
}
.hero__price + .hero__price {
  position: relative;
  padding-left: var(--space-7);
}
/* Divider drawn on the axis angle */
.hero__price + .hero__price::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18%;
  bottom: 18%;
  width: 1px;
  background: var(--line-strong);
  transform: rotate(18deg);
}
.hero__price dt {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--silver-400);
}
.hero__price dd {
  display: flex;
  align-items: baseline;
  gap: 0.2em;
}
.price-figure {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.25rem, 1.8rem + 1.6vw, 3rem);
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background: var(--metal);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.price-unit {
  font-size: var(--text-sm);
  color: var(--silver-400);
}

.hero__terms {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--silver-400);
}
.hero__terms span + span::before {
  content: "/";
  margin-inline: 0.6em;
  color: var(--silver-600);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

/* Bottom rail: an editorial index line */
.hero__rail {
  margin-top: clamp(3rem, 2rem + 4vw, 5rem);
  border-top: 1px solid var(--line);
}
.hero__rail-inner {
  display: flex;
  justify-content: space-between;
  gap: var(--space-5);
  padding-block: var(--space-5);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--silver-400);
}
.hero__rail-inner > * { white-space: nowrap; }
.hero__rail-inner > :nth-child(2) { display: none; }
@media (max-width: 480px) {
  .hero__rail-inner > :nth-child(3) { display: none; }
}

@media (min-width: 720px) {
  .hero__rail-inner > :nth-child(2) { display: block; }
}

/* ---------- Hero visual (abstract composition, decorative) ---------- */
.hero__visual {
  position: relative;
  aspect-ratio: 1 / 0.86;
  width: 100%;
  max-width: 640px;
  margin-inline: auto;
}

.axis-line {
  position: absolute;
  left: -18%;
  top: 0;
  width: 140%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.axis-line path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 1.6s var(--ease-in-out) 0.5s forwards;
}

.frame {
  position: absolute;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(22, 32, 58, 0.72), rgba(10, 16, 28, 0.9));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 40px 80px -30px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.frame--browser {
  left: 0;
  top: 6%;
  width: 86%;
  aspect-ratio: 16 / 11;
  border-radius: var(--radius-md);
  animation: rise 1.1s var(--ease-out) 0.25s both;
}
.frame__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding-inline: 12px;
  border-bottom: 1px solid var(--line);
}
.frame__bar i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--silver-600);
  opacity: 0.7;
}
.frame__url {
  margin-left: 12px;
  height: 12px;
  width: 38%;
  border-radius: var(--radius-pill);
  background: rgba(190, 204, 228, 0.08);
}

.frame__page {
  position: relative;
  height: calc(100% - 30px);
  padding: 7% 7% 0;
}
/* Skeleton elements of a generic page layout */
.sk { display: block; border-radius: 3px; background: rgba(190, 204, 228, 0.14); }
.sk--nav { display: flex; justify-content: space-between; align-items: center; background: none; margin-bottom: 9%; }
.sk--nav b { width: 14%; height: 8px; border-radius: 3px; background: rgba(190, 204, 228, 0.3); }
.sk--nav span { display: flex; gap: 8px; }
.sk--nav span i { width: 22px; height: 5px; border-radius: 3px; background: rgba(190, 204, 228, 0.16); }
.sk--h1 { width: 62%; height: 14px; background: rgba(240, 244, 250, 0.55); }
.sk--h1b { width: 44%; height: 14px; margin-top: 8px; background: rgba(240, 244, 250, 0.55); }
.sk--p { width: 50%; height: 6px; margin-top: 14px; }
.sk--p2 { width: 40%; height: 6px; margin-top: 6px; }
.sk--btn { width: 18%; height: 16px; margin-top: 16px; border-radius: var(--radius-pill); background: var(--blue-500); opacity: 0.9; }

.sk--media {
  position: absolute;
  right: 7%;
  top: 26%;
  width: 34%;
  aspect-ratio: 4 / 5;
  border-radius: 8px;
  background:
    linear-gradient(var(--axis-angle), transparent 46%, rgba(79, 134, 255, 0.55) 49.5%, rgba(79, 134, 255, 0.55) 50.5%, transparent 54%),
    radial-gradient(120% 90% at 80% 10%, rgba(134, 173, 255, 0.35), transparent 60%),
    linear-gradient(160deg, #1b2846, #0c1322);
  border: 1px solid var(--line);
}
.sk-row {
  position: absolute;
  left: 7%;
  right: 7%;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  height: 18%;
}
.sk-row i {
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: rgba(190, 204, 228, 0.04);
}

.frame--phone {
  right: 0;
  bottom: 0;
  width: 30%;
  aspect-ratio: 9 / 18.5;
  border-radius: 22px;
  padding: 10px;
  animation: rise 1.1s var(--ease-out) 0.45s both;
}
.frame--phone .frame__screen {
  position: relative;
  height: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 22% 12% 0;
  background: linear-gradient(180deg, rgba(14, 22, 38, 0.9), rgba(7, 11, 20, 0.95));
  overflow: hidden;
}
.frame--phone .frame__screen::before {
  content: "";
  position: absolute;
  top: 6%;
  left: 50%;
  width: 28%;
  height: 4px;
  transform: translateX(-50%);
  border-radius: var(--radius-pill);
  background: rgba(190, 204, 228, 0.18);
}
.frame--phone .sk--h1 { width: 86%; height: 9px; }
.frame--phone .sk--h1b { width: 60%; height: 9px; margin-top: 6px; }
.frame--phone .sk--p { width: 80%; height: 4px; margin-top: 12px; }
.frame--phone .sk--p2 { width: 64%; height: 4px; }
.frame--phone .sk--btn { width: 54%; height: 14px; margin-top: 14px; }
.frame--phone .sk--media {
  position: static;
  width: 100%;
  margin-top: 16%;
  aspect-ratio: 1 / 1;
}

/* Hairline spec tags pinned to the composition */
.spec {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--silver-300);
  white-space: nowrap;
  animation: fade 1s var(--ease-out) 1.2s both;
}
.spec::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1.5px solid var(--blue-400);
  background: var(--navy-900);
  flex: none;
}
.spec--1 { left: 4%; top: -4%; }
.spec--2 { right: 4%; bottom: -8%; }
.spec--3 { left: 4%; bottom: 8%; }

@media (min-width: 1024px) {
  .hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
  .hero__visual { margin-right: calc(var(--gutter) * -0.5); }
}

@media (max-width: 1023px) {
  .hero__visual { max-width: 520px; }
}

@media (max-width: 520px) {
  .hero__pricing { grid-template-columns: 1fr 1fr; justify-content: stretch; }
  .hero__price { padding-right: var(--space-4); }
  .hero__price + .hero__price { padding-left: var(--space-5); }
  .price-figure { font-size: 2.125rem; }
  .hero__actions .btn { flex: 1 1 100%; }
}

/* ---------- Hero entrance (pure CSS, honours reduced-motion) ---------- */
.reveal { animation: rise var(--dur-slow) var(--ease-out) both; }
.reveal--1 { animation-delay: 60ms; }
.reveal--2 { animation-delay: 140ms; }
.reveal--3 { animation-delay: 220ms; }
.reveal--4 { animation-delay: 300ms; }
.reveal--5 { animation-delay: 380ms; }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes draw {
  to { stroke-dashoffset: 0; }
}

/* Inline text link inside body copy (underlined so it isn't distinguished by colour alone) */
.text-link {
  color: var(--blue-300);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  overflow-wrap: anywhere;
}
.text-link:hover { color: var(--white); }
