/* Shared chrome for cupie.app: font, colour tokens, nav, footer, legal pages.
   The home page adds its own hero styles inline in index.html.

   Every spacing is a multiple of 4 (mostly 8, 16, 24, 32, 48, 64) and every
   font size comes from one scale: 16, 20, 24, 32, 48, 64. The big display
   words (intro, footer) are the only fluid sizes. */

@font-face {
  font-family: 'Google Sans Flex Rounded';
  src: url(/assets/fonts/google-sans-flex-rond.woff2) format('woff2');
  font-weight: 400 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #FBF7FF;
  --ink: 38 8 64;                 /* #260840, the deep purple the copy is set in */
  --accent: 167 60 255;           /* #A73CFF, Cupie purple */
  --card: #F3E9FC;
  --ramp: linear-gradient(180deg, #CB8CFF 0%, #A73CFF 36.22%, #7923C0 100%);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --nav-h: 80px;
  --gutter: 64px;      /* cards and hero: the widest band */
  --nav-pad: 120px;    /* nav content: 1400 wide, 120 in */
  --footer-pad: 120px; /* footer: a 1080 column, 120 in */
  color-scheme: light;
}
@media (max-width: 1279px) {
  :root { --nav-pad: 48px; --footer-pad: 48px; }
}
@media (max-width: 899px) {
  :root { --gutter: 24px; --nav-pad: 24px; --footer-pad: 24px; }
}

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

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

body {
  background: var(--bg);
  color: rgb(var(--ink));
  font-family: 'Google Sans Flex Rounded', ui-rounded, 'SF Pro Rounded', system-ui, -apple-system, sans-serif;
  font-variation-settings: 'ROND' 100;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-x: clip;
  min-height: 100svh;
}

a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }

:focus-visible { outline: 3px solid rgb(var(--accent) / .55); outline-offset: 4px; border-radius: 12px; }

/* The soft purple glow every page starts under. */
.page-glow {
  pointer-events: none;
  position: absolute;
  inset: 0 0 auto 0;
  height: 56svh;
  background:
    radial-gradient(60% 90% at 50% 0%, rgb(203 140 255 / .30), transparent 70%),
    linear-gradient(180deg, rgb(203 140 255 / .26), rgb(203 140 255 / 0));
  z-index: 0;
}

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

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--nav-h);
  transition: background-color .35s ease, box-shadow .35s ease;
}
.nav.is-scrolled {
  background: rgb(251 247 255 / .8);
  -webkit-backdrop-filter: saturate(1.4) blur(20px);
  backdrop-filter: saturate(1.4) blur(20px);
  box-shadow: 0 1px 0 rgb(var(--ink) / .06);
}
.nav-inner {
  position: relative;
  height: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--nav-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Icon and wordmark: a 32px tile, an 8px gap, 24px type. Same everywhere. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 24px;
  line-height: 32px;
  font-weight: 900;
  letter-spacing: -.02em;
  color: rgb(var(--ink));
  transition: transform .4s var(--ease-out);
}
.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgb(121 35 192 / .24);
}
.brand:hover { transform: scale(1.04) rotate(-2deg); }
.brand:active { transform: scale(.96); }

.nav-links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
}
/* Each link is a 40px pill; one highlight slides under whichever is hovered. */
.nav-links a {
  position: relative;
  z-index: 1;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
  color: rgb(var(--ink) / .5);
  transition: color .2s ease;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: rgb(var(--ink) / .9); }
.nav-hover {
  position: absolute;
  left: 0;
  top: 0;
  height: 40px;
  width: 0;
  border-radius: 20px;
  background: rgb(var(--ink) / .06);
  opacity: 0;
  pointer-events: none;
  transition: transform .35s var(--ease-out), width .35s var(--ease-out), opacity .2s ease;
}

.pill {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border-radius: 20px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 750;
  background: rgb(var(--ink) / .07);
  color: rgb(var(--ink));
  transition: transform .35s var(--ease-out), background-color .2s ease;
}
.pill:hover { transform: scale(1.04); background: rgb(var(--ink) / .1); }
.pill:active { transform: scale(.94); }

/* 48px hit area; the two 24px bars sit 12px in, so they line up with the gutter. */
.nav-burger {
  display: none;
  width: 48px;
  height: 48px;
  margin-right: -12px;
  position: relative;
}
.nav-burger span {
  position: absolute;
  left: 12px;
  width: 24px;
  height: 4px;
  border-radius: 2px;
  background: rgb(var(--ink));
  transition: transform .45s var(--ease-out), top .45s var(--ease-out);
}
.nav-burger span:nth-child(1) { top: 16px; }
.nav-burger span:nth-child(2) { top: 28px; }
.nav.is-open .nav-burger span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.nav.is-open .nav-burger span:nth-child(2) { top: 22px; transform: rotate(-45deg); }

