/* Portal landing pages. Loaded only on /for/<portal>/ pages. */

/* Hero: the "door" from the home page, now full width */
.portal-hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  min-height: 22rem;
  padding: 3.5rem 2.5rem;
}

.portal-hero h1 {
  max-width: 20ch;
  margin: 0.5rem 0 1rem;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  line-height: 1.1;
}

.portal-intro {
  max-width: 60ch;
  margin: 0 0 2rem;
  color: var(--text-muted);
  font-size: 1.15rem;
}

/* Pricing callout */
.pricing-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-top: 2.5rem;
  padding: 1.5rem 2rem;
  background: var(--surface);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius, 6px);
}

.pricing-note-text {
  flex: 1 1 32rem;
}

.pricing-note p {
  margin: 0;
  font-size: 1.1rem;
}

.pricing-details {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
  color: var(--text-muted);
}

.fine-print {
  margin: 1.25rem 0 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Plans */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.plan {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  background: var(--surface);
  border-radius: var(--radius, 6px);
  border-top: 4px solid var(--accent);
}

.plan h3 {
  margin: 0;
}

.plan-price {
  margin: 0.5rem 0 1rem;
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.plan-price-quoted {
  font-size: 1.5rem;
}

.plan-period {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
}

.plan-includes {
  margin: 0 0 0.5rem;
  font-weight: 600;
}

.plan ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text-muted);
}

.plan li + li {
  margin-top: 0.35rem;
}

.plan-note {
  margin: 1.5rem 0 0;
  color: var(--text-muted);
}

.warranty {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--surface);
  border-left: 4px solid var(--accent-2);
  border-radius: var(--radius, 6px);
}

.warranty h3 {
  margin: 0 0 0.5rem;
}

.warranty p {
  margin: 0;
  color: var(--text-muted);
}

.portal-switch {
  text-align: center;
}

@media (max-width: 480px) {
  .portal-hero {
    min-height: 18rem;
    padding: 2.5rem 1.5rem;
  }
}

/* The "pulled in" transition.
   In a cross-document view transition, the NEW page's CSS drives the
   animation. These rules live here, so the effect plays when arriving at a
   portal, and leaving one gets the browser's normal crossfade.
   base.css only turns transitions on when the visitor hasn't asked for
   reduced motion, so nothing here runs for them.

   Timeline (about 1 second):
     0-650ms    the old page accelerates toward you and fades out,
                while the door grows to fill the screen
     450-1000ms the landing page comes out of the white and settles */
@keyframes portal-pull-in {
  to {
    transform: scale(2.5);
    filter: brightness(3);
    opacity: 0;
  }
}

@keyframes portal-door-out {
  to {
    filter: brightness(3);
    opacity: 0;
  }
}

@keyframes portal-emerge {
  from {
    transform: scale(1.06);
    filter: brightness(2.5);
    opacity: 0;
  }
}

/* The white light everything is drawn into */
::view-transition {
  background: #fff;
}

::view-transition-old(root),
::view-transition-new(root),
::view-transition-old(portal-business),
::view-transition-new(portal-business),
::view-transition-old(portal-software-teams),
::view-transition-new(portal-software-teams) {
  mix-blend-mode: normal;
}

::view-transition-old(root) {
  animation: portal-pull-in 650ms cubic-bezier(0.7, 0, 0.84, 0) both;
}

::view-transition-group(portal-business),
::view-transition-group(portal-software-teams) {
  animation-duration: 650ms;
  animation-timing-function: cubic-bezier(0.7, 0, 0.84, 0);
}

::view-transition-old(portal-business),
::view-transition-old(portal-software-teams) {
  animation: portal-door-out 650ms cubic-bezier(0.7, 0, 0.84, 0) both;
}

::view-transition-new(root),
::view-transition-new(portal-business),
::view-transition-new(portal-software-teams) {
  animation: portal-emerge 550ms cubic-bezier(0.16, 1, 0.3, 1) 450ms both;
}
