/* ==================================================
   Tabby — home page code copy (from Figma references)
   Announcement (black) + full interactive navigation
   ================================================== */

@font-face { font-family: 'Tabby Sans Text'; src: url('fonts/TabbySansText-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Tabby Sans Text'; src: url('fonts/TabbySansText-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Tabby Sans Text'; src: url('fonts/TabbySansText-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Tabby Sans Display'; src: url('fonts/TabbySansDisplay-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  /* Color tokens */
  --bg-primary: #ffffff;
  --bg-secondary: #f5f4f2;
  --bg-green: #6cff93;
  --bg-footer: #1a1919;
  --front-primary: #1a1919;
  --front-secondary: #75726f;
  --front-fixed-white: #f5f4f2;
  --front-fixed-gray: #75726f;
  --line-secondary: rgba(26, 25, 25, 0.15);
  --line-fixed-white: rgba(255, 255, 255, 0.15);
  --line-hover-white: rgba(255, 255, 255, 0.35);
  --bg-minor: rgba(26, 25, 25, 0.08);
  --bg-hover: rgba(26, 25, 25, 0.06);
  --buttons-primary-bg: #1a1919;
  --buttons-primary-text: #f5f4f2;
  --shadow-soft: 0 8px 16px 0 rgba(26, 25, 25, 0.08);

  --font-ui: 'Tabby Sans Text', -apple-system, sans-serif;
  --font-display: 'Tabby Sans Display', 'Tabby Sans Text', -apple-system, sans-serif;

  --header-height: 80px;
  --page-margin: 20px;      /* mobile */
  --content-max: 1184px;

  --ease-panel: cubic-bezier(0.32, 0.72, 0, 1);
  --duration-panel: 550ms;
  --duration-icon: 300ms;
  --z-header: 100;
}

@media (min-width: 768px)  { :root { --page-margin: 64px; } }
@media (min-width: 1280px) { :root { --page-margin: 48px; } }

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-padding-top: calc(48px + var(--header-height)); }

body {
  font-family: var(--font-ui);
  color: var(--front-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ordn' 1, 'ss19' 1, 'ss20' 1;
}

body.is-menu-open, body.is-locale-open { overflow: hidden; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
img { display: block; }

/* ============ Sticky group ============ */

.sticky-group { position: sticky; top: 0; z-index: var(--z-header); }

/* ============ Announcement — Black variant ============ */

.announcement[hidden] { display: none; }

.announcement {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: var(--bg-footer);
  color: var(--front-fixed-white);
  padding: 24px 20px;
  overflow: hidden;
}

.announcement__inner { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; min-width: 0; }
.announcement__msg { font-size: 16px; line-height: 24px; font-weight: 400; }
.announcement__msg strong { font-weight: 700; }

.announcement__link { display: flex; flex-direction: column; align-items: flex-start; padding-top: 2px; text-decoration: none; }
.announcement__link-label { font-size: 16px; line-height: 24px; font-weight: 700; }
.announcement__link-underline { display: block; width: 100%; height: 2px; background: var(--line-fixed-white); transition: background-color 150ms ease-out; }
.announcement__link:hover .announcement__link-underline { background: var(--line-hover-white); }

.announcement__close { flex-shrink: 0; position: relative; width: 24px; height: 24px; display: grid; place-items: center; transition: opacity 150ms ease-out; -webkit-tap-highlight-color: transparent; }
.announcement__close::before { content: ''; position: absolute; inset: -10px; }
.announcement__close:hover { opacity: 0.6; }

@media (min-width: 768px) {
  .announcement { flex-direction: row; justify-content: center; padding: 16px 64px; }
  .announcement__inner { flex: 0 1 auto; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; max-width: 640px; text-align: center; }
  .announcement__close { position: absolute; inset-inline-end: 24px; top: 50%; translate: 0 -50%; }
}

@media (min-width: 1024px) {
  .announcement { min-height: 48px; padding: 10px 128px; }
  .announcement__inner { max-width: 776px; }
}

/* ============ Header ============ */

/* Transparent over the hero by default; solid white on scroll / open panels */
.header { position: relative; background: transparent; transition: background-color 200ms ease, box-shadow 200ms ease; }
.header.is-solid { background: var(--bg-primary); box-shadow: var(--shadow-soft); }

.header__wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: var(--header-height);
  padding: 12px var(--page-margin);
  max-width: 1280px; margin-inline: auto;
  position: relative; z-index: 2;
}

.header__left, .header__right { display: flex; align-items: center; }
.header__left { gap: 32px; }
.header__right { gap: 16px; }
.header__logo img { width: 133px; height: 38.7px; }
.header__links { display: none; align-items: center; gap: 16px; }

.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px; border-radius: 8px;
  font-size: 16px; line-height: 24px; font-weight: 700;
  text-decoration: none; white-space: nowrap;
  transition: background-color 150ms ease;
}
.nav-link:hover { background: var(--bg-hover); }
.nav-link.is-active { background: var(--bg-minor); }

.header__signup { display: none; }

.lang { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 8px; transition: background-color 150ms ease; }
.lang:hover { background: var(--bg-hover); }
.lang__flag { position: relative; width: 24px; height: 24px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.lang__flag img { position: absolute; inset-block: 0; inset-inline-start: -16.67%; width: 200%; height: 100%; }
.lang__label { font-size: 16px; font-weight: 700; line-height: 24px; }

/* ============ Burger toggle (below 1024) ============ */

.nav-toggle { width: 48px; height: 48px; margin-inline-end: -12px; display: grid; place-items: center; -webkit-tap-highlight-color: transparent; }
.nav-toggle__line { grid-area: 1 / 1; width: 18px; height: 2px; border-radius: 1px; background: var(--front-primary); transition: transform var(--duration-icon) var(--ease-panel), opacity calc(var(--duration-icon) * 0.6) ease; }
.nav-toggle__line--top { transform: translateY(-6px); }
.nav-toggle__line--bottom { transform: translateY(6px); }
body.is-menu-open .nav-toggle__line--top { transform: translateY(0) rotate(45deg); }
body.is-menu-open .nav-toggle__line--mid { opacity: 0; transform: scaleX(0.4); }
body.is-menu-open .nav-toggle__line--bottom { transform: translateY(0) rotate(-45deg); }

@media (min-width: 1024px) {
  .header__links { display: flex; }
  .header__signup { display: inline-flex; }
  .nav-toggle { display: none; }
}

/* ============ Desktop dropdowns ============ */

.dropdown {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 1;
  display: grid; grid-template-rows: 0fr;
  background: var(--bg-primary);
  visibility: hidden;
  transition: grid-template-rows 300ms var(--ease-panel), visibility 0s linear 300ms;
}
.dropdown.is-open { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows 300ms var(--ease-panel), visibility 0s; }
.dropdown__clip { overflow: hidden; min-height: 0; }

.dropdown__wrap {
  display: flex; gap: 40px; align-items: flex-start;
  max-width: 1280px; margin-inline: auto;
  padding: 40px var(--page-margin) 80px;
}

.dropdown__highlight { flex: 1 0 0; min-width: 1px; display: flex; flex-direction: column; align-items: flex-start; gap: 32px; }

.dropdown__list { flex: 0 1 300px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding-inline-start: 48px; }
@media (min-width: 1280px) { .dropdown__list { flex: 0 0 368px; padding-inline-start: 94px; } }

.dropdown__list-heading, .link-list__heading {
  padding-inline-start: 8px;
  font-size: 14px; line-height: 20px; font-weight: 500;
  color: var(--front-secondary);
}

.card-text { display: flex; flex-direction: column; gap: 8px; }
.card-text__title { font-family: var(--font-display); font-size: 28px; font-weight: 700; line-height: 32px; letter-spacing: 0.28px; }
.card-text__body { font-size: 16px; font-weight: 400; line-height: 24px; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 36px; border-radius: 12px;
  background: var(--buttons-primary-bg); color: var(--buttons-primary-text);
  font-size: 16px; font-weight: 700; line-height: 24px;
  text-decoration: none;
  transition: transform 150ms ease;
}
.button:active { transform: scale(0.97); }

.menu-link {
  padding: 4px 8px; border-radius: 8px;
  font-size: 20px; font-weight: 500; line-height: 28px;
  color: var(--front-primary); text-decoration: none;
  transition: background-color 150ms ease;
}
.menu-link:hover { background: var(--bg-hover); }

.scrim {
  position: fixed; inset: 0; z-index: calc(var(--z-header) - 1);
  background: rgba(26, 25, 25, 0.4);
  opacity: 0; pointer-events: none;
  transition: opacity 300ms ease;
}
.scrim.is-visible { opacity: 1; pointer-events: auto; }

/* ============ Locale drawer ============ */

.locale {
  position: fixed; inset: 0; z-index: calc(var(--z-header) + 10);
  visibility: hidden;
  transition: visibility 0s linear 300ms;
}
.locale::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(26, 25, 25, 0.6);
  opacity: 0; transition: opacity 300ms ease;
}
.locale.is-open { visibility: visible; transition-delay: 0s; }
.locale.is-open::before { opacity: 1; }

.locale__panel {
  position: absolute; top: 0; bottom: 0; inset-inline-end: 0;
  width: min(560px, 100%);
  background: var(--bg-primary);
  padding: 32px;
  transform: translateX(100%);
  transition: transform 400ms var(--ease-panel);
  overflow-y: auto;
}
.locale.is-open .locale__panel { transform: translateX(0); }

.locale__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 40px; }
.locale__title { font-family: var(--font-ui); font-size: 20px; line-height: 24px; font-weight: 700; }
.locale__close { width: 24px; height: 24px; display: grid; place-items: center; }

.locale__field { margin-bottom: 24px; }
.locale__label { display: block; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--front-secondary); margin-bottom: 8px; }

.locale__select-wrap { position: relative; display: flex; align-items: center; }
.locale__flag { position: absolute; inset-inline-start: 16px; z-index: 1; pointer-events: none; }
.locale__select {
  width: 100%; appearance: none;
  border: 1px solid var(--line-secondary); border-radius: 12px;
  background: var(--bg-primary);
  padding: 14px 48px 14px 16px;
  font: inherit; font-size: 16px; line-height: 24px; font-weight: 700;
  color: var(--front-primary);
  cursor: pointer;
}
.locale__select--flag { padding-inline-start: 52px; }
.locale__chevron { position: absolute; inset-inline-end: 16px; pointer-events: none; }
.locale__submit { margin-top: 16px; }

/* ============ Mobile / tablet sandwich menu ============ */

.mobile-menu {
  position: fixed; inset: 0; top: var(--group-height, var(--header-height));
  z-index: calc(var(--z-header) - 1);
  visibility: hidden;
  transition: visibility 0s linear var(--duration-panel);
}
body.is-menu-open .mobile-menu { visibility: visible; transition-delay: 0s; }

.panel {
  position: absolute; inset: 0;
  background: var(--bg-primary);
  transform: translateX(100%);
  transition: transform var(--duration-panel) var(--ease-panel);
  overflow-y: auto; overscroll-behavior: contain;
}
.panel--menu { z-index: 1; }
.panel--sub { z-index: 2; }
body.is-menu-open .panel--menu { transform: translateX(0); }
body.is-sub-open .panel--sub.is-current { transform: translateX(0); }

.menu { display: flex; flex-direction: column; gap: 32px; padding: 40px var(--page-margin); }

.menu__item {
  display: flex; align-items: center; justify-content: space-between; gap: 40px;
  width: 100%; text-align: start;
  opacity: 0; transform: translateX(32px);
  transition: opacity 350ms ease, transform 450ms var(--ease-panel);
}
body.is-menu-open .menu__item { opacity: 1; transform: translateX(0); }
body.is-menu-open .menu__item:nth-child(1) { transition-delay: 120ms; }
body.is-menu-open .menu__item:nth-child(2) { transition-delay: 180ms; }
body.is-menu-open .menu__item:nth-child(3) { transition-delay: 240ms; }

.menu__label { font-size: 20px; font-weight: 700; line-height: 24px; }
.menu__chevron { flex-shrink: 0; transition: transform 200ms ease; }
.menu__item:active .menu__chevron { transform: translateX(3px); }

.panel__backbar { position: sticky; top: 0; z-index: 2; background: var(--bg-primary); padding: 16px var(--page-margin); }
.back { display: flex; align-items: center; gap: 8px; margin-inline-start: -4px; }
.back__label { font-size: 20px; font-weight: 700; line-height: 24px; }

.sub { display: flex; flex-direction: column; gap: 40px; padding: 24px var(--page-margin) 40px; }
.sub__highlight { display: flex; flex-direction: column; align-items: flex-start; gap: 32px; }
.divider { border: 0; height: 1px; background: var(--line-secondary); }
.link-list { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }

/* ============ Shared page bits ============ */

.credibility { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: center; }
.credibility__item { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; line-height: 20px; font-weight: 500; }
.credibility__item strong { font-weight: 700; }
.credibility__item img { width: 16px; height: 16px; }

.qr-block {
  display: inline-flex; align-items: center;
  border: 2px solid var(--front-primary); border-radius: 16px;
  padding: 8px; text-decoration: none;
}
.qr-block__code { width: 80px; height: 80px; border-radius: 10px; background: #fff; overflow: hidden; display: grid; place-items: center; }
.qr-block__code img { width: 72px; height: 72px; }
.qr-block__label { padding-inline: 16px; font-size: 20px; line-height: 24px; font-weight: 700; }

.hero__cta-mobile { display: none; }

@media (max-width: 767px) {
  .qr-block { display: none; }
  .hero__cta-mobile { display: inline-flex; }
}

/* ============ Hero ============ */

.hero {
  position: relative;
  background: var(--bg-green);
  min-height: 980px;
  overflow: hidden;
  /* slides under the transparent header */
  margin-top: calc(-1 * var(--header-height));
}
.hero__content {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  gap: 0;
  padding: 160px var(--page-margin) 80px;
  max-width: 776px; margin-inline: auto;
  text-align: center;
}
.hero__title {
  font-family: var(--font-display);
  font-size: 60px; line-height: 64px; font-weight: 700;
  margin-bottom: 32px;
}
.credibility { margin-bottom: 24px; }
.hero__sub { font-size: 20px; line-height: 28px; max-width: 572px; margin-bottom: 40px; }

@media (max-width: 767px) {
  .hero { min-height: 720px; }
  .hero__content { padding-top: 96px; }
  .hero__title { font-size: 44px; line-height: 48px; }
}

/* ============ Features ============ */

.feature {
  display: flex; gap: 40px; align-items: center; justify-content: center;
  padding: 80px var(--page-margin);
  background: var(--bg-primary);
}

/* Medium column (572) holding the Small-Width inner wrapper (470) */
.feature__text { display: flex; flex: 0 1 572px; min-width: 0; }
.feature__inner { display: flex; flex-direction: column; align-items: flex-start; width: 100%; max-width: 470px; }

/* Image right (default): Small wrapper sits at the LEFT of its column.
   Image left (flip): Small wrapper sits at the RIGHT of its column. */
.feature__text { justify-content: flex-start; }
.feature--flip .feature__text { justify-content: flex-end; }

.feature__eyebrow { font-size: 16px; line-height: 24px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 24px; }
.feature__title { font-family: var(--font-display); font-size: 44px; line-height: 48px; font-weight: 700; letter-spacing: 0.44px; margin-bottom: 24px; }
.feature__body { font-size: 20px; line-height: 28px; margin-bottom: 40px; }
.feature__list { margin: 0 0 40px 24px; font-size: 20px; line-height: 28px; display: flex; flex-direction: column; gap: 4px; }

.feature__image {
  flex: 0 1 572px; min-width: 0; aspect-ratio: 1;
  border-radius: 48px; overflow: hidden;
  background: var(--card-bg, var(--bg-secondary));
}
.feature__image img { width: 100%; height: 100%; object-fit: cover; }

.feature--flip .feature__text { order: 2; }
.feature--flip .feature__image { order: 1; }

@media (max-width: 1023px) {
  .feature { flex-direction: column; align-items: stretch; padding-block: 60px; }
  .feature__text { flex-basis: auto; width: 100%; order: 1; justify-content: flex-start; }
  .feature__inner { max-width: 100%; }
  .feature__title { font-size: 36px; line-height: 40px; }
  .feature__image { flex-basis: auto; width: 100%; order: 2; border-radius: 32px; }
}

/* ============ CTA screen ============ */

.cta {
  display: flex; flex-direction: column; align-items: center;
  gap: 40px;
  padding: 80px var(--page-margin) 0;
  background: var(--bg-green);
  overflow: hidden;
}
.cta__content { display: flex; flex-direction: column; align-items: center; max-width: 776px; text-align: center; }
.cta__title { font-family: var(--font-display); font-size: 60px; line-height: 64px; font-weight: 700; margin-bottom: 32px; }
.cta__sub { font-size: 20px; line-height: 28px; max-width: 572px; margin-bottom: 40px; }
.cta__hand { width: min(1000px, 100%); }
.cta__hand img { width: 100%; height: auto; }

@media (max-width: 767px) {
  .cta__title { font-size: 44px; line-height: 48px; }
}

/* ============ Footer ============ */

.footer {
  display: flex; flex-direction: column; gap: 80px;
  background: var(--bg-footer);
  color: var(--front-fixed-white);
  padding: 80px var(--page-margin);
}

.footer__wrap { width: 100%; max-width: var(--content-max); margin-inline: auto; display: flex; flex-direction: column; gap: 40px; }

.footer__disclaimer { display: flex; }
.footer__disclaimer p { font-size: 12px; line-height: 18px; font-weight: 500; color: var(--front-fixed-gray); }
.footer__divider { border: 0; height: 1px; background: var(--line-fixed-white); }

.footer__main { display: flex; gap: 40px; align-items: flex-start; }
.footer__tabby { flex: 1 0 0; min-width: 1px; display: flex; flex-direction: column; align-items: flex-start; gap: 32px; }
.footer__social { display: flex; gap: 20px; }
.footer__social img { width: 24px; height: 24px; }
.footer__social a { opacity: 1; transition: opacity 150ms ease; }
.footer__social a:hover { opacity: 0.7; }

.footer__qr {
  display: flex; flex-direction: column; gap: 16px;
  width: 156px;
  border: 2px solid var(--front-fixed-white); border-radius: 16px;
  padding: 8px 8px 16px;
  text-decoration: none;
}
.footer__qr-code { display: block; aspect-ratio: 1; width: 100%; border-radius: 10px; background: #fff; overflow: hidden; display: grid; place-items: center; }
.footer__qr-code img { width: 90%; height: 90%; }
.footer__qr-label { padding-inline: 4px; font-size: 20px; line-height: 24px; font-weight: 700; color: var(--front-fixed-white); }

.footer__address { font-size: 12px; line-height: 18px; font-weight: 500; opacity: 0.7; max-width: 180px; }

.footer__list { flex: 1 0 0; min-width: 1px; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.footer__list-heading { font-size: 14px; line-height: 20px; font-weight: 500; opacity: 0.7; }
.footer__list a { font-size: 20px; line-height: 28px; font-weight: 500; text-decoration: none; transition: opacity 150ms ease; }
.footer__list a:hover { opacity: 0.7; }

/* Full-bleed wordmark: scales with the viewport, kept off the edges only by
   the footer's own side padding (48px at desktop, per tabby.ai) */
.footer__logo { width: 100%; }
.footer__logo img { width: 100%; height: auto; }

@media (min-width: 1024px) {
  .footer__disclaimer { padding-inline-start: calc((100% + 40px) / 4 + 0px); }
}

/* Tablet (768–1023): two columns — Tabby block left, menu lists stacked
   right with dividers between; no disclaimer (per DS Footer/Tablet) */
@media (min-width: 768px) and (max-width: 1023px) {
  .footer__disclaimer, .footer__divider { display: none; }
  .footer__main { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; align-items: start; }
  .footer__tabby { grid-column: 1; grid-row: 1 / span 3; }
  .footer__list { grid-column: 2; width: 100%; }
  .footer__list + .footer__list { border-top: 1px solid var(--line-fixed-white); padding-top: 40px; margin-top: 40px; }
}

/* Mobile (<768): everything stacks */
@media (max-width: 767px) {
  .footer__main { flex-wrap: wrap; }
  .footer__tabby { flex: 1 1 100%; }
  .footer__list { flex: 1 1 100%; }
  .footer__list + .footer__list { border-top: 1px solid var(--line-fixed-white); padding-top: 40px; margin-top: 8px; }
}

/* ============ Reduced motion ============ */

@media (prefers-reduced-motion: reduce) {
  .announcement, .dropdown, .scrim, .panel, .menu__item, .nav-toggle__line, .locale__panel, .locale::before {
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
  }
}
