/* Patois Pal landing page */

:root {
  --night: #170f29;
  --plum: #2b1c42;
  --cream: #fff6e4;
  --sun: #ffcf40;
  --mango: #ff9838;
  --coral: #ff6647;
  --hibiscus: #ff4f8b;
  --lagoon: #17c3b2;
  --ocean: #1f78ba;
  --leaf: #1f8057;
  --mint: #34c759;

  --gutter: clamp(12px, 1.4vw, 20px);
  --panel-pad: clamp(24px, 4.6vw, 72px);
  --radius: clamp(28px, 3.4vw, 48px);
  --display: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  --text: -apple-system, BlinkMacSystemFont, "Segoe UI", "Nunito", system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--night);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }

.page {
  max-width: 1500px;
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-block: var(--gutter);
  display: grid;
  gap: var(--gutter);
}

.panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  padding: var(--panel-pad);
}

/* Nav */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 4px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
}

.brand img { width: 46px; height: 46px; border-radius: 22.5%; }

.nav-links { display: flex; gap: 8px; }

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 2px solid var(--night);
  border-radius: 999px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.pill:hover { transform: translateY(-2px); }
.pill--dark { background: var(--night); color: var(--cream); }
.pill--dark:hover { background: var(--plum); border-color: var(--plum); }
.pill--line:hover { background: var(--night); color: var(--cream); }
.pill--light { border-color: var(--cream); color: var(--cream); }
.pill--light:hover { background: var(--cream); color: var(--night); }

/* Hero copy */

.hero {
  background: var(--sun);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  min-height: min(860px, calc(100svh - 96px));
  padding-bottom: clamp(120px, 14vw, 190px);
}

.hero-copy { position: relative; z-index: 2; }

.title {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(4.2rem, 10.5vw, 10.5rem);
  line-height: 0.86;
  letter-spacing: -0.04em;
  margin-bottom: 0.3em;
}

