/* Joberto · shared by every page: tokens, background, brand, menu, light sheet, footer.
   Tokens follow the app: docs/design/DESIGN_SYSTEM.md (accent, mesh, status colors) and
   BrandWordmark.swift (Poppins Bold wordmark, gradient and sparks).
   Section styles: home.css (home page), pagine.css (text pages, blog, tools, comparisons). */

@font-face {
  font-family: "Poppins";
  src: url("../fonts/Poppins-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Registered so the journey glow can fade from one status color to the next. */
@property --glow {
  syntax: "<color>";
  inherits: true;
  initial-value: #6B7393;
}

:root {
  --night: #09081F;
  --ink: #FFFFFF;
  --ink-2: rgba(235, 235, 245, 0.68);
  --ink-3: rgba(235, 235, 245, 0.42);
  --line: rgba(255, 255, 255, 0.09);

  --accent: #7468FF;
  --erto-a: #7E8CFF;
  --erto-b: #A48BFF;
  --spark-1: #6FB0FF;
  --spark-2: #8C8CFF;
  --spark-3: #A98BFF;

  /* Light theme, from the wordmark and the app's light mesh. */
  --day-ink: #141A3A;
  --day-ink-2: #4A4F73;
  --day-a: #3D5CFF;
  --day-b: #7458F0;

  /* Status badge fills (StatusPresentation.badgeFill) and tints (DESIGN_SYSTEM). */
  --s-toApply: #676E8D;
  --s-applied: #2D5FFF;
  --s-inReview: #1D75A7;
  --s-interviewing: #7646FF;
  --s-offer: #167E4C;
  --s-hired: #0E7D70;
  --t-toApply: #6B7393;
  --t-applied: #3D6BFF;
  --t-inReview: #2D9CDB;
  --t-interviewing: #7B4DFF;
  --t-offer: #1FAF6A;
  --t-hired: #12A594;
  --t-rejected: #E5484D;

  --glass-row: rgba(46, 38, 116, 0.62);
  --glass-edge: rgba(164, 139, 255, 0.22);

  --font-display: "Poppins", ui-rounded, system-ui, sans-serif;
  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --gutter: 16px;
  --max: 1180px;
}

@media (min-width: 768px) {
  :root { --gutter: 32px; }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  background: var(--night);
}

/* No body background: it would paint over the fixed .backdrop. */
body {
  margin: 0;
  color: var(--ink);
  font: 400 17px/1.5 var(--font-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: inherit; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

h2 { font-size: clamp(38px, 9vw, 78px); }
h3 { font-size: clamp(26px, 6vw, 40px); line-height: 1.08; letter-spacing: -0.03em; }

p { text-wrap: pretty; }

.grad {
  color: transparent;
  background: linear-gradient(90deg, var(--erto-a), var(--erto-b));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

:focus-visible {
  outline: 2px solid var(--erto-b);
  outline-offset: 3px;
  border-radius: 10px;
}

.skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-200%);
  transition: transform 0.3s var(--ease-out), opacity 0.2s;
}
.skip:focus-visible { opacity: 1; pointer-events: auto; transform: none; }

/* ---------- Background: the app's dark violet mesh, slowly drifting ---------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(180deg, #120E3A 0%, #0D0B2A 55%, #0A0922 100%);
  pointer-events: none;
}

/* Colors from AppBackground.darkColors, a little brighter for large screens. */
.backdrop::before {
  content: "";
  position: absolute;
  inset: -25%;
  background:
    radial-gradient(40% 34% at 22% 16%, rgba(76, 54, 170, 0.95), transparent 72%),
    radial-gradient(36% 32% at 84% 22%, rgba(44, 52, 160, 0.85), transparent 72%),
    radial-gradient(50% 40% at 52% 52%, rgba(60, 40, 138, 0.8), transparent 74%),
    radial-gradient(44% 36% at 14% 80%, rgba(38, 46, 130, 0.85), transparent 72%),
    radial-gradient(42% 36% at 86% 84%, rgba(58, 40, 124, 0.85), transparent 72%);
  animation: drift 46s ease-in-out infinite alternate;
}

/* Fine grain keeps the gradient from looking flat. */
.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes drift {
  to { transform: translate3d(4%, -3%, 0) rotate(5deg) scale(1.06); }
}

/* ---------- Brand pieces ---------- */

.wordmark {
  position: relative;
  display: inline-block;
  padding-right: 0.38em;
  font: 700 1em/1.4 var(--font-display);
  white-space: nowrap;
}
.wordmark__job { color: #fff; }
.wordmark__erto {
  color: transparent;
  background: linear-gradient(90deg, var(--erto-a), var(--erto-b));
  -webkit-background-clip: text;
  background-clip: text;
}
.wordmark .sparks {
  position: absolute;
  top: -0.005em;
  right: -0.025em;
  width: 0.63em;
  height: 0.63em;
}

/* The three strokes of the logo: also the site's animation device. */
.sparks { overflow: visible; }
.sparks line { stroke-width: 26; stroke-linecap: round; }
.sparks line:nth-child(1) { stroke: var(--spark-1); }
.sparks line:nth-child(2) { stroke: var(--spark-2); }
.sparks line:nth-child(3) { stroke: var(--spark-3); }

.sparks--burst line {
  stroke-dasharray: 60 60;
  stroke-dashoffset: 60;
}
.sparks--burst.is-drawn line { animation: spark-draw 0.7s var(--ease-out) forwards; }
.sparks--burst.is-drawn line:nth-child(2) { animation-delay: 0.07s; }
.sparks--burst.is-drawn line:nth-child(3) { animation-delay: 0.14s; }
.sparks--burst.is-flick line { animation: spark-flick 0.9s var(--ease-out) forwards; }
.sparks--burst.is-flick line:nth-child(2) { animation-delay: 0.06s; }
.sparks--burst.is-flick line:nth-child(3) { animation-delay: 0.12s; }

@keyframes spark-draw { to { stroke-dashoffset: 0; } }
@keyframes spark-flick {
  0% { stroke-dashoffset: 60; }
  45% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -60; }
}

.status {
  --c: var(--s-toApply);
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 999px;
  background-color: var(--c);
  color: #fff;
  font: 600 13px/1.25 var(--font-text);
  letter-spacing: 0.005em;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: background-color 0.6s var(--ease-out);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--erto-b);
  font: 600 15px/1.3 var(--font-text);
  letter-spacing: 0.01em;
}
.kicker::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-13 -13 126 126'%3E%3Cg stroke-width='26' stroke-linecap='round'%3E%3Cline x1='7.8' y1='44.5' x2='13.6' y2='3' stroke='%236FB0FF'/%3E%3Cline x1='43.2' y1='58.3' x2='66.2' y2='36.1' stroke='%238C8CFF'/%3E%3Cline x1='55.7' y1='94.2' x2='87.5' y2='90.8' stroke='%23A98BFF'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain;
}

/* Primary button: the app's prominent glass button, violet tint. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 26px;
  border-radius: 999px;
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  background: linear-gradient(180deg, #8C82FF 0%, #6E61FA 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(20, 10, 80, 0.25),
    0 12px 32px -10px rgba(116, 104, 255, 0.85);
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s var(--ease-out);
}
.button:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 -1px 0 rgba(20, 10, 80, 0.25), 0 18px 40px -12px rgba(116, 104, 255, 0.95); }
.button:active { transform: scale(0.97); }

/* Official Apple badge, unmodified (Apple marketing guidelines). */
.store {
  display: inline-flex;
  border-radius: 9px;
  transition: transform 0.35s var(--ease-spring);
}
.store img { display: block; height: 54px; width: auto; }
.store:hover { transform: translateY(-2px); }
.store--large img { height: 62px; }

/* iPhone frame around the real screenshots. --w sets the size. */
.phone {
  width: var(--w, 300px);
  padding: calc(var(--w, 300px) * 0.03);
  border-radius: calc(var(--w, 300px) * 0.17);
  background: linear-gradient(145deg, #575170 0%, #1a1825 20%, #0b0a12 55%, #2b2838 85%, #4d4862 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    inset 0 0 0 calc(var(--w, 300px) * 0.012) #050409,
    0 50px 90px -34px rgba(2, 1, 14, 0.95),
    0 24px 60px -24px rgba(90, 70, 220, 0.5);
}
.phone img {
  width: 100%;
  border-radius: calc(var(--w, 300px) * 0.14);
  background: #110D38;
}

.logo-tile {
  width: 52px;
  height: 52px;
  border-radius: 12px;
}

/* ---------- Navigation ---------- */

.nav {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  left: 50%;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 6px;
  width: min(calc(100% - 20px), 1120px);
  height: 60px;
  padding: 0 8px 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(24, 19, 70, 0.48);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  backdrop-filter: blur(22px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 30px -14px rgba(3, 2, 15, 0.7);
  transform: translateX(-50%);
  transition: background 0.4s var(--ease-out);
}
.nav.is-scrolled { background: rgba(24, 19, 70, 0.68); }

.nav__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
  padding: 4px 6px 4px 2px;
  border-radius: 999px;
  text-decoration: none;
}
.nav__brand .wordmark { font-size: 23px; }

.nav__links { display: none; gap: 2px; }
.nav__links a {
  padding: 9px 15px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}
.nav__links a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.07); }

