/* Site styles (own code). Logical properties
   (inline-start/end) keep the RTL locales in M3 working without overrides. */
:root {
  /* BirdGrab: indigo #18244A (hero, header ink, footer), mint #55E6B0 (accent), white page and cards */
  --hero-a: #18244a; --hero-b: #1c2a55;
  /* result states keep the dark hero; these accents mark them (>=4.5:1 on #18244a and #1c2a55) */
  --ok: #55e6b0; --err: #ec6c66;
  --busy: #c9f5e4;
  /* mint is a background colour only (1.6:1 on white): text and links stay dark */
  --accent: #55e6b0; --accent-dark: #3fd39c; --accent-soft: #e3faf1; --on-accent: #18244a;
  --primary: #18244a; --primary-dark: #0f1733;
  --ink: #18244a; --text: #262c3d;
  --bg: #f3f5fa; --radius: 8px;
  --shadow: 0 26px 38px -13px rgba(0, 0, 0, .28);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-width: 320px; font-family: var(--font); font-size: 17px; line-height: 1.55;
  color: var(--text); background: var(--bg); }
img { max-width: 100%; }
a { color: var(--primary); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---- header ---- */
.topbar { position: relative; z-index: 20; background: #fff; box-shadow: 0 1px 0 rgba(0, 0, 0, .06); }
.topbar__inner { display: flex; align-items: center; gap: 16px; max-width: 1170px; margin: 0 auto;
  padding: 10px 20px; min-height: 60px; }
.brand { display: flex; flex: none; align-items: center; gap: 10px; color: #000; font-weight: 800; font-size: 1.2rem;
  letter-spacing: -.5px; text-decoration: none; }
/* five items next to the language menu: never under the wordmark; a scroll rather than a clipped item */
.nav { display: flex; gap: 14px; min-width: 0; margin-inline-start: auto; padding-block: 8px 10px; overflow-x: auto;
  scrollbar-width: thin; }
.nav a { color: var(--ink); font-weight: 600; font-size: .9rem; text-decoration: none; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--primary); text-decoration: underline;
  text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 7px; }
.nav a[aria-current="page"] { font-weight: 800; }
.menu-toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; }
.menu-toggle__bars, .menu-toggle__bars::before, .menu-toggle__bars::after { display: block; width: 24px;
  height: 3px; border-radius: 2px; background: var(--ink); position: relative; content: ""; }
.menu-toggle__bars { margin: 0 auto; }
.menu-toggle__bars::before { position: absolute; top: -7px; }
.menu-toggle__bars::after { position: absolute; top: 7px; }
/* language menu at the end of the header: globe + native name; phones show the short code */
.lang-menu { position: relative; flex: none; margin-inline-start: 8px; }
.lang-menu__btn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px;
  font-size: .95rem; font-weight: 700; color: var(--ink); white-space: nowrap; background: #f4f4f4;
  border: 1px solid #d6d6d6; border-radius: 999px; cursor: pointer; list-style: none; user-select: none; }
