/* Nested Egg site styles. Mobile first: base rules are for phones,
   with breakpoints at 560px, 720px and 960px.
   Brand: mostly cream and aubergine, pink as an accent (about a tenth),
   orange only for the egg, short rules and focus rings. Flat colour, no shadows. */

:root {
  --cream: #FBF1E2;
  --aubergine: #4A1942;
  --aubergine-hover: #622657;
  --pink: #F7A3B5;
  --pink-hover: #F58FA6;
  --orange: #F2542D;
  --white: #FFFFFF;
  --mauve: #6E4A68;
  --line: #D9C9C6;
  --disabled: #E9DDD3;
  --error: #B3261E;
  --error-tint: #F9DEDA;

  --display: Fraunces, Georgia, 'Times New Roman', serif;
  --body: Figtree, 'Helvetica Neue', Arial, sans-serif;

  --radius: 20px;
  --gutter: 16px;
  --nav-h: 64px;

  color-scheme: light;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--aubergine);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 4px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  text-wrap: balance;
}

p { margin: 0; }

.wrap {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--aubergine);
  color: var(--cream);
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

.nowrap { white-space: nowrap; }

.caption {
  font: 500 13px/1.4 var(--body);
  color: var(--mauve);
}

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: 2px solid transparent;
  border-radius: 10px;
  font: 600 17px/1.2 var(--body);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s;
}
.btn--small { min-height: 44px; padding: 0 18px; font-size: 16px; }
.btn--pink { background: var(--pink); color: var(--aubergine); }
.btn--pink:hover { background: var(--pink-hover); }
.btn--outline { background: transparent; color: var(--aubergine); border-color: var(--aubergine); }
.btn--outline:hover { background: var(--white); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}

.arrow { flex: none; transition: transform .2s; }
a:hover .arrow { transform: translateX(3px); }

/* ---------- Nav bar ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}

.site-nav__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 16px;
  min-height: var(--nav-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-block: 6px;
  font: 600 22px/1 var(--display);
  color: var(--aubergine);
  text-decoration: none;
}
.brand svg { flex: none; }
.brand--light { color: var(--cream); }

.menu-btn {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border: 2px solid var(--aubergine);
  border-radius: 10px;
  background: transparent;
  color: var(--aubergine);
  font: 600 16px var(--body);
  cursor: pointer;
}
.js .menu-btn { display: inline-flex; }

.menu-btn__icon { display: grid; gap: 4px; width: 18px; }
.menu-btn__icon i {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .2s, opacity .2s;
}
.menu-btn[aria-expanded="true"] .menu-btn__icon i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__icon i:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] .menu-btn__icon i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Phones: full-width panel under the bar (always visible without JavaScript) */
.primary-nav {
  flex-basis: 100%;
  padding: 0 0 20px;
}
.js .primary-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: calc(100dvh - var(--nav-h));
  overflow-y: auto;
  padding: 8px max(var(--gutter), env(safe-area-inset-left)) 24px;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.js .site-nav.is-open .primary-nav { display: block; }

.primary-nav ul { list-style: none; margin: 0 0 20px; padding: 0; }

.primary-nav li a {
  display: flex;
  align-items: center;
  min-height: 60px;
  border-bottom: 1px solid var(--line);
  font: 500 27px/1.2 var(--display);
  text-decoration: none;
}
.primary-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--orange);
  text-decoration-thickness: 3px;
  text-underline-offset: 8px;
}

.nav-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 20px;
  border-radius: 10px;
  background: var(--aubergine);
  color: var(--cream);
  font-weight: 600;
  text-decoration: none;
}
.nav-cta:hover { background: var(--aubergine-hover); }

/* ---------- Hero ---------- */

.hero {
  background: var(--aubergine);
  color: var(--cream);
  overflow: hidden;
}

.hero__grid {
  display: grid;
  gap: 40px;
  padding-block: 40px 48px;
}

.eyebrow {
  font: 600 15px/1.3 var(--body);
  color: var(--pink);
}

