/* Tuck — Landing Page
   ================================================== */

/* --- Design Tokens --- */
:root {
  /* Colors */
  --color-bg:        #fffdff;
  --color-warm:      #f3f1f0;
  --color-band:      #e1dfd9;
  --color-text:      #000;
  --color-btn:       #292929;
  --color-btn-text:  #fff;
  --color-pill-bg:   rgba(112, 112, 112, 0.2);
  --color-pill-text: #707070;

  /* Browser pill colors */
  --safari-bg:   rgba(161, 228, 255, 0.5);
  --safari-text: #2279b3;
  --chrome-bg:   rgba(26, 115, 232, 0.2);
  --chrome-text: #1a73e8;
  --firefox-bg:  rgba(117, 67, 227, 0.2);
  --firefox-text:#7543e3;
  --edge-bg:     rgba(244, 111, 122, 0.2);
  --edge-text:   #f46f7a;

  /* Typography */
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans:  'Instrument Sans', system-ui, sans-serif;

  /* Layout */
  --w-content: 894px;
  --w-faq:     644px;
  --pad-x:     24px;

  /* Radii (bumped ~28% to compensate for squircle) */
  --r-card: 40px;
  --r-btn:  30px;
  --r-pill: 20px;
  --r-icon: 30px;
}


/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.16px;
}

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

a {
  color: inherit;
}

button {
  font: inherit;
  border: none;
  cursor: pointer;
}


/* --- Skip link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 1000;
  padding: 8px 16px;
  background: var(--color-btn);
  color: var(--color-btn-text);
  border-radius: var(--r-btn);
  font-weight: 600;
  text-decoration: none;
  font-size: 14px;
}

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

/* --- Focus --- */
:focus-visible {
  outline: 2px solid var(--color-btn);
  outline-offset: 2px;
}

.btn:focus-visible {
  outline-color: var(--color-btn);
  outline-offset: 3px;
}


/* --- Utility --- */
.wrap {
  max-width: var(--w-content);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 16px;
  border-radius: var(--r-pill);
  corner-shape: squircle;
  background: var(--color-pill-bg);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: -0.16px;
  color: var(--color-pill-text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 32px;
  border-radius: var(--r-btn);
  corner-shape: squircle;
  background: var(--color-btn);
  color: var(--color-btn-text);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.4;
  letter-spacing: -0.18px;
  text-decoration: none;
  transition: background 0.2s, transform 0.35s cubic-bezier(.34,1.56,.64,1);
}

.btn:hover {
  background: #3a3a3a;
  transform: scale(1.04) rotate(-0.5deg);
}

.btn:active {
  transform: scale(0.97);
  transition-duration: 0.1s;
}

/* --- Scroll reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* --- Icon draw-in --- */
.pillar__icon svg path,
.pillar__icon svg rect {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 0.8s ease 0.3s;
}

.pillar.is-visible .pillar__icon svg path,
.pillar.is-visible .pillar__icon svg rect {
  stroke-dashoffset: 0;
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .pillar__icon svg path,
  .pillar__icon svg rect { stroke-dasharray: none; stroke-dashoffset: 0; transition: none; }
  .btn { transition: background 0.15s; }
  .btn:hover { transform: none; }
  .pricing__card { transition: none; }
  .pricing__card:hover { transform: none; }
  .faq__answer { transition: none; }
  .faq__icon { transition: none; }
}

.section-label {
  text-align: center;
  margin-bottom: 16px;
}


/* --- Hero --- */
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 96px var(--pad-x) 48px;
}

