/* ==========================================================================
   SiliconVPN: a concept landing page by MadeByMyst.
   Plain and honest: a strong photo, clear writing, solid colours.
   Written mobile-first. Larger screens are added with min-width queries.
   ========================================================================== */

/* DESIGN TOKENS */

:root {
  /* Colours */
  --brand: #6620cf;
  --brand-dark: #4f17a3;
  --ink: #160a2b;
  --muted: #574b78;
  --soft: #f6f4fb;
  --white: #ffffff;
  --line: rgba(22, 10, 43, 0.1);

  /* Type */
  --font: "Plus Jakarta Sans", system-ui, sans-serif;

  /* Shape & layout */
  --radius: 12px;
  --container: 1120px;
  --gutter: 24px;
  --header-h: 72px;

  /* Motion: one long, soft ease-out */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* RESET & BASE */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--brand);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

/* TYPOGRAPHY */

h1,
h2,
h3 {
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.7rem, 6.5vw, 5rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(1.9rem, 3.8vw, 2.8rem);
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0;
}

p {
  color: var(--muted);
  text-wrap: pretty;
}

/* LAYOUT HELPERS */

.container {
  width: min(var(--container), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.section {
  padding-block: clamp(72px, 10vw, 128px);
}

.section-title {
  margin-bottom: clamp(32px, 5vw, 56px);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* BUTTONS */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 24px;
  border: 1.5px solid transparent;
  border-radius: 10px;
  font-size: 0.98rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease,
    transform 0.5s var(--ease-out);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background-color: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--brand-dark);
}

.btn-outline {
  border-color: var(--line);
  background-color: var(--white);
  color: var(--ink);
}

.btn-outline:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.btn-small {
  min-height: 40px;
  padding: 0 16px;
  font-size: 0.9rem;
}

/* A plain text link with an arrow */
.btn-quiet {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  font-weight: 700;
  text-decoration: none;
}

.btn-quiet .icon {
  transition: translate 0.5s var(--ease-out);
}

.btn-quiet:hover .icon {
  translate: 4px 0;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* HEADER
   White text over the photo, a plain white bar once you scroll.
   Hides while scrolling down and comes back when scrolling up. */

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  color: #fff;
  border-bottom: 1px solid transparent;
  transition:
    transform 0.6s var(--ease-out),
    background-color 0.4s ease,
    color 0.4s ease,
    border-color 0.4s ease;
}

.site-header.is-scrolled,
.site-header.menu-is-open {
  background-color: var(--white);
  color: var(--ink);
  border-bottom-color: var(--line);
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

.site-header:focus-within {
  transform: none;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 800;
  color: inherit;
  text-decoration: none;
}

.brand img {
  width: 30px;
  height: 30px;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 28px;
}

.site-nav a:not(.btn) {
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.site-nav a:not(.btn):hover {
  opacity: 1;
}

/* Menu button (only on small screens, and only with JavaScript) */
.menu-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 10px;
  opacity: 0.8;
  cursor: pointer;
}

.menu-toggle .bar {
  position: absolute;
  right: 12px;
  left: 12px;
  height: 2px;
  border-radius: 2px;
  background-color: currentColor;
  transition:
    translate 0.5s var(--ease-out),
    rotate 0.5s var(--ease-out),
    opacity 0.3s ease;
}

.menu-toggle .bar:nth-child(2) {
  top: 14px;
}

.menu-toggle .bar:nth-child(3) {
  top: 20px;
}

.menu-toggle .bar:nth-child(4) {
  top: 26px;
}

.menu-toggle[aria-expanded="true"] .bar:nth-child(2) {
  translate: 0 6px;
  rotate: 45deg;
}

.menu-toggle[aria-expanded="true"] .bar:nth-child(3) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .bar:nth-child(4) {
  translate: 0 -6px;
  rotate: -45deg;
}

@media (max-width: 860px) {
  /* Without JavaScript the links simply wrap under the logo */
  html:not(.js) .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding-block: 14px;
  }

  .js .menu-toggle {
    display: block;
  }

  /* The open menu fills the screen below the header */
  .js .site-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    padding: 8px var(--gutter) 32px;
    overflow-y: auto;
    color: var(--ink);
    background-color: var(--white);
    visibility: hidden;
    opacity: 0;
    transition:
      opacity 0.4s ease,
      visibility 0s linear 0.4s;
  }

  .js .site-nav.is-open {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
  }

  .js .site-nav a:not(.btn) {
    padding: 16px 2px;
    font-size: 1.4rem;
    font-weight: 700;
    opacity: 1;
    border-bottom: 1px solid var(--line);
  }

  .js .site-nav .btn {
    margin-top: 24px;
    min-height: 52px;
  }

  body.menu-open {
    overflow: hidden;
  }
}

/* HERO */