.hero h1 {
  margin-top: 12px;
  font-size: clamp(40px, 11vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.01em;
}
.hero h1 .hl { color: var(--pink); }

.hero__lead {
  margin-top: 16px;
  max-width: 32em;
  font-size: 19px;
  line-height: 1.5;
}

.hero__cta { width: 100%; margin-top: 28px; }

/* Calculator teaser: a flat card sitting in front of a big orange egg */
.hero__visual {
  position: relative;
  padding: 28px 28px 0 0;
}

.hero__egg {
  position: absolute;
  top: 0;
  right: -12px;
  width: 132px;
  height: auto;
}

.pay-preview {
  position: relative;
  display: flex;
  flex-direction: column;
  max-width: 440px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--cream);
  color: var(--aubergine);
  text-decoration: none;
}
.pay-preview strong {
  margin-top: 2px;
  font: 500 24px/1.2 var(--display);
}

.bars {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  height: 160px;
  margin-top: 20px;
}

.bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.bar__val {
  font: 600 12px/1 var(--body);
  white-space: nowrap;
}
.bar__val.is-hidden { visibility: hidden; }
.bar__track {
  flex: 1;
  display: flex;
  align-items: flex-end;
  width: 100%;
}
.bar__fill {
  display: block;
  width: 100%;
  border-radius: 6px 6px 2px 2px;
  background: var(--pink);
}
.bar--full .bar__fill { background: var(--aubergine); }
.bar__month { font: 500 13px/1 var(--body); color: var(--mauve); }

.pay-preview__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* ---------- Sections ---------- */

.section { padding-block: 56px; }
.section--tight { padding-block: 40px; }
.section--white {
  background: var(--white);
  border-block: 1px solid var(--line);
}

.section__head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}
.section__head::before { /* short orange rule */
  content: "";
  width: 32px;
  height: 4px;
  margin-bottom: 8px;
  border-radius: 2px;
  background: var(--orange);
}
.section__head h2 {
  font-size: clamp(31px, 7vw, 42px);
  line-height: 1.1;
}

/* Heading with an action: stacked on phones, side by side from 560px */
.section__head--row { align-items: flex-start; gap: 16px; }
.section__head--row::before { margin-bottom: -8px; }

/* ---------- Start where you are: compact rows on phones, three tiles on wider screens ---------- */