.hero__branches {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero__branch {
  position: absolute;
  top: -28%;
  width: 60%;
  max-width: 900px;
  mix-blend-mode: multiply;
  will-change: transform;
}

.hero__branch--left {
  left: -22%;
  transform:
    translate(calc(var(--branch-x, 0) * -1px), calc(var(--branch-y, 0) * -1px))
    rotate(calc(60deg - var(--branch-r, 0deg)));
}

.hero__branch--right {
  right: -22%;
  transform:
    translate(calc(var(--branch-x, 0) * 1px), calc(var(--branch-y, 0) * -1px))
    rotate(calc(120deg + var(--branch-r, 0deg)))
    scaleY(-1);
}

.hero__icon {
  position: relative;
  width: 340px;
  max-width: 60%;
  aspect-ratio: 4 / 3;
  margin: 0 auto 24px;
  mix-blend-mode: multiply;
}

.hero__icon::after {
  content: '';
  position: absolute;
  inset: -5%;
  border-radius: 50%;
  background: radial-gradient(circle, transparent 75%, var(--color-bg) 95%);
  pointer-events: none;
}

.hero__icon img,
.hero__icon video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero__platforms {
  opacity: 0.5;
  font-size: 16px;
  letter-spacing: -0.32px;
  margin-bottom: 10px;
}

.hero__pills {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.hero__pills .pill {
  gap: 6px;
  font-weight: 500;
}

.pill__icon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  flex-shrink: 0;
}

.hero__headline {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 76px;
  line-height: 1;
  letter-spacing: -1.52px;
  max-width: 894px;
  margin: 0 auto 28px;
}

.hero__body {
  font-size: 21px;
  line-height: 1.5;
  letter-spacing: -0.21px;
  max-width: 680px;
  margin: 0 auto 40px;
}

.hero__body strong {
  font-weight: 600;
}

.hero__body p + p {
  margin-top: 1em;
}


/* --- Pricing --- */
.pricing {
  position: relative;
  padding: 80px 0 60px;
}

.pricing__band {
  position: absolute;
  inset: 0;
  background: var(--color-band);
  opacity: 0.4;
  z-index: 0;
}

.pricing .wrap {
  position: relative;
  z-index: 1;
}

.pricing__label {
  text-align: center;
  margin-bottom: 16px;
}

.pricing__heading {
  text-align: center;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.4;
  letter-spacing: -0.28px;
  margin-bottom: 40px;
}

.pricing__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  margin-bottom: 40px;
}

.pricing__card {
  background: var(--color-bg);
  border-radius: var(--r-card);
  corner-shape: squircle;
  padding: 40px 24px 32px;
  text-align: center;
  transition: transform 0.35s cubic-bezier(.34,1.56,.64,1), box-shadow 0.35s ease;
}

.pricing__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,.08);
}

.pricing__icons {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin-bottom: 16px;
  min-height: 48px;
}

.pricing__icons img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  corner-shape: squircle;
}

.pricing__price {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 60px;
  line-height: 1.4;
  letter-spacing: -0.6px;
  margin-bottom: 8px;
}

.pricing__desc {
  opacity: 0.6;
  font-size: 16px;
  margin-bottom: 20px;
}

.pricing__card .btn {
  width: 80%;
  max-width: 353px;
  height: 62px;
  padding-top: 0;
  padding-bottom: 0;
}

.pricing__footnote {
  text-align: center;
  opacity: 0.6;
  font-size: 16px;
  max-width: 894px;
  margin: 0 auto;
}

.pricing__downloads {
  text-align: center;
  font-size: 15px;
  margin: 12px auto 0;
  opacity: 0.5;
}

.pricing__downloads a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pricing__downloads a:hover {
  opacity: 1;
}

.pricing__downloads-sep {
  margin: 0 8px;
}


/* --- About --- */
.about {
  padding: 80px var(--pad-x) 40px;
  text-align: center;
}

.about__heading {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.4;
  letter-spacing: -0.28px;
}

.about__heading span {
  font-weight: 400;
}


/* --- Features --- */
.feature {
  max-width: var(--w-content);
  margin: 0 auto;
  padding: 40px var(--pad-x);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  align-items: start;
}

.feature__media {
  background: var(--color-warm);
  border-radius: var(--r-card);
  corner-shape: squircle;
  aspect-ratio: 1 / 1;
  position: relative;
  padding: 10px;
}

.feature__media-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.3;
  font-size: 16px;
  text-align: center;
  white-space: pre-line;
}

.feature__gif {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--r-card) - 10px);
  corner-shape: squircle;
  display: block;
}

.feature__text {
  padding-top: 48px;
}

.feature__heading {
  font-weight: 700;
  font-size: 28px;
  line-height: 1.4;
  letter-spacing: -0.28px;
  margin-bottom: 16px;
}

.feature__body {
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: -0.18px;
  opacity: 0.7;
}

.feature__body p + p {
  margin-top: 1em;
}

/* Reverse layout for auto-close */
.feature--reverse .feature__media {
  order: 2;
}

.feature--reverse .feature__text {
  order: 1;
}


/* --- Pillars --- */
.pillars {
  max-width: var(--w-content);
  margin: 0 auto;
  padding: 60px var(--pad-x) 80px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.pillars__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 84px;
}

