/* Nettly's pages (/nettly/, Pricing, Help & Support, Privacy, Terms). They're laid out
   as Apricity's are and load apricity.css for its layout (the hero in the
   sky, the scroll stories, the three-up promises, the phone in the sky at
   the end); this file adds only what is Nettly's own. */

/* --------------------------------------------------------------------------
   Its icon, without the tile: the grid, three bars getting darker as they
   rise, and the orange dot on the tallest. The colours are the Icon Composer
   file's (Nettly's Resources/AppIcon.icon), in light and dark; at night the
   bars turn round, the tallest the lightest, as the dark icon does.
   -------------------------------------------------------------------------- */
.nettly-glyph {
  display: block;
  width: clamp(76px, 8vw, 96px);
  height: auto;
  margin: 0 auto;
  overflow: visible;
}

.nettly-glyph__grid rect {
  fill: #E4E6EA;
}

html[data-theme="dark"] .nettly-glyph__grid rect {
  fill: #292B2F;
}

.nettly-glyph__bar--1 { fill: #CBD1DC; }
.nettly-glyph__bar--2 { fill: #9399A2; }
.nettly-glyph__bar--3 { fill: #474D59; }
.nettly-glyph__head { fill: #FC6C19; }

html[data-theme="dark"] .nettly-glyph__bar--1 { fill: #484D56; }
html[data-theme="dark"] .nettly-glyph__bar--2 { fill: #7B808A; }
html[data-theme="dark"] .nettly-glyph__bar--3 { fill: #DADEE6; }
html[data-theme="dark"] .nettly-glyph__head { fill: #FF7A1C; }

/* On a sky (the hero, the footer) the grid is the sky's own white. */
.has-sky .nettly-glyph__grid rect,
body:not(.plain-footer) .footer .nettly-glyph__grid rect {
  fill: rgba(255, 255, 255, .42);
}

body.nettly-page .apricity-hero.has-sky .apricity-hero__icon svg {
  filter: drop-shadow(0 8px 18px rgba(12, 64, 160, .18));
}

/* As the page opens the icon builds itself: the grid draws in from the
   left, the bars rise from it one after another, and the orange dot
   drops onto the last, with the spring Apricity's books land on. The
   headline is then flown in (nettly/index.html). */
@media (prefers-reduced-motion: no-preference) {
  .apricity-hero__icon .nettly-glyph__grid rect {
    transform-box: fill-box;
    transform-origin: 0 50%;
    animation: nettly-glyph-grid .4s cubic-bezier(.2, .7, .3, 1) both;
  }

  .apricity-hero__icon .nettly-glyph__grid rect:nth-child(2) { animation-delay: .04s; }
  .apricity-hero__icon .nettly-glyph__grid rect:nth-child(3) { animation-delay: .08s; }

  .apricity-hero__icon .nettly-glyph__bar {
    transform-box: fill-box;
    transform-origin: 50% 100%;
    animation: nettly-glyph-rise .56s var(--at, 0s) both;
    animation-timing-function: linear(0, .047, .16, .305, .459, .604, .731, .836, .917, .976, 1.015, 1.039, 1.051, 1.054, 1.052, 1.045, 1.037, 1.029, 1.021, 1.014, 1.009, 1.004, 1.001, .999, .998, .997, .997, .997, 1);
  }

  .apricity-hero__icon .nettly-glyph__head {
    animation: nettly-glyph-drop .56s var(--at, 0s) both;
    animation-timing-function: linear(0, .047, .16, .305, .459, .604, .731, .836, .917, .976, 1.015, 1.039, 1.051, 1.054, 1.052, 1.045, 1.037, 1.029, 1.021, 1.014, 1.009, 1.004, 1.001, .999, .998, .997, .997, .997, 1);
  }
}

@keyframes nettly-glyph-grid {
  from { transform: scaleX(.001); opacity: 0; }
  to { transform: none; opacity: 1; }
}

@keyframes nettly-glyph-rise {
  from { transform: scaleY(.001); }
  to { transform: none; }
}

@keyframes nettly-glyph-drop {
  from { transform: translateY(-90px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* The headline is flown in, as Apricity's is (apricity.css). */
#nettlyHeadline { position: relative; }
#nettlyHeadline.is-waiting { opacity: 0; }

/* On a phone its second half can't fit on one line, which left "every" on
   its own; there the sentence runs on and its lines are evened out. */
@media (max-width: 760px) {
  #nettlyHeadline { text-wrap: balance; }
  #nettlyHeadline em { display: inline; }
}

/* The devices (a Mac, an iPad and an iPhone since 30 Nov 2026, as on
   Apricity's page, at its width) are a day/night pair, as the homepage's
   devices are: the light app in Apple's dark finishes by day, the dark app
   in Silver at night (scripts/nettly_devices.sh). (Each other phone screen
   swaps to its dark twin: nettly-night.js.) */
.apricity-devices .nettly-devices__night,
html[data-theme="dark"] .apricity-devices .nettly-devices__day {
  display: none;
}

html[data-theme="dark"] .apricity-devices .nettly-devices__night {
  display: block;
}

/* --------------------------------------------------------------------------
   The name, with its welcome screen on a phone beside it
   -------------------------------------------------------------------------- */
.nettly-phone {
  width: min(100%, 340px);
  margin: 0 auto;
}

.nettly-phone .tesorin-device-stage {
  width: 100%;
}

/* --------------------------------------------------------------------------
   Before Nettly is on the App Store, its buttons say so and go nowhere
   (navigation.js, data-nettly-store-link).
   -------------------------------------------------------------------------- */
.btn.is-soon {
  cursor: default;
  pointer-events: none;
}

.btn.is-soon .arrow,
.btn.is-soon .btn__arrow {
  display: none;
}

/* The footer's line in place of the store badge. */
.footer-store-soon {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  opacity: .9;
}

/* Its icon in the footer, beside the wordmark. */
.footer-app-glyph.nettly-glyph {
  width: clamp(64px, 5.6vw, 82px);
  margin: 0;
}

/* --------------------------------------------------------------------------
   Pricing (/nettly/pricing): Apricity's pricing page (apricity.css,
   pricing.css) with one plan after the trial, so two columns, each wider.
   Without Nettly's App Store address (navigation.js) the hero's button says
   Coming soon and the table's buttons wait out of sight (is-soon), unless
   the giveaway is on (is-offer): then Claim yours shows, alone.
   -------------------------------------------------------------------------- */
body.nettly-pricing-page .apricity-plans .plan-table {
  max-width: 920px;
}

@media (min-width: 761px) {
  body.nettly-pricing-page .apricity-plans .plan-table__grid col:not(.plan-table__feature-col) {
    width: 27%;
  }
}

body.nettly-pricing-page .plan-table:not(.is-offer) .plan-table__actions:has(.is-soon) {
  display: none;
}

body.nettly-pricing-page .plan-table.is-offer .plan-table__actions .is-soon {
  visibility: hidden;
}

/* The phone's Lifetime card (pricing.css .lifetime) is there only while
   the offer is on. */
.nettly-lifetime[hidden] {
  display: none;
}