.lede {
  max-width: 24ch;
  margin-bottom: 36px;
  font-size: clamp(1.2rem, 1.9vw, 1.7rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 60px;
  padding: 0 22px 0 17px;
  border: 1.5px solid #a6a6a6;
  border-radius: 13px;
  background: #000;
  color: #fff;
  text-decoration: none;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  transition: transform 0.2s ease;
}

.badge:hover { transform: translateY(-2px); }
.badge-logo { width: 28px; height: 28px; margin-top: -3px; fill: currentColor; }

.badge-text {
  display: flex;
  flex-direction: column;
  font-size: 1.72rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
}

.badge-text small {
  margin-bottom: 1px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.05rem;
}

.meta span + span::before { content: "·"; margin-right: 10px; }

/* Hero art: sun, sea, devices */

.hero-art {
  position: relative;
  z-index: 1;
  align-self: stretch;
  min-height: 560px;
}

.sun {
  position: absolute;
  top: -6%;
  right: -12%;
  width: min(72%, 420px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--mango);
}

.sea {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 3;
  width: 100%;
  height: clamp(110px, 12vw, 172px);
  pointer-events: none;
}

.wave { animation: drift 18s linear infinite; }
.wave--front { animation-duration: 12s; animation-direction: reverse; }

@keyframes drift { to { transform: translateX(-720px); } }
@keyframes bob { 50% { translate: 0 -12px; } }

.phone,
.tablet {
  position: absolute;
  background: var(--night);
  container-type: inline-size;
  box-shadow: 0 28px 48px -28px rgba(23, 15, 41, 0.55);
}

.screen {
  position: absolute;
  overflow: hidden;
}

.tablet {
  left: 0;
  top: 5%;
  width: min(64%, 410px);
  aspect-ratio: 3 / 4;
  border-radius: 7.3% / 5.5%;
  transform: rotate(-8deg);
  animation: bob 7s ease-in-out infinite;
}

.tablet .screen {
  inset: 2.7% 3.7%;
  border-radius: 4.7% / 3.5%;
}

.phone {
  right: 5%;
  bottom: -3%;
  z-index: 2;
  width: min(46%, 292px);
  aspect-ratio: 9 / 19.5;
  border-radius: 17% / 7.9%;
  transform: rotate(5deg);
  animation: bob 6s ease-in-out infinite 0.8s;
}

.phone::after {
  content: "";
  position: absolute;
  top: 2.7%;
  left: 50%;
  z-index: 2;
  width: 30%;
  height: 4.1%;
  border-radius: 999px;
  background: var(--night);
  transform: translateX(-50%);
}

.phone .screen {
  inset: 1.6% 3.6%;
  border-radius: 15% / 6.6%;
}

/* Placeholder screens (swap for real app screenshots later) */

.screen--phrase {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 11cqw;
  background: var(--lagoon);
  color: var(--night);
  transition: background-color 0.8s ease, color 0.8s ease;
}

.screen-kicker {
  font-family: var(--display);
  font-weight: 800;
  font-size: 5.8cqw;
  opacity: 0.8;
}

.screen-word {
  min-height: 1.9em;
  margin: 3cqw 0 5cqw;
  display: flex;
  align-items: flex-end;
  font-family: var(--display);
  font-weight: 900;
  font-size: 15.5cqw;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.screen-mean { font-weight: 700; font-size: 6.4cqw; line-height: 1.25; }
.screen-note { margin-top: 4cqw; font-size: 5.6cqw; line-height: 1.35; opacity: 0.85; }

.caret {
  display: inline-block;
  width: 0.08em;
  height: 0.8em;
  margin-left: 0.06em;
  margin-bottom: 0.1em;
  background: currentColor;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.screen--tablet {
  display: flex;
  flex-direction: column;
  gap: 6cqw;
  padding: 10cqw 8cqw 8cqw;
  background: var(--plum);
  color: var(--cream);
}

.tab-title {
  font-family: var(--display);
  font-weight: 900;
  font-size: 10cqw;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.tiles {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.4cqw;
}

.tiles span {
  display: flex;
  align-items: flex-end;
  padding: 4.4cqw;
  border-radius: 6cqw;
  background: var(--c);
  color: var(--night);
  font-family: var(--display);
  font-weight: 800;
  font-size: 5cqw;
  line-height: 1.05;
}

/* Sections */

:root { --ocean-deep: #1a6aa6; }

.main { display: grid; gap: var(--gutter); }

.h2 {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2.8rem, 6.4vw, 5.6rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
}

/* Phrase deck */

.deck-panel {
  background: var(--night);
  color: var(--cream);
  padding-inline: 0;
}

.deck-panel .h2 {
  padding-inline: var(--panel-pad);
  margin-bottom: clamp(24px, 3.4vw, 44px);
}

.deck {
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  outline-offset: -4px;
}

.deck.is-dragging { cursor: grabbing; }

.deck-track {
  display: flex;
  gap: 14px;
  width: max-content;
  margin: 0;
  padding: 0 0 0 var(--panel-pad);
  list-style: none;
  will-change: transform;
}

.card {
  flex: none;
  display: flex;
  flex-direction: column;
  width: clamp(250px, 23vw, 320px);
  min-height: clamp(260px, 22vw, 300px);
  padding: 26px;
  border-radius: 28px;
  background: var(--bg);
  color: var(--night);
}

.card--dark { color: var(--cream); }

.card h3 {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2.1rem, 2.8vw, 2.7rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.card-mean {
  margin-top: 12px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1.2;
}

.card-note {
  margin-top: auto;
  padding-top: 18px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

/* Feature tiles */

.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter);
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 440px;
}

.tile > :last-child { margin-top: auto; }

.tile--learn { grid-column: span 7; background: var(--mint); }
.tile--play { grid-column: span 5; background: var(--coral); }
.tile--translate { grid-column: span 4; background: var(--ocean-deep); color: var(--cream); }
.tile--explore { grid-column: span 4; background: var(--hibiscus); }
.tile--track { grid-column: span 4; background: var(--lagoon); }

.tile-title {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2.8rem, 4.6vw, 4.6rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.tile-copy {
  max-width: 36ch;
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.4;
}

.chips,
.modes {
  margin: 0;
  padding: 0;
  list-style: none;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chips li {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--night);
  font-family: var(--display);
  font-weight: 800;
  font-size: 1rem;
}

.ranks li:last-child { background: var(--night); color: var(--sun); }

.modes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.modes li {
  aspect-ratio: 1;
  display: flex;
  align-items: flex-end;
  padding: 14px;
  border-radius: 22px;
  background: var(--c);
  color: var(--night);
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(1rem, 1.35vw, 1.25rem);
  line-height: 1.05;
}

.dominoes { display: flex; align-items: flex-end; gap: 22px; padding: 8px 0 4px 6px; }

.domino {
  display: grid;
  grid-template-rows: 1fr 1fr;
  width: 84px;
  height: 168px;
  padding: 6px 10px;
  border-radius: 16px;
  background: var(--cream);
  transform: rotate(-9deg);
}

.domino + .domino { transform: rotate(11deg) translateY(-12px); }

.half {
  display: grid;
  grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  place-items: center;
}

.half + .half { border-top: 3px solid rgba(23, 15, 41, 0.2); }
.half b { width: 13px; height: 13px; border-radius: 50%; background: var(--night); }
.half[data-n="2"] b:first-child { grid-area: 1 / 3; }
.half[data-n="2"] b:last-child { grid-area: 3 / 1; }
.half[data-n="6"] b:nth-child(3n + 1) { grid-row: 1; }
.half[data-n="6"] b:nth-child(3n + 2) { grid-row: 2; }
.half[data-n="6"] b:nth-child(3n) { grid-row: 3; }
.half[data-n="6"] b:nth-child(-n + 3) { grid-column: 1; }
.half[data-n="6"] b:nth-child(n + 4) { grid-column: 3; }

.chat { display: grid; gap: 10px; }

.bubble {
  justify-self: start;
  max-width: 88%;
  padding: 12px 18px;
  border-radius: 22px 22px 22px 6px;
  background: rgba(255, 246, 228, 0.16);
  font-size: 1.1rem;
  font-weight: 600;
}

.bubble--reply {
  justify-self: end;
  border-radius: 22px 22px 6px 22px;
  background: var(--sun);
  color: var(--night);
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.55rem;
}

/* Closing call to action */

.cta {
  background: var(--mango);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 80px);
}

.cta-icon {
  width: clamp(130px, 17vw, 230px);
  height: auto;
  border-radius: 22.5%;
  box-shadow: 0 24px 40px -26px rgba(23, 15, 41, 0.55);
}

.cta .h2 { margin-bottom: 16px; }

.cta-copy {
  max-width: 44ch;
  margin-bottom: 30px;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.45;
}

/* Footer */

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  padding: 8px 4px 16px;
}

.footer .brand { font-size: 1.2rem; }
.footer .brand img { width: 38px; height: 38px; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.footer-note { font-weight: 600; font-size: 0.95rem; }
.footer-note a { text-underline-offset: 3px; }

/* Responsive */

@media (max-width: 1100px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { grid-column: auto; }
  .tile--learn { grid-column: 1 / -1; }
}

@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-bottom: 0; }
  .hero-art { min-height: clamp(430px, 100vw, 660px); }
  .lede { max-width: 30ch; }
}

@media (max-width: 700px) {
  .bento {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 86%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }

  .bento::-webkit-scrollbar { display: none; }
  .tile, .tile--learn { grid-column: auto; min-height: 540px; scroll-snap-align: start; }
  .modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta { grid-template-columns: minmax(0, 1fr); }
  .cta-icon { width: 120px; }
  .pill { min-height: 42px; padding: 0 16px; font-size: 0.95rem; }
  .badge { height: 54px; }
}

@media (max-width: 430px) {
  .nav .brand span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wave, .phone, .tablet, .caret { animation: none; }
}