.pillar__icon {
  width: 64px;
  height: 64px;
  background: var(--color-warm);
  border-radius: var(--r-icon);
  corner-shape: squircle;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pillar__icon svg {
  width: 28px;
  height: 28px;
  color: var(--color-pill-text);
}

.pillar__heading {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.16px;
  margin-bottom: 10px;
}

.pillar__body {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.16px;
  opacity: 0.7;
}


/* --- FAQ --- */
.faq {
  padding: 80px var(--pad-x);
  text-align: center;
}

.faq__heading {
  font-weight: 700;
  font-size: 28px;
  line-height: 1.4;
  letter-spacing: -0.28px;
  margin-bottom: 32px;
}

.faq__list {
  max-width: var(--w-faq);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.faq__item {
  background: var(--color-warm);
  border-radius: var(--r-btn);
  corner-shape: squircle;
  overflow: hidden;
}

.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  height: 64px;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.4;
  letter-spacing: -0.18px;
  cursor: pointer;
  list-style: none;
}

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

.faq__item summary::marker {
  display: none;
  content: '';
}

.faq__icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  opacity: 0.5;
  position: relative;
  transition: transform 0.2s ease;
}

/* Plus icon via CSS */
.faq__icon::before,
.faq__icon::after {
  content: '';
  position: absolute;
  background: var(--color-text);
  border-radius: 1px;
}

/* Vertical bar */
.faq__icon::before {
  width: 1.5px;
  height: 52%;
  top: 24%;
  left: 50%;
  transform: translateX(-50%);
  transition: transform 0.2s ease;
}

/* Horizontal bar */
.faq__icon::after {
  width: 52%;
  height: 1.5px;
  top: 50%;
  left: 24%;
  transform: translateY(-50%);
}

.faq__item[open] .faq__icon {
  transform: rotate(45deg);
}

.faq__item[open] .faq__icon::before {
  transform: translateX(-50%) rotate(90deg);
}

.faq__answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}

.faq__item[open] .faq__answer {
  grid-template-rows: 1fr;
  opacity: 1;
}

.faq__answer-inner {
  overflow: hidden;
  padding: 0 36px;
  font-size: 16px;
  line-height: 1.6;
  opacity: 0.7;
}

.faq__item[open] .faq__answer-inner {
  padding-bottom: 24px;
}

.faq__answer-inner p + p {
  margin-top: 0.75em;
}


/* --- Bottom CTA --- */
.cta {
  position: relative;
  padding: 100px var(--pad-x) 80px;
  text-align: center;
}

.cta__band {
  position: absolute;
  inset: 0;
  background: var(--color-warm);
  opacity: 0.4;
  z-index: 0;
}

.cta .wrap {
  position: relative;
  z-index: 1;
}

.cta__heading {
  font-weight: 700;
  font-size: 28px;
  line-height: 1.4;
  letter-spacing: -0.28px;
  margin-bottom: 40px;
}

.cta__heading span {
  font-weight: 400;
}

.cta__buttons {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.cta__buttons .btn {
  width: 353px;
  height: 62px;
  padding-top: 0;
  padding-bottom: 0;
}

.cta__footnote {
  opacity: 0.6;
  font-size: 16px;
  max-width: 840px;
  margin: 0 auto;
}


/* --- Footer --- */
.footer {
  background: var(--color-warm);
  padding: 32px var(--pad-x) 32px;
}

.footer .wrap {
  max-width: var(--w-content);
}

.footer__top {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 80px;
  padding-bottom: 40px;
}

.footer__brand-icon {
  width: 72px;
  height: 72px;
  margin-bottom: 8px;
}

.footer__brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,.15), 0 0 0 1px rgba(0,0,0,.06);
}

.footer__brand-name {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 36px;
  line-height: 1.4;
  letter-spacing: -0.36px;
  margin-bottom: 8px;
}

.footer__brand-desc {
  font-size: 16px;
  line-height: 1.5;
  opacity: 0.6;
  max-width: 260px;
}

.footer__brand-desc a {
  text-decoration: underline;
}

.footer__col-header {
  margin-bottom: 16px;
}

.footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer__links a {
  font-size: 16px;
  opacity: 0.7;
  text-decoration: none;
  transition: opacity 0.15s;
}

.footer__links a:hover {
  opacity: 1;
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 16px;
  opacity: 0.4;
}

.footer__legal {
  display: flex;
  gap: 32px;
}