/* Fills the whole screen, with everything centred */
.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding-block: calc(var(--header-h) + 32px) 96px;
  overflow: hidden;
  background-color: var(--ink);
  color: #fff;
  text-align: center;
}

/* The Earth photo drifts a little slower than the page (see script.js) */
.hero-bg {
  position: absolute;
  inset: -10% 0 0;
  translate: 0 calc(var(--parallax, 0) * 1px);
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  animation: photo-in 2.4s var(--ease-out) backwards;
}

@keyframes photo-in {
  from {
    opacity: 0;
    scale: 1.06;
  }
}

/* Keep the sky dark behind the text */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 55% at 50% 50%, rgba(11, 6, 24, 0.55), transparent 75%),
    linear-gradient(
      180deg,
      rgba(11, 6, 24, 0.75) 0%,
      rgba(11, 6, 24, 0.3) 55%,
      rgba(11, 6, 24, 0.85) 100%
    );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-title {
  margin-bottom: 24px;
}

/* Each line slides up from behind a mask when the page loads */
.hero-title .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}

.hero-title .line > span {
  display: inline-block;
  animation: line-up 1.2s var(--ease-out) 0.15s backwards;
}

.hero-title .line:nth-child(2) > span {
  animation-delay: 0.27s;
}

@keyframes line-up {
  from {
    translate: 0 105%;
  }
}

.hero-fade {
  animation: fade-up 1.1s var(--ease-out) 0.45s backwards;
}

.actions.hero-fade {
  animation-delay: 0.55s;
}

.hero-small.hero-fade {
  animation-delay: 0.65s;
}

@keyframes fade-up {
  from {
    opacity: 0;
    translate: 0 18px;
  }
}

.lead {
  max-width: 31em;
  font-size: clamp(1.08rem, 1.5vw, 1.22rem);
  color: rgba(255, 255, 255, 0.82);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 28px;
  margin-top: 34px;
}

.hero .btn-quiet {
  color: #fff;
}

.hero-small {
  margin-top: 18px;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.65);
}

.concept-note {
  font-size: 0.85rem;
}

/* Pinned to the bottom of the screen */
.hero .concept-note {
  position: absolute;
  right: 0;
  bottom: 28px;
  left: 0;
  z-index: 1;
  color: rgba(255, 255, 255, 0.5);
}

/* WHY A VPN */

.why-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

.why-photo {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
}

.why-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.why-text h2 {
  margin-bottom: 18px;
}

/* Without / With, side by side */
.compare {
  display: grid;
  gap: 24px;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.compare h3 {
  margin-bottom: 10px;
}

.compare ul {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.compare li {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
}

/* A plain dash for "without", a tick for "with" */
.compare li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--muted);
}

.compare div + div li {
  color: var(--ink);
}

.compare div + div li::before {
  content: "✓";
  color: var(--brand);
  font-weight: 700;
}

/* FEATURES (plain text, no cards or icons) */

.features-section {
  background-color: var(--soft);
}

.features {
  display: grid;
  gap: 32px 48px;
}

.features div {
  padding-top: 20px;
  border-top: 2px solid var(--ink);
}

.features dt {
  margin-bottom: 6px;
  font-size: 1.15rem;
  font-weight: 700;
}

.features dd {
  margin: 0;
  color: var(--muted);
}

/* HOW IT WORKS */

.how-grid {
  display: grid;
  gap: 32px;
}

.steps {
  display: grid;
  gap: 28px;
  padding: 0;
  list-style: none;
}

.steps li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  align-items: start;
  align-content: start; /* don't spread the rows when a neighbour is taller */
}

.step-num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--brand);
  border-radius: 50%;
  color: var(--brand);
  font-weight: 800;
}

.steps h3 {
  margin-bottom: 2px;
}

/* A WORD FROM A CUSTOMER */

.quote-section {
  padding-top: 0;
}

.quote {
  max-width: 860px;
  margin: 0;
  padding-top: clamp(56px, 8vw, 88px);
  border-top: 1px solid var(--line);
}

