/* Penquit landing page — same tokens as the app ("v4 – Bold-Stil"). */
@font-face { font-family: 'DM Sans'; font-weight: 400; font-display: swap; src: url('fonts/DMSans_400Regular.ttf') format('truetype'); }
@font-face { font-family: 'DM Sans'; font-weight: 500; font-display: swap; src: url('fonts/DMSans_500Medium.ttf') format('truetype'); }
@font-face { font-family: 'DM Sans'; font-weight: 700; font-display: swap; src: url('fonts/DMSans_700Bold.ttf') format('truetype'); }
@font-face { font-family: 'DM Sans'; font-weight: 800; font-display: swap; src: url('fonts/DMSans_800ExtraBold.ttf') format('truetype'); }

:root {
  --ink: #111111;
  --grey: #6b6f76;
  --bg: #f2f3f5;
  --soft: #ecedef;
  --line: #e4e5e9;
  --ice: #cfe2ff;
  --ice-text: #2b3a55;
  --white: #ffffff;
  --radius: 28px;
  --max: 1120px;
}

* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 500;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }

.wrap { width: min(var(--max), 100% - 48px); margin-inline: auto; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 58px; padding: 0 28px; border-radius: 999px;
  font: 600 17px/1 'DM Sans', sans-serif; text-decoration: none;
  transition: transform 160ms ease-out, opacity 160ms ease-out;
}
.btn:active { transform: scale(0.97); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-light { background: var(--white); color: var(--ink); }
.btn-small { min-height: 44px; padding: 0 20px; font-size: 15px; }
.btn[aria-disabled='true'] { cursor: default; opacity: 0.85; }
.btn small { font-weight: 500; color: var(--grey); }
@media (hover: hover) { .btn-dark:hover { opacity: 0.88; } }

/* Header */
.header { position: absolute; inset: 0 0 auto; z-index: 3; }
.header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo { font-weight: 800; font-size: 24px; text-decoration: none; }
/* Legal pages: back to the start page, in the lead's font. */
.home-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 18px; font-weight: 500; color: var(--ice-text); text-decoration: none; }
@media (hover: hover) { .home-link:hover { color: var(--ink); } }

/* Fills the first screen: copy in the middle of the free space, ground at the bottom. */
.sky { position: relative; display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; background: var(--ice); padding: 56px 0 0; overflow: hidden; overflow: clip; }
/* clip, not just hidden: a hidden box can still be scrolled sideways (focus, clicks), shifting the page. */
/* Language switch: top right. The button looks like the lead text; the menu is a
   small white card that grows out of the top-right corner. */
.lang-pick { position: absolute; top: 14px; right: max(16px, calc((100% - 1136px) / 2)); z-index: 5; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px;
  border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  font: 500 clamp(17px, 2vw, 19px) 'DM Sans', sans-serif; color: var(--ice-text);
  transition: background-color 160ms ease-out;
}
.lang-btn svg { transition: transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.lang-pick.open .lang-btn { background: rgba(255, 255, 255, 0.6); }
.lang-pick.open .lang-btn svg { transform: rotate(180deg); }
@media (hover: hover) { .lang-btn:hover { background: rgba(255, 255, 255, 0.6); } }
.lang-btn:focus-visible, .lang-menu a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0; width: 220px; max-height: min(70vh, 600px); overflow-y: auto;
  margin: 0; padding: 8px; list-style: none; background: var(--white); border-radius: 22px;
  box-shadow: 0 18px 50px rgba(43, 58, 85, 0.18);
  transform-origin: top right; transform: scale(0.96) translateY(-4px); opacity: 0; visibility: hidden;
  transition: transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 140ms ease-out, visibility 0s linear 180ms;
}
.lang-pick.open .lang-menu {
  transform: none; opacity: 1; visibility: visible;
  transition: transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 140ms ease-out, visibility 0s;
}
.lang-menu a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 44px; padding: 0 14px; border-radius: 14px;
  font-size: 16px; font-weight: 500; color: var(--ink); text-decoration: none;
}
.lang-menu a[aria-current] { background: var(--ice); font-weight: 700; }
@media (hover: hover) { .lang-menu a:not([aria-current]):hover { background: var(--bg); } }
.sky-copy { flex: 1; justify-content: center; text-align: center; display: flex; flex-direction: column; align-items: center; }
h1 { font-size: clamp(44px, 7vw, 80px); line-height: 0.98; font-weight: 800; }
.lead { margin-top: 18px; font-size: clamp(17px, 2vw, 21px); color: var(--ice-text); max-width: 40ch; text-wrap: balance; }