.nav-sheet { display: none; }

@media (max-width: 899px) {
  .nav-links, .nav .pill { display: none; }
  .nav-burger { display: block; }
  .nav.is-open { background: var(--bg); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .nav-sheet {
    display: block;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    height: calc(100dvh - var(--nav-h));
    pointer-events: none;
  }
  .nav-sheet::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgb(38 8 64 / .24);
    opacity: 0;
    transition: opacity .35s ease;
  }
  .nav-sheet-panel {
    position: relative;
    padding: 0 var(--gutter) 24px;
    background: var(--bg);
    border-radius: 0 0 32px 32px;
    box-shadow: 0 24px 40px -20px rgb(38 8 64 / .35);
    transform: translateY(-16px);
    opacity: 0;
    transition: transform .5s var(--ease-out), opacity .25s ease;
  }
  .nav.is-open .nav-sheet { pointer-events: auto; }
  .nav.is-open .nav-sheet::before { opacity: 1; }
  .nav.is-open .nav-sheet-panel { transform: none; opacity: 1; }
  .nav-sheet a {
    display: block;
    padding: 8px 0;
    font-size: 32px;
    line-height: 40px;
    font-weight: 900;
    letter-spacing: -.015em;
    color: rgb(var(--ink) / .88);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .3s ease, transform .5s var(--ease-out), color .2s ease;
  }
  .nav.is-open .nav-sheet a { opacity: 1; transform: none; }
  .nav.is-open .nav-sheet a:nth-child(2) { transition-delay: .04s; }
  .nav.is-open .nav-sheet a:nth-child(3) { transition-delay: .08s; }
  .nav-sheet a:active, .nav-sheet a[aria-current="page"] { color: rgb(var(--accent)); }
}

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

.footer {
  position: relative;
  margin-top: 64px;
  padding: 40px var(--footer-pad);
}
.footer-wrap {
  max-width: 1080px;
  margin: 0 auto;
  container-type: inline-size;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}
.footer-cols {
  display: flex;
  flex-wrap: wrap;
  column-gap: 12px;
  row-gap: 32px;
}
.footer-col {
  width: 200px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.footer-col h2 {
  font-size: 16px;
  line-height: 24px;
  font-weight: 800;
  color: rgb(var(--ink) / .8);
}
.footer-col a {
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  color: rgb(var(--ink) / .4);
  transition: color .2s ease;
}
.footer-col a:hover { color: rgb(var(--ink)); }

/* The phrase the page ends on, sized to fill the footer column exactly
   (it measures 11.84em wide at this weight), faint like a watermark. */
.footer-words {
  margin-top: 48px;
  text-align: center;
  white-space: nowrap;
  font-size: 8.4cqw;
  line-height: 1;
  font-weight: 1000;
  letter-spacing: -.02em;
  text-transform: uppercase;
  user-select: none;
  -webkit-user-select: none;
}
.footer-words span {
  display: inline-block;
  background: linear-gradient(180deg, rgb(var(--ink) / .08), rgb(var(--ink) / .02));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: transform .7s cubic-bezier(.34, 1.56, .64, 1);
}
.footer-words span:hover { transform: translateY(-.12em) rotate(-5deg); }

@media (max-width: 899px) {
  .footer-top { flex-direction: column; }
  .footer-cols { flex-direction: column; }
}

/* ---------- Contact pages (Help, Feedback, Partnerships, Careers) ---------- */

.contact {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 64px) var(--gutter) 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: legal-in .8s var(--ease-out) both;
}
.contact-sticker {
  width: 160px;
  height: 160px;
  filter: drop-shadow(0 8px 12px rgb(var(--ink) / .08)) drop-shadow(0 32px 24px rgb(var(--ink) / .05));
  animation: sticker-pop .9s var(--ease-out) .1s both;
  transform-origin: 50% 80%;
}
.contact h1 {
  margin: 32px 0 16px;
  font-size: 48px;
  line-height: 56px;
  font-weight: 950;
  letter-spacing: -.025em;
}
.contact .lede {
  max-width: 480px;
  font-size: 20px;
  line-height: 28px;
  font-weight: 650;
  color: rgb(var(--ink) / .55);
  text-wrap: balance;
}
.contact-card {
  width: 100%;
  max-width: 480px;
  margin-top: 48px;
  padding: 32px;
  border-radius: 40px;
  background: rgb(var(--accent) / .075);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.contact-person {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform .45s cubic-bezier(.34, 1.56, .64, 1);
}
.contact-person:hover { transform: scale(1.03); }
.contact-avatar {
  width: 80px;
  height: 80px;
  border-radius: 40px;
  object-fit: cover;
  box-shadow: 0 0 0 4px #fff, 0 8px 24px rgb(121 35 192 / .24);
  margin-bottom: 16px;
}
.contact-name {
  font-size: 24px;
  line-height: 32px;
  font-weight: 900;
  letter-spacing: -.01em;
  color: rgb(var(--ink));
}
.contact-handle {
  font-size: 16px;
  line-height: 24px;
  font-weight: 650;
  color: rgb(var(--ink) / .5);
}
.contact-actions {
  display: flex;
  gap: 16px;
  width: 100%;
}
.btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 56px;
  padding: 0 24px;
  border-radius: 28px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 800;
  transition: transform .45s cubic-bezier(.34, 1.56, .64, 1), background-color .2s ease;
}
.btn svg { width: 24px; height: 24px; flex: none; }
.btn:hover { transform: scale(1.03); }
.btn:active { transform: scale(.95); }
.btn-primary {
  background: var(--ramp);
  color: #fff;
  box-shadow: 0 8px 24px rgb(121 35 192 / .32);
}
.btn-secondary {
  background: #fff;
  color: rgb(var(--ink));
  box-shadow: 0 4px 12px rgb(121 35 192 / .1);
}