.quote blockquote p {
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.quote figcaption {
  margin-top: 20px;
  color: var(--muted);
}

.quote figcaption strong {
  color: var(--ink);
}

/* PRICING */

.pricing {
  background-color: var(--soft);
}

.pricing-top {
  max-width: 560px;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.pricing-top p {
  margin-top: 12px;
  font-size: 1.1rem;
}

.plans {
  display: grid;
  gap: 16px;
  align-items: start;
}

.plan {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 30px;
  background-color: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.plan-featured {
  border: 2px solid var(--brand);
}

.plan-tag {
  margin-bottom: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--brand);
}

.price {
  margin-top: 14px;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.price span {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
}

.plan-note {
  margin: 8px 0 22px;
  font-size: 0.9rem;
}

.plan ul {
  display: grid;
  gap: 8px;
  margin-bottom: 28px;
  padding: 22px 0 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.plan li {
  position: relative;
  padding-left: 24px;
}

.plan li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--brand);
  font-weight: 700;
}

.plan .btn {
  width: 100%;
  margin-top: auto;
}

.pricing-note {
  margin-top: 28px;
  font-size: 0.95rem;
}

/* FAQ (opening and closing is animated in script.js) */

.faq-grid {
  display: grid;
  gap: 32px;
}

.faq-head p {
  margin-top: 12px;
}

.faq-list {
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0;
  font-size: 1.05rem;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
  transition: color 0.3s ease;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:hover {
  color: var(--brand);
}

/* A plus that turns into a minus */
.faq-icon {
  position: relative;
  flex: none;
  width: 14px;
  height: 14px;
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 0;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background-color: currentColor;
  transition: rotate 0.5s var(--ease-out);
}

.faq-icon::after {
  rotate: 90deg;
}

.faq-item[open]:not(.is-closing) .faq-icon::after {
  rotate: 0deg;
}

.faq-answer {
  overflow: hidden;
}

.faq-answer p {
  padding: 0 40px 22px 0;
}

/* CLOSING */

.closing {
  padding-block: clamp(72px, 10vw, 112px);
  background-color: var(--ink);
  color: #fff;
}

.closing-inner {
  display: grid;
  justify-items: start;
  gap: 14px;
}

.closing p {
  margin-bottom: 14px;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.75);
}

/* FOOTER */

.footer-top {
  display: grid;
  gap: 32px;
  padding-block: 56px 40px;
}

.footer-brand p {
  margin-top: 10px;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a {
  width: fit-content;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--brand);
}

.footer-credits {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
  font-size: 0.92rem;
  color: var(--muted);
}

.footer-credits a,
.footer-bottom p a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 4px;
}

.footer-credits a:hover,
.footer-bottom p a:hover {
  color: var(--brand);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-block: 20px 30px;
  border-top: 1px solid var(--line);
}

.footer-bottom p,
.footer-bottom > a {
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-bottom > a {
  text-decoration: none;
}

.footer-bottom > a:hover {
  color: var(--brand);
}

/* PLAN BUTTON MESSAGE */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 60;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 14px 20px;
  border-radius: 10px;
  background-color: var(--ink);
  color: #fff;
  font-size: 0.95rem;
  opacity: 0;
  translate: -50% 16px;
  pointer-events: none;
  transition:
    opacity 0.4s ease,
    translate 0.6s var(--ease-out);
}

.toast.is-visible {
  opacity: 1;
  translate: -50% 0;
}

/* SCROLL REVEAL (only when JavaScript is on, see script.js) */

.js .reveal,
.js .stagger > * {
  opacity: 0;
  translate: 0 28px;
  transition:
    opacity 1s var(--ease-out),
    translate 1.2s var(--ease-out);
  transition-delay: var(--delay, 0s);
}

.js .reveal.is-visible,
.js .stagger.is-visible > * {
  opacity: 1;
  translate: 0 0;
}

/* Items in a .stagger group arrive one after another */
.stagger > :nth-child(2) {
  --delay: 0.08s;
}
.stagger > :nth-child(3) {
  --delay: 0.16s;
}
.stagger > :nth-child(4) {
  --delay: 0.24s;
}
.stagger > :nth-child(5) {
  --delay: 0.32s;
}
.stagger > :nth-child(6) {
  --delay: 0.4s;
}

/* LARGER SCREENS */

@media (min-width: 640px) {
  .features {
    grid-template-columns: 1fr 1fr;
  }

  .compare {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 860px) {
  .footer-top {
    grid-template-columns: 1.5fr 1fr 1.3fr;
    align-items: start;
    gap: 56px;
  }
}

@media (min-width: 900px) {
  .features {
    grid-template-columns: repeat(3, 1fr);
  }

  .plans {
    grid-template-columns: repeat(3, 1fr);
  }

  .how-grid {
    grid-template-columns: 1fr 1.6fr;
    gap: 64px;
    align-items: start;
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }

  .steps li {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .closing-inner {
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 48px;
  }

  .closing-inner h2 {
    grid-column: 1;
  }

  .closing-inner p {
    grid-column: 1;
    margin-bottom: 0;
  }

  .closing-inner .btn {
    grid-column: 2;
    grid-row: 1 / 3;
  }
}

@media (min-width: 960px) {
  .why-grid {
    grid-template-columns: 1fr 1.1fr;
    gap: 72px;
  }

  .faq-grid {
    grid-template-columns: 1fr 1.8fr;
    align-items: start;
    gap: 72px;
  }

  .faq-head {
    position: sticky;
    top: calc(var(--header-h) + 32px);
  }
}

/* SMALL PHONES */

@media (max-width: 420px) {
  :root {
    --gutter: 18px;
  }

  .plan {
    padding: 26px 22px;
  }
}

/* RESPECT REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  .js .reveal,
  .js .stagger > * {
    opacity: 1;
    translate: 0 0;
  }
}