.signup {
  display: flex; gap: 6px; width: min(520px, 100%); margin-top: 28px;
  padding: 6px; background: var(--white); border-radius: 999px;
  box-shadow: 0 10px 30px rgba(43, 58, 85, 0.1);
}
.signup input[type='email'] {
  flex: 1; min-width: 0; height: 56px; padding: 0 22px; border: 0; border-radius: 999px;
  font: 500 17px 'DM Sans', sans-serif; color: var(--ink); background: transparent; outline: none;
}
.signup input[type='email']::placeholder { color: #9aa0a9; }
.signup:focus-within { box-shadow: 0 0 0 3px var(--ink), 0 10px 30px rgba(43, 58, 85, 0.1); }
.signup .btn { min-height: 56px; flex: none; cursor: pointer; border: 0; }
.signup .btn:disabled { opacity: 0.6; cursor: default; }
.signup[hidden] { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-msg { min-height: 0; font-weight: 700; font-size: 17px; }
.form-msg:not(:empty) { margin-top: 16px; }
.form-msg[data-kind='ok'] { display: inline-block; padding: 16px 24px; border-radius: 999px; background: var(--white); }
.note { margin-top: 14px; font-size: 14px; color: var(--ice-text); max-width: 40ch; text-wrap: balance; }
.note a { font-weight: 700; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --p = penguin width (drawing 990 × 960). The snow crest sits 88 px above the bottom of
   the first screen; the rest of the waves runs on into the white section below.
   The penguin stands in the snow, deep enough that the raised foot (top at 66 % of the
   drawing) is hidden too, so he can be big. His size follows the screen height, so all of it fits on the first screen. */
.ground { --p: clamp(240px, calc((100vh - 560px) / 0.64), 400px); flex: none; position: relative; height: calc(var(--p) * 0.64 + 100px); margin-top: 20px; }
.waves { position: absolute; bottom: -80px; left: 50%; transform: translateX(-50%); display: block; }
.wave-back { fill: #a6c4ff; }
.wave-front { fill: var(--white); }
/* Between the hills and the snow; sunk in below the snow crest (x 1440, y 96 of 264). */
.penguin-spot { position: absolute; left: 50%; bottom: calc(70px - var(--p) * 0.33); width: var(--p); transform: translateX(-50%); }
.penguin { display: block; width: 100%; height: auto; overflow: visible; transform-origin: 50% 100%; }

/* Idle "wave" (like the app): breathes, sways a little, waves with the raised flipper,
   blinks. Pivots are in each group's own coordinates: tilt/squash in the viewBox
   (0 0 990 960), the parts inside the translate(-140 -130) group in the original
   drawing's coordinates (the same pivots as the app's Penguin.tsx). */
.penguin g { transform-box: view-box; }
.penguin .tilt { transform-origin: 500px 940px; animation: tilt 4.8s ease-in-out infinite; }
.penguin .squash { transform-origin: 500px 940px; animation: squash 2.4s ease-in-out infinite; }
.penguin .fl-left { transform-origin: 330px 640px; animation: wave 4.8s ease-in-out infinite; }
.penguin .fl-right { transform-origin: 900px 720px; animation: flap 2.4s ease-in-out infinite; }
.penguin .eye-left { transform-origin: 523px 438px; animation: blink 7.96s ease-in-out infinite; }
.penguin .eye-right { transform-origin: 781px 496px; animation: blink 7.96s ease-in-out infinite; }
.penguin .fx { transform-origin: 245px 255px; animation: pop 2.4s ease-in-out infinite; }
@keyframes squash { 50% { transform: scaleY(1.02); } }
@keyframes tilt { 14.6% { transform: rotate(-2deg); } 29.2% { transform: rotate(2deg); } 41.7%, 100% { transform: rotate(0); } }
@keyframes wave {
  12.5% { transform: rotate(10deg); } 20.8% { transform: rotate(-2deg); } 29.2% { transform: rotate(12deg); }
  37.5% { transform: rotate(-2deg); } 45.8% { transform: rotate(8deg); } 58.3%, 100% { transform: rotate(0); }
}
@keyframes flap { 50% { transform: rotate(-4deg); } }
/* The app's rhythm: blink after 3.2 s, again after 4.1 s, then a quick double blink
   (70 ms closing, 110 ms opening). */
@keyframes blink {
  0%, 40.2%, 42.46%, 93.97%, 96.23%, 97.74%, 100% { transform: scaleY(1); }
  41.08%, 94.85%, 98.62% { transform: scaleY(0.08); }
}
@keyframes pop { 50% { transform: scale(1.1); } }

/* After signing up: a happy hop. */
.penguin.hop { animation: hop 700ms cubic-bezier(0.3, 0.7, 0.4, 1); }
@keyframes hop {
  20% { transform: scale(1.04, 0.94); }
  50% { transform: translateY(-48px) scale(0.98, 1.03); }
  80% { transform: scale(1.03, 0.97); }
}

/* Sections */
section { padding: 88px 0; }
.snow { background: var(--white); padding-top: 24px; }
.snow .card { background: var(--bg); }
.back-up { margin-top: 40px; text-align: center; }
h2 { font-size: clamp(32px, 4.4vw, 48px); line-height: 1.05; font-weight: 800; }
.section-sub { margin-top: 12px; font-size: 18px; color: var(--grey); max-width: 46ch; }


.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.card { background: var(--white); border-radius: var(--radius); padding: 28px; }
.card h3 { font-size: 22px; line-height: 1.15; font-weight: 800; }
.card p { margin-top: 10px; color: var(--grey); }
.card .num { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--white); font-weight: 800; margin-bottom: 20px; }

.final { background: var(--ice); border-radius: 40px; padding: clamp(32px, 6vw, 72px); text-align: center; }
.final-sub { margin-top: 10px; font-size: 18px; color: var(--ice-text); }

/* Store buttons (until launch: "soon" = not clickable yet) */
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.stores-center { justify-content: center; }
.store {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-width: 188px; min-height: 58px; padding: 0 26px; border-radius: 999px;
  background: var(--ink); color: var(--white); text-decoration: none;
  font: 700 17px/1 'DM Sans', sans-serif;
  transition: transform 160ms ease-out, opacity 160ms ease-out;
}
.store:active { transform: scale(0.97); }
.store-icon { width: 22px; height: 22px; flex: none; }
.store.soon { pointer-events: none; }
@media (hover: hover) { .store:hover { opacity: 0.88; } }
.final img { width: 180px; margin: 0 auto 20px; }

/* Footer */
footer { background: var(--white); padding: 40px 0 56px; color: var(--grey); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
footer nav { display: flex; gap: 20px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }
footer .langs { flex-basis: 100%; flex-wrap: wrap; gap: 6px 16px; }
footer .langs [aria-current] { color: var(--ink); font-weight: 700; }

/* Legal pages */
.legal { padding: 120px 0 80px; }
.legal .wrap { max-width: 720px; }
.legal h1 { font-size: 44px; }
.legal h2 { font-size: 22px; margin-top: 32px; }
.legal p { margin-top: 10px; color: var(--grey); }
.todo { background: var(--ice); border-radius: 16px; padding: 16px 20px; margin-top: 24px; color: var(--ink); }

@media (max-width: 860px) {
  /* Phone: copy on the left, a big penguin peeking in from the right edge. */
  .sky { padding-top: 48px; }
  .sky-copy { text-align: left; align-items: flex-start; }
  .lead, .note { text-wrap: pretty; }
  .ground { --p: clamp(280px, calc((100vh - 500px) / 0.64), 360px); margin-top: 0; }
  .penguin-spot { left: auto; right: -64px; transform: none; }
  .btn-small { padding: 0 16px; }
  .cards { grid-template-columns: 1fr; }
  .stores { margin-top: 24px; }
  section { padding: 64px 0; }
}

@media (max-width: 520px) {
  .signup { padding: 5px; }
  .signup input[type='email'] { height: 52px; padding: 0 16px; font-size: 16px; }
  .signup .btn { min-height: 52px; padding: 0 20px; font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .lang-menu, .lang-pick.open .lang-menu, .lang-btn svg { transition: none; }
  .btn, .store { transition: none; }
  /* The idle penguin keeps moving, like in the app (gentle, small motion); only the jump stops. */
  .penguin.hop { animation: none; }
}

/* Thank-you page (only without JavaScript) */
.thanks { min-height: 100vh; padding-bottom: 80px; }