.paths {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.path {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 16px;
  height: 100%;
  padding: 16px 16px 16px 20px;
  border-radius: 16px;
  text-decoration: none;
}
.path__name { font: 500 24px/1.2 var(--display); }
.path__text { grid-column: 1; font-size: 15px; line-height: 1.4; }
.path__go {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px solid currentColor;
  border-radius: 50%;
}
.path--pink { background: var(--pink); color: var(--aubergine); }
.path--aubergine { background: var(--aubergine); color: var(--cream); }
.path--white { background: var(--white); border: 1px solid var(--line); }
.path:hover .path__name { text-decoration: underline; text-decoration-thickness: 2px; }

/* ---------- Popular guides: one ranked list, number 1 featured ---------- */

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

.rank {
  font: 500 30px/1 var(--display);
  color: var(--mauve);
}

.feature-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cream);
  text-decoration: none;
}
.feature-card__art svg { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.feature-card__body {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  padding: 20px 20px 24px;
}
.feature-card__body .rank { color: var(--aubergine); }
.feature-card__text { display: flex; flex-direction: column; gap: 8px; }
.feature-card__title { font: 500 clamp(27px, 6vw, 33px)/1.15 var(--display); }
.feature-card__text .text-link { margin-top: 4px; }
.feature-card:hover .feature-card__title { text-decoration: underline; text-decoration-thickness: 2px; }

.popular__item a {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  padding: 18px 21px; /* lines the numbers up with the featured card's */
  text-decoration: none;
}
.popular__item + .popular__item a { border-top: 1px solid var(--line); }
.popular__text { display: flex; flex-direction: column; gap: 4px; }
.popular__title { font: 500 21px/1.3 var(--display); }
.popular__summary { font-size: 15px; line-height: 1.5; color: var(--mauve); }
.popular__item a:hover .popular__title { text-decoration: underline; }

/* ---------- Instagram ---------- */

.insta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.insta__tile {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 12px;
  text-decoration: none;
}
.insta__tile img { width: 100%; height: 100%; object-fit: cover; }
.insta__tile--aubergine { background: var(--aubergine); color: var(--cream); }
.insta__tile--pink { background: var(--pink); color: var(--aubergine); }
.insta__tile--cream { background: var(--white); color: var(--aubergine); border: 1px solid var(--line); }

.insta__quote {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 30px 10px 10px;
  overflow: hidden;
  font: 500 clamp(12px, 3.3vw, 18px)/1.2 var(--display);
}

.insta__glyph {
  position: absolute;
  top: 8px;
  right: 8px;
}
.insta__tile img + .insta__glyph { color: var(--white); }
.insta__tile:hover .insta__quote { text-decoration: underline; }

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

.site-footer {
  padding: 48px 0 calc(28px + env(safe-area-inset-bottom));
  background: var(--aubergine);
  color: var(--cream);
}

.site-footer__top { display: grid; gap: 40px; }
.site-footer__brand p {
  margin-top: 14px;
  font: 500 21px/1.3 var(--display);
  color: var(--pink);
}

.site-footer__cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 24px;
}
.site-footer h2 {
  margin-bottom: 8px;
  font: 600 15px/1.4 var(--body);
  color: var(--pink);
}
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li a {
  display: inline-block;
  padding-block: 7px;
  text-decoration: none;
}
.site-footer li a:hover { text-decoration: underline; }

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 24px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(251, 241, 226, 0.2);
  font-size: 15px;
}

/* ---------- Larger phones ---------- */

@media (min-width: 560px) {
  .hero__cta { width: auto; }
  .hero__egg { width: 170px; right: 0; }

  /* The orange rule spans the top row, so it sits above the heading, not beside it */
  .section__head--row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 8px 16px;
  }
  .section__head--row::before { grid-column: 1 / -1; margin-bottom: 8px; }
}

/* ---------- Tablets ---------- */

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

  .section { padding-block: 80px; }
  .section--tight { padding-block: 56px; }

  .paths { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .path { padding: 20px 20px 20px 24px; min-height: 112px; }

  .insta { gap: 12px; }
  .site-footer__cols { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Desktop ---------- */

@media (min-width: 960px) {
  :root { --nav-h: 76px; }

  .site-nav__bar { flex-wrap: nowrap; }
  .js .menu-btn { display: none; }

  .primary-nav,
  .js .primary-nav {
    display: flex;
    flex-basis: auto;
    position: static;
    align-items: center;
    gap: 28px;
    max-height: none;
    overflow: visible;
    padding: 0;
    background: none;
    border: 0;
  }
  .primary-nav ul { display: flex; gap: 4px; margin: 0; }
  .primary-nav li a {
    min-height: 44px;
    padding: 0 12px;
    border: 0;
    font: 600 16px var(--body);
  }
  .primary-nav li a:hover { text-decoration: underline; }
  .nav-cta { min-height: 44px; font-size: 16px; }

  .hero__grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: center;
    gap: 64px;
    padding-block: 88px;
  }
  .hero__visual { padding: 56px 56px 0 0; }
  .hero__egg { width: 230px; top: 0; right: 0; }
  .pay-preview { padding: 24px; }
  .bars { height: 190px; }

  /* Number 1 on the left, 2 to 5 stacked beside it */
  .popular {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    column-gap: 48px;
    row-gap: 0;
    align-items: start;
  }
  .popular__feature { grid-row: 1 / span 4; }
  .popular__item a { padding-inline: 0; }
  .popular__item:nth-child(2) a { padding-top: 0; }

  .insta { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .insta__quote { font-size: 17px; padding: 36px 14px 14px; }

  .site-footer__top { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
}