.nav__cta {
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  background: linear-gradient(180deg, #8C82FF, #6E61FA);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.3s var(--ease-spring);
}
.nav__cta:hover { transform: scale(1.04); }

/* Pages menu on narrow screens: a native <details>, so it works without JavaScript too. */
.nav__menu { position: relative; order: 3; }
.nav__menu > summary {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.nav__menu > summary::-webkit-details-marker { display: none; }
.nav__menu > summary:focus-visible { outline: 2px solid var(--erto-a); outline-offset: 2px; }
.nav__menu svg { width: 20px; height: 20px; overflow: visible; }
.nav__menu svg line {
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.35s var(--ease-spring), opacity 0.2s;
}
.nav__menu[open] .bar-1 { transform: translateY(6px) rotate(45deg); }
.nav__menu[open] .bar-2 { opacity: 0; }
.nav__menu[open] .bar-3 { transform: translateY(-6px) rotate(-45deg); }
.nav__sheet {
  position: absolute;
  top: calc(100% + 17px);
  right: -8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: min(260px, calc(100vw - 20px));
  padding: 8px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(30, 24, 84, 0.97);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 24px 50px -18px rgba(3, 2, 15, 0.85);
  transform-origin: calc(100% - 28px) 0;
  animation: menu-in 0.32s var(--ease-spring);
}
@keyframes menu-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.94); }
  to { opacity: 1; transform: none; }
}
.nav__sheet a {
  padding: 13px 16px;
  border-radius: 18px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
}
.nav__sheet a:hover,
.nav__sheet a[aria-current] { background: rgba(255, 255, 255, 0.08); }
.nav__sheet a[aria-current] { font-weight: 600; }
.nav__sheet hr { width: calc(100% - 32px); margin: 6px auto; border: 0; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.nav__links a[aria-current] { color: var(--ink); }

@media (min-width: 960px) {
  .nav__links { display: flex; margin-right: 8px; }
  .nav__menu { display: none; }
}


/* Decorations (glows, Joberto peeking out) never widen the page. `clip` keeps sticky working. */
main { overflow-x: clip; }

/* ---------- Light sheet: the privacy section of the home and every text page ---------- */

.sheet__inner {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  padding: 64px 0 56px;
  overflow: hidden;
  border-radius: 40px;
  color: var(--day-ink);
  background:
    radial-gradient(70% 60% at 8% 0%, #F4F1FF 0%, transparent 70%),
    radial-gradient(60% 60% at 100% 30%, #D8DEFF 0%, transparent 70%),
    radial-gradient(60% 50% at 30% 100%, #D3C8F7 0%, transparent 70%),
    #E4DCFD;
  box-shadow: 0 -20px 80px -30px rgba(116, 104, 255, 0.55);
  transform-origin: 50% 0;
  transform: translateY(calc((1 - var(--p, 1)) * 60px)) scale(calc(0.94 + var(--p, 1) * 0.06));
}
.sheet__grabber {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 40px;
  height: 5px;
  margin-left: -20px;
  border-radius: 3px;
  background: rgba(20, 26, 58, 0.2);
}
code {
  padding: 0.1em 0.4em;
  border-radius: 6px;
  background: rgba(91, 79, 216, 0.12);
  font: 600 0.92em ui-monospace, "SF Mono", Menlo, monospace;
}


@media (min-width: 768px) {
  .sheet__inner { padding: 88px 0 72px; border-radius: 48px; }
}

/* ---------- Footer ---------- */

.footer {
  display: grid;
  gap: 24px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px var(--gutter) calc(40px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 14px;
}
.footer__brand .wordmark { font-size: 34px; }
.footer__icon { display: block; width: 48px; height: 48px; margin-bottom: 12px; }
.footer__brand p { margin: 0; color: var(--ink-2); }
.footer__notes p { margin: 3px 0; }
.footer a { color: var(--ink-2); text-underline-offset: 3px; }
.footer a:hover { color: var(--ink); }

@media (min-width: 768px) {
  .footer { grid-template-columns: 1fr auto; align-items: end; }
  .footer__notes { text-align: right; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .backdrop::before { animation: none; }
  .js .reveal { transform: none; filter: none; }
  .sparks--burst line { stroke-dashoffset: 0; }
}