@media (max-width: 899px) {
  .contact { padding-top: calc(var(--nav-h) + 32px); }
  .contact-sticker { width: 128px; height: 128px; }
  .contact h1 { margin-top: 24px; font-size: 32px; line-height: 40px; }
  .contact .lede { font-size: 16px; line-height: 24px; }
  .contact-card { margin-top: 32px; padding: 24px; border-radius: 32px; }
  .contact-actions { flex-direction: column; }
  .btn { flex: none; width: 100%; }
}

/* ---------- Legal pages (Privacy, Terms, Support) ---------- */

.legal {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 48px) 32px 32px;
  animation: legal-in .8s var(--ease-out) both;
}
@keyframes legal-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
.legal-sticker {
  width: 112px;
  height: auto;
  margin: 0 0 16px -8px;
  filter: drop-shadow(0 8px 12px rgb(var(--ink) / .08)) drop-shadow(0 32px 24px rgb(var(--ink) / .05));
  animation: sticker-pop .9s var(--ease-out) .1s both;
  transform-origin: 50% 80%;
}
@keyframes sticker-pop {
  0% { opacity: 0; transform: scale(.3) rotate(-18deg); }
  60% { opacity: 1; transform: scale(1.08) rotate(4deg); }
  100% { opacity: 1; transform: scale(1) rotate(-4deg); }
}
.legal h1 {
  font-size: 48px;
  line-height: 56px;
  font-weight: 950;
  letter-spacing: -.025em;
  margin: 0 0 16px;
  color: rgb(var(--ink));
}
.legal .meta {
  display: inline-block;
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
  color: #7923C0;
  background: rgb(var(--accent) / .1);
  border-radius: 16px;
  padding: 4px 16px;
  margin-bottom: 32px;
}
.legal h2 {
  font-size: 24px;
  line-height: 32px;
  font-weight: 850;
  letter-spacing: -.01em;
  margin: 48px 0 16px;
  color: rgb(var(--ink));
}
.legal h3 {
  font-size: 16px;
  line-height: 24px;
  font-weight: 850;
  margin: 32px 0 8px;
  color: rgb(var(--ink) / .9);
}
.legal p, .legal li {
  font-size: 16px;
  line-height: 28px;
  font-weight: 480;
  color: rgb(var(--ink) / .72);
}
.legal p + p { margin-top: 16px; }
.legal ul { padding-left: 24px; margin: 16px 0; }
.legal li + li { margin-top: 8px; }
.legal li::marker { color: rgb(var(--accent)); }
.legal strong { color: rgb(var(--ink) / .92); font-weight: 750; }
.legal a {
  color: #8A2BDB;
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: rgb(var(--accent) / .35);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
  transition: text-decoration-color .2s ease, color .2s ease;
}
.legal a:hover { color: #7923C0; text-decoration-color: rgb(var(--accent)); }
.legal .callout {
  background: var(--card);
  border-radius: 32px;
  padding: 24px;
  margin: 32px 0;
  box-shadow: inset 0 0 0 1px rgb(var(--accent) / .1);
}
.legal .callout p { margin: 0; color: rgb(var(--ink) / .78); }
.legal .callout p + p { margin-top: 8px; }

@media (max-width: 899px) {
  .legal { padding: calc(var(--nav-h) + 24px) var(--gutter) 16px; }
  .legal-sticker { width: 96px; }
  .legal h1 { font-size: 32px; line-height: 40px; }
  .legal .meta { display: block; background: none; padding: 0; border-radius: 0; margin-bottom: 24px; }
  .legal h2 { font-size: 20px; line-height: 28px; margin-top: 40px; }
  .legal .callout { padding: 24px 20px; border-radius: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