.lang-menu__btn::-webkit-details-marker { display: none; }
.lang-menu__btn:hover, .lang-menu[open] .lang-menu__btn { border-color: var(--ink); }
.lang-menu__btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.lang-menu__short { display: none; }
.lang-menu__caret { transition: transform .2s; }
.lang-menu[open] .lang-menu__caret { transform: rotate(180deg); }
.lang-menu__list { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; display: grid;
  grid-template-columns: repeat(2, 1fr); width: max-content; gap: 2px; margin: 0; padding: 8px; list-style: none;
  background: #fff; border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, .18); }
.lang-menu__list a { display: block; padding: 10px 14px; color: var(--ink); white-space: nowrap;
  text-decoration: none; border-radius: 6px; }
.lang-menu__list a:hover { background: #f1f1f1; }
.lang-menu__list a[aria-current] { font-weight: 800; background: var(--accent-soft); }

/* ---- hero + form ---- */
.hero { position: relative; padding: 56px 16px 64px; color: #fff; text-align: center;
  background: var(--hero-a); background: linear-gradient(180deg, var(--hero-a) 0, var(--hero-b) 100%); }
.hero::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; }
.hero.is-success::before { background: var(--ok); }
.hero.is-error::before { background: var(--err); }
.hero.is-success #dl-url { border-inline-start: 6px solid var(--ok); }
.hero.is-error #dl-url { border-inline-start: 6px solid var(--err); }
.hero.is-success .result__card { border-top: 4px solid var(--ok); }
.hero--compact { padding-bottom: 80px; }
.hero__inner { max-width: 970px; margin: 0 auto; }
.hero__title { margin: 0 0 .3em; font-size: 2.4rem; line-height: 1.2; color: #fff; }
.hero__subtitle { margin: 0 0 1.6em; font-size: 1.1rem; opacity: .92; }
.dl-form__field { position: relative; max-width: 820px; margin: 0 auto; }
#dl-url { width: 100%; height: 64px; margin: 0; padding-inline: 20px 270px; font: inherit; font-size: 18px;
  color: var(--ink); background: rgba(255, 255, 255, .9); border: 1px solid #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); -webkit-appearance: none; appearance: none; }
#dl-url::placeholder { color: var(--ink); opacity: .6; }
#dl-url:focus { outline: 3px solid var(--accent); outline-offset: 2px; }
.dl-form__tool { position: absolute; top: 12px; inset-inline-end: 160px; height: 40px; display: inline-flex;
  align-items: center; gap: 6px; padding: 0 12px; font: inherit; font-size: 15px; color: var(--primary);
  background: #fff; border: 1px solid #ddd; border-radius: 6px; cursor: pointer; }
.dl-form__submit { position: absolute; top: 4px; inset-inline-end: 4px; height: 56px; min-width: 150px;
  padding: 0 24px; font: inherit; font-size: 18px; font-weight: 700; color: var(--on-accent); background: var(--accent);
  border: 0; border-radius: var(--radius); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .7); cursor: pointer; }
.dl-form__submit:hover { background: var(--accent-dark); }
.dl-form__submit:focus-visible, .btn:focus-visible, .dl-form__tool:focus-visible {
  outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 5px var(--ink); }
.dl-form__submit .when-busy { display: none; }
.is-loading .dl-form__submit { color: var(--on-accent); background: var(--busy); cursor: progress; }
.is-loading .dl-form__submit .when-idle { display: none; }
.is-loading .dl-form__submit .when-busy { display: inline; }
.alert { max-width: 820px; margin: 16px auto 0; padding: 12px 16px; text-align: start; color: var(--text);
  background: #fff; border-inline-start: 6px solid var(--err); border-radius: 6px; }
.alert__title { margin: 0; font-weight: 700; }
.alert__steps { margin: 8px 0 0; padding-inline-start: 22px; line-height: 1.5; }
.alert__steps li + li { margin-top: 4px; }
.alert__retry { display: inline-flex; margin-top: 12px; min-height: 42px; color: var(--on-accent); background: var(--accent); }
.alert__retry:hover { background: var(--accent-dark); }
.btn.is-busy { cursor: progress; opacity: .85; }
.btn.is-ready { outline: 3px solid var(--accent); outline-offset: 2px; }
/* save/help and quote notes sit on the dark result card: a solid light surface, dark type (body >= 17px) */
.save-help, .save-note, .result__note { color: var(--text); background: #fff; border-radius: var(--radius);
  font-size: 17px; }
.save-help, .save-note { margin-top: 14px; padding: 12px 14px; }
.save-help__title { margin: 0; color: var(--ink); font-size: 20px; font-weight: 800; line-height: 1.3; }
.save-help__steps { margin: 8px 0 0; padding-inline-start: 22px; line-height: 1.5; }
.save-help__row { display: flex; gap: 8px; margin-top: 10px; }
.save-help__link { flex: 1; min-width: 0; min-height: 44px; padding: 8px 10px; color: var(--ink); background: #fff;
  border: 1px solid #d6d6d6; border-radius: var(--radius); font: inherit; font-size: 17px; }
.save-help__copy { flex: none; min-height: 44px; padding: 8px 14px; }

/* ---- result ---- */
.result { max-width: 820px; margin: 24px auto 0; text-align: start; }
.result__card { position: relative; overflow: hidden; border-radius: 12px; background: var(--hero-a); box-shadow: var(--shadow); }
.result__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55;
  filter: blur(18px); transform: scale(1.15); }
.result__overlay { position: relative; display: grid; grid-template-columns: 170px 1fr; gap: 22px; padding: 20px;
  background: rgba(24, 36, 74, .72); }
.result__cover { width: 170px; max-height: 300px; object-fit: contain; border-radius: 8px; background: rgba(0, 0, 0, .25); }
.result__author { display: flex; align-items: center; gap: 12px; }
.result__avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255, 255, 255, .7); }
.result__name { font-weight: 700; color: #fff; }
.result__handle, .result__stats { font-size: .9rem; color: rgba(255, 255, 255, .78); }
.result__title { margin: 12px 0 6px; color: #fff; font-weight: 600; overflow-wrap: anywhere; display: -webkit-box;
  -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.result__buttons { display: grid; gap: 10px; margin-top: 16px; }
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 18px;
  font: inherit; font-weight: 700; text-align: center; text-decoration: none; border: 0; border-radius: var(--radius); cursor: pointer; }
.btn--main { color: var(--on-accent); background: var(--accent); }
.btn--main:hover { background: var(--accent-dark); }
.btn--alt { color: #fff; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .38); }
.btn--alt:hover { background: rgba(255, 255, 255, .24); }
.btn--ghost { color: #fff; background: transparent; border: 1px solid rgba(255, 255, 255, .5); }
.btn--inline { display: inline-flex; }
.result__again { width: 100%; margin-top: 14px; }
.alert__link { display: inline-block; margin-top: 10px; font-weight: 700; color: inherit; }
.result__note { margin: 12px 0 0; padding: 10px 14px; }
/* one block per video or GIF of a post (static/js/app.js); the pasted /video/N item is outlined */
.result__media { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .22); color: #fff; }
.result__media-title { font-weight: 700; }
.result__buttons--variants { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); margin-top: 10px; }
.result__buttons--variants .btn--main { grid-column: 1 / -1; }
.result__media.is-selected, .thumb.is-selected { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 8px; }
.result__images { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; margin-top: 16px; }
.thumb { position: relative; margin: 0; overflow: hidden; border-radius: 8px; background: rgba(255, 255, 255, .1); }
.thumb img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.thumb .btn { position: absolute; inset-inline: 6px; bottom: 6px; min-height: 34px; padding: 4px 8px; font-size: .85rem;
  color: var(--primary); background: rgba(255, 255, 255, .92); }

/* ---- content sections ---- */
.section { max-width: 950px; margin: 0 auto; padding: 56px 20px 0; }
.section h2 { margin: 0 0 .6em; font-size: 2rem; line-height: 1.25; text-align: center; color: var(--ink); }
.intro p { max-width: 820px; margin: 0 auto; text-align: center; color: var(--ink); }
.howto__card { padding: 64px 80px; color: var(--on-accent); background: var(--accent); border-radius: 32px;
  box-shadow: 0 84px 84px -56px rgba(0, 0, 0, .25); counter-reset: step; }
.section .howto__card h2 { margin-bottom: 8px; font-size: 1.8rem; text-align: start; color: var(--on-accent); }
.howto__card ol { margin: 0; padding: 0; list-style: none; }
/* the big step number sits in its own column at the start side, level with the title */
.howto__card li { position: relative; min-height: 72px; margin-top: 24px; padding-inline-start: 78px;
  font-size: 1.15rem; counter-increment: step; }
.howto__card li::before { content: counter(step); position: absolute; top: -10px; inset-inline-start: 0; width: 60px;
  text-align: center; font-size: 72px; font-weight: 900; line-height: 1; color: var(--ink); opacity: .6; }
.howto__card li b, .howto__card li span { position: relative; }
.howto__card li b { display: block; font-weight: 900; }
.features__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 28px; }
.feature { text-align: center; color: var(--ink); }
.feature img { width: 88px; height: 88px; }
.feature h3 { margin: 12px 0 8px; font-size: 1.3rem; font-weight: 900; }
.feature p { margin: 0; }
.devices { display: grid; gap: 40px; }
.device { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: center; color: var(--ink); }
.device:nth-child(even) { grid-template-columns: 1fr 220px; }
.device:nth-child(even) img { order: 2; }
.device h3 { margin: 0 0 12px; font-size: 1.6rem; line-height: 1.25; }
.device p { margin: 0; }
.faq__list { display: grid; gap: 12px; }
.faq__item { padding: 0 24px; background: #fff; border-radius: var(--radius); }
.faq__item summary { position: relative; padding-block: 20px; padding-inline-end: 32px; font-size: 1.1rem; font-weight: 700;
  color: var(--ink); cursor: pointer; list-style: none; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: ""; position: absolute; top: 50%; inset-inline-end: 6px; width: 10px; height: 10px;
  border: solid var(--ink); border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq__item[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq__item p { margin: 0; padding-bottom: 20px; color: var(--ink); }
.ad-slot:empty { display: none; }
.section.legal { max-width: 820px; }
.section.legal h2 { margin: 1.6em 0 .5em; font-size: 1.35rem; text-align: start; }
.legal p { margin: 0 0 1em; color: var(--ink); }
.legal__lead { font-size: 1.15rem; }
.legal__note { font-size: .95rem; opacity: .8; }

/* Landing pages: the long sections below the fold (and the footer) are laid out, shaped and painted only when they
   come near the viewport. On a phone that work was most of the first long task (GD-07 traces: layout + text shaping
   + paint of ~300 layout objects). `auto` keeps a section's real size once rendered; the placeholder sizes are the
   median heights over 8 languages (412px phone, 1280px desktop), so a section rendered while it scrolls in barely
   moves what follows. Not the tips and intro sections (next to the fold, small) nor the how-to card (its large
   shadow reaches outside the section box, which paint containment would clip). */
#hero ~ .features, #hero ~ .devices, #hero ~ .guides-teaser, #hero ~ .faq, body:has(#hero) > .footer {
  content-visibility: auto; }
#hero ~ .features { contain-intrinsic-size: auto 600px; }
#hero ~ .devices { contain-intrinsic-size: auto 460px; }
#hero ~ .guides-teaser { contain-intrinsic-size: auto 260px; }
#hero ~ .faq { contain-intrinsic-size: auto 900px; }
body:has(#hero) > .footer { contain-intrinsic-size: auto 380px; }
@media (max-width: 768px) {
  #hero ~ .features { contain-intrinsic-size: auto 1530px; }
  #hero ~ .devices { contain-intrinsic-size: auto 1000px; }
  #hero ~ .guides-teaser { contain-intrinsic-size: auto 460px; }
  #hero ~ .faq { contain-intrinsic-size: auto 1060px; }
  body:has(#hero) > .footer { contain-intrinsic-size: auto 580px; }
}

/* ---- footer ---- */
.footer { margin-top: 64px; padding: 40px 20px; color: #fff; background: var(--ink); }
.footer__inner { max-width: 1170px; margin: 0 auto; text-align: center; }
.footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 30px; margin-bottom: 20px; }
.footer__links a { font-size: 1.05rem; color: #fff; text-decoration: none; }
.footer__links a:hover { text-decoration: underline; }
.footer__disclaimer { max-width: 760px; margin: 0 auto 8px; font-size: .95rem; opacity: .85; }
.lang-switch { max-width: 760px; margin: 0 auto 20px; }
.lang-switch summary { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; color: #fff;
  border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; cursor: pointer; list-style: none; }
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin: 14px 0 0;
  padding: 0; list-style: none; }
.lang-switch a { color: #fff; text-decoration: none; opacity: .85; }
.lang-switch a:hover, .lang-switch a[aria-current] { text-decoration: underline; opacity: 1; }
.footer__contact { margin: 0 0 8px; font-size: .95rem; }
.footer__contact a { color: #fff; }
.footer__copy { margin: 0; font-size: .9rem; opacity: .7; }

/* related guides block on the landing pages (partials/landing_guides.html) */
.guides-teaser__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0; padding: 0;
  list-style: none; }
.guides-teaser__list a { display: inline-block; padding: 10px 16px; color: var(--ink); background: #fff;
  border-radius: 999px; font-weight: 600; text-decoration: none; }
.guides-teaser__list a:hover { color: var(--primary); }
.guides-teaser__all { margin: 18px 0 0; text-align: center; }
.guides-teaser__all a { font-weight: 700; }

/* shortcuts into the downloader (templates/partials/landing_growth.html) */
.tips__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.tip { padding: 24px 28px; color: var(--ink); background: #fff; border-radius: 20px; }
.tip[hidden] { display: none; }
.tip h3 { margin: 0 0 10px; font-size: 1.25rem; line-height: 1.3; }
.tip p, .tip ol { margin: 0 0 10px; }
.tip ol { padding-inline-start: 1.3em; }
.tip__example { overflow-wrap: anywhere; }
.tip__example code { padding: 2px 6px; background: var(--accent-soft); border-radius: 6px; }
.tip__note { font-size: .92rem; }

/* ---- responsive ---- */
/* narrow desktops: the five navigation items closer together */
@media (min-width: 1141px) and (max-width: 1180px) {
  .nav { gap: 12px; }
  .nav a { font-size: .86rem; }
  .topbar__inner { gap: 10px; }
}
/* the header folds earlier than the page: six nav items plus the language menu need ~1140px (es, fr) */
@media (max-width: 1140px) {
  .topbar__inner { gap: 8px; }
  .menu-toggle { display: inline-block; order: 1; }
  .nav { display: none; position: absolute; top: 100%; inset-inline: 0; flex-direction: column; gap: 0;
    padding: 6px 0; background: #fafafa; border-top: 1px solid #eee; box-shadow: 0 8px 16px rgba(0, 0, 0, .08); }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 20px; }
  /* globe + short code next to the menu button; the list opens full width like the menu */
  .lang-menu { position: static; margin-inline-start: auto; }
  .lang-menu__btn { gap: 5px; padding: 0 10px; }
  .lang-menu__name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; }
  .lang-menu__short { display: inline; }
  .lang-menu__list { top: 100%; inset-inline: 0; width: auto; padding: 8px 12px 12px; background: #fafafa;
    border-top: 1px solid #eee; border-radius: 0; box-shadow: 0 8px 16px rgba(0, 0, 0, .08); }
  .lang-menu__list a { padding: 12px 14px; }
}
@media (max-width: 768px) {
  .hero { padding: 36px 12px 44px; }
  .hero__title { font-size: 1.8rem; }
  #dl-url { padding-inline: 16px 112px; }
  .dl-form__tool { inset-inline-end: 8px; }
  .dl-form__submit { position: static; width: 100%; margin-top: 12px; }
  .result__overlay { grid-template-columns: 1fr; }
  .result__cover { display: none; }
  .section { padding-top: 44px; }
  .section h2 { font-size: 1.6rem; }
  .howto__card { padding: 40px 26px; border-radius: 24px; }
  .howto__card li { padding-inline-start: 58px; }
  .howto__card li::before { width: 44px; font-size: 56px; }
  .features__grid { grid-template-columns: 1fr 1fr; }
  .device, .device:nth-child(even) { grid-template-columns: 1fr; text-align: center; }
  .device img, .device:nth-child(even) img { order: 0; width: 170px; margin: 0 auto; }
}
@media (max-width: 480px) {
  .features__grid { grid-template-columns: 1fr; }
  .dl-form__tool span { display: none; }
  #dl-url { padding-inline-end: 56px; }
  .save-help__row { flex-direction: column; }
  .save-help__link, .save-help__copy { flex: none; width: 100%; }
}
/* language caret and FAQ marker are the only transitions in this file */
@media (prefers-reduced-motion: reduce) {
  .lang-menu__caret, .faq__item summary::after { transition: none; }
}