.footer__legal a {
  text-decoration: none;
}

.footer__legal a:hover {
  text-decoration: underline;
}


/* --- Legal Pages (Privacy, Terms) --- */
.legal-header {
  padding: 32px 0;
}

.legal-home {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.legal-home__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.15), 0 0 0 1px rgba(0,0,0,.06);
}

.legal-home__name {
  font-family: var(--font-serif);
  font-size: 28px;
  letter-spacing: -0.28px;
}

.legal {
  padding: 0 var(--pad-x) 80px;
}

.legal .wrap {
  max-width: var(--w-content);
}

.legal + .footer .footer__bottom {
  border-top: none;
  padding-top: 0;
}

.legal__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 48px;
  line-height: 1.1;
  letter-spacing: -0.96px;
  margin-bottom: 8px;
}

.legal__updated {
  opacity: 0.5;
  margin-bottom: 40px;
}

.legal h2 {
  font-weight: 700;
  font-size: 20px;
  line-height: 1.4;
  letter-spacing: -0.2px;
  margin-top: 40px;
  margin-bottom: 12px;
}

.legal h3 {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.5;
  margin-top: 24px;
  margin-bottom: 8px;
}

.legal p {
  margin-bottom: 12px;
  line-height: 1.7;
}

.legal ul {
  margin-bottom: 12px;
  padding-left: 24px;
}

.legal li {
  margin-bottom: 6px;
  line-height: 1.7;
}

.legal code {
  background: var(--color-warm);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 0.9em;
}

.legal a {
  text-decoration: underline;
}

.legal__company {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  opacity: 0.6;
  font-size: 14px;
  line-height: 1.6;
}


/* --- Changelog --- */
.changelog {
  padding: 0 var(--pad-x) 80px;
}

.changelog .wrap {
  max-width: var(--w-content);
}

.changelog + .footer .footer__bottom {
  border-top: none;
  padding-top: 0;
}

.changelog__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 48px;
  line-height: 1.1;
  letter-spacing: -0.96px;
  margin-bottom: 8px;
}

.changelog__intro {
  opacity: 0.5;
  margin-bottom: 56px;
}

.changelog__entry {
  position: relative;
  padding-left: 32px;
  border-left: 2px solid rgba(0, 0, 0, 0.1);
  padding-bottom: 48px;
}

.changelog__entry:last-child {
  padding-bottom: 0;
}

.changelog__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.changelog__date {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.14px;
  opacity: 0.5;
  text-transform: uppercase;
}

.changelog__version {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--r-pill);
  corner-shape: squircle;
  background: var(--color-pill-bg);
  font-weight: 600;
  font-size: 13px;
  color: var(--color-pill-text);
}

.changelog__heading {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -0.64px;
  margin-bottom: 8px;
}

.changelog__summary {
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: -0.18px;
  opacity: 0.7;
  margin-bottom: 32px;
}

.changelog__entry h3 {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.16px;
  margin-top: 28px;
  margin-bottom: 10px;
}

.changelog__entry ul {
  padding-left: 20px;
  margin-bottom: 0;
}

.changelog__entry li {
  font-size: 16px;
  line-height: 1.7;
  opacity: 0.7;
  margin-bottom: 4px;
}

.changelog__entry li + li {
  margin-top: 0;
}


/* --- Mobile --- */
@media (max-width: 768px) {

  .hero {
    padding: 60px var(--pad-x) 40px;
  }

  .hero__branch {
    display: none;
  }

  .hero__icon {
    width: 180px;
  }

  .hero__headline {
    font-size: 44px;
    letter-spacing: -0.88px;
  }

  .hero__body {
    font-size: 18px;
  }

  .hero__pills .pill {
    font-size: 14px;
    padding: 4px 12px;
  }

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

  .pricing__price {
    font-size: 48px;
  }

  .feature {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .feature--reverse .feature__media {
    order: 0;
  }

  .feature--reverse .feature__text {
    order: 0;
  }

  .feature__text {
    padding-top: 0;
  }

  .pillars__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .faq__item summary {
    padding: 0 20px;
    font-size: 16px;
    height: 56px;
  }

  .faq__answer-inner {
    padding: 0 20px 20px;
    font-size: 15px;
  }

  .cta__heading {
    font-size: 24px;
  }

  .cta__buttons .btn {
    min-width: 0;
    width: 100%;
  }

  .footer__top {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}
