:root {
  --color-bg: #f2f2f7;
  --color-text: #1c1c1e;
  --color-text-secondary: rgba(60, 60, 67, 0.6);
  --glass-fill: rgba(255, 255, 255, 0.72);
  --glass-edge: rgba(60, 60, 67, 0.22);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.92);
  --glass-shadow: 0 10px 28px rgba(28, 28, 30, 0.08);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  --ripple: color-mix(in srgb, var(--color-text) 42%, transparent);
}

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

/* min-height only: height:100% locked scroll pages (privacy) to the viewport
   and left a tall empty gradient band over the footer. */
html { height: 100%; }

body {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  min-height: 100dvh;
  color: var(--color-text);
  font-family: var(--font);
  line-height: 1.45;
  /* vh-sized so long pages (privacy) don't stretch the hero glow into a slab */
  background:
    radial-gradient(90% 70vh at -10% -8vh, rgba(255, 132, 96, 0.58), transparent 64%),
    radial-gradient(80% 60vh at 112% -4vh, rgba(118, 128, 255, 0.5), transparent 60%),
    var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem clamp(1rem, 3vw, 1.75rem);
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.nav a {
  text-decoration: none;
  color: var(--color-text-secondary);
}

.lang {
  border: 1px solid var(--glass-edge);
  background: var(--glass-fill);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--color-text);
  box-shadow: var(--glass-highlight);
  backdrop-filter: blur(18px) saturate(1.7);
}

.stage {
  flex: 1;
  display: grid;
  align-content: center;
  gap: 1.25rem;
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: 0.25rem clamp(1rem, 3vw, 1.75rem) 1rem;
}

.pitch {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  text-align: center;
}

.mascot {
  display: grid;
  justify-items: center;
  gap: 0.2rem;
  width: min(100%, 300px);
}

.otter { width: 100%; }

.who {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.intro {
  width: min(100%, 32rem);
  display: grid;
  gap: 0.85rem;
  justify-items: center;
}

.talk {
  width: 100%;
  text-align: center;
}

.hello {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.4vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.say {
  color: var(--color-text-secondary);
  font-size: clamp(0.95rem, 2vw, 1.05rem);
}

/* Hidden on small screens: side-by-side shots are illegible there. */
.phones {
  display: none;
  justify-content: center;
  align-items: flex-end;
  gap: 0.75rem;
  min-height: 0;
}

.phone {
  position: relative;
  width: min(42vw, 168px);
  margin: 0;
  padding: 8px;
  border-radius: 32px;
  background:
    linear-gradient(145deg, #f4f4f6 0%, #c8c8cd 42%, #9a9aa1 100%);
  box-shadow:
    0 18px 36px rgba(28, 28, 30, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12);
}

/* Side buttons */
.phone::before,
.phone::after {
  content: '';
  position: absolute;
  background: #b0b0b6;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.phone::before {
  left: -2px;
  top: 18%;
  width: 3px;
  height: 12%;
  border-radius: 2px 0 0 2px;
}

.phone::after {
  right: -2px;
  top: 22%;
  width: 3px;
  height: 18%;
  border-radius: 0 2px 2px 0;
}

.phone-screen {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.phone picture,
.phone img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--color-bg);
}

.phone-b {
  transform: translateY(10px);
}

.foot {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  justify-content: space-between;
  padding: 0.5rem clamp(1rem, 3vw, 1.75rem) 0.9rem;
  color: var(--color-text-secondary);
  font-size: 0.82rem;
}

/* Long doc pages: flat bg, grow with content, quiet footer. */
body.doc {
  background: var(--color-bg);
}

body.doc .legal {
  flex: 1 0 auto;
}

body.doc .foot {
  margin-top: 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1.1rem;
  background: var(--color-bg);
  border-top: 1px solid var(--glass-edge);
}

.foot a {
  color: var(--color-text);
  font-weight: 600;
  text-decoration: none;
}

/* Otter SVG */
.otter-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.otter-svg .furA { stop-color: #f6c7b4; }
.otter-svg .furB { stop-color: #d08b6c; }
.otter-svg .furC { stop-color: #a86856; }
.otter-svg .faceA { stop-color: #fff6f1; }
.otter-svg .faceB { stop-color: #f6d9c8; }
.otter-svg .ink { fill: #6a433a; }
.otter-svg .edge {
  stroke: #6a433a;
  stroke-width: 12;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.otter-svg .swimmer {
  transform-box: fill-box;
  transform-origin: center;
  animation: bob 3.8s ease-in-out infinite;
}

.otter-svg .ripple {
  fill: var(--ripple);
  transform-box: fill-box;
  transform-origin: center;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

.otter-svg .rippleA { animation-name: rippleA; animation-duration: 5.4s; }
.otter-svg .rippleB { animation-name: rippleB; animation-duration: 6.6s; animation-delay: -1.4s; }
.otter-svg .rippleC { animation-name: rippleC; animation-duration: 7.8s; animation-delay: -2.6s; }
.otter-svg .rippleD { animation-name: rippleD; animation-duration: 9.2s; animation-delay: -4s; }

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes rippleA {
  0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.4; }
  50% { transform: translate(2px, -5px) rotate(-0.6deg); opacity: 0.85; }
}

@keyframes rippleB {
  0%, 100% { transform: translate(0, 1px) rotate(0.4deg); opacity: 0.48; }
  50% { transform: translate(-6px, 3px) rotate(-0.5deg); opacity: 0.9; }
}

@keyframes rippleC {
  0%, 100% { transform: translate(1px, 0) scale(1); opacity: 0.36; }
  50% { transform: translate(5px, 4px) scale(1.03); opacity: 0.78; }
}

@keyframes rippleD {
  0%, 100% { transform: translate(0, 0) scale(0.985); opacity: 0.3; }
  50% { transform: translate(-4px, -3px) scale(1.035); opacity: 0.72; }
}

@media (min-width: 860px) {
  .stage {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 1.5rem;
  }

  .pitch { justify-items: start; text-align: left; }
  .intro { justify-items: start; }
  .talk { text-align: left; }
  .mascot { width: min(100%, 360px); }

  .phones {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
  }

  .phone { width: min(46%, 210px); }
  .phone-b { transform: translateY(18px); }
}

@media (max-height: 780px) {
  .mascot { width: min(100%, 240px); }
  .phone { width: min(36vw, 140px); }
  .bubble p:last-child { font-size: 0.95rem; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #000000;
    --color-text: #f5f5f7;
    --color-text-secondary: rgba(235, 235, 245, 0.6);
    --glass-fill: rgba(36, 36, 40, 0.92);
    --glass-edge: rgba(235, 235, 245, 0.28);
    --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.14);
    --glass-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
  }

  body {
    background:
      radial-gradient(90% 70vh at -10% -8vh, rgba(255, 104, 74, 0.4), transparent 64%),
      radial-gradient(80% 60vh at 112% -4vh, rgba(78, 98, 255, 0.38), transparent 60%),
      #000000;
  }

  body.doc {
    background: var(--color-bg);
  }

  .otter-svg .furA { stop-color: #c99278; }
  .otter-svg .furB { stop-color: #a86850; }
  .otter-svg .furC { stop-color: #8a5244; }
  .otter-svg .faceA { stop-color: #dcc4b4; }
  .otter-svg .faceB { stop-color: #c9aa96; }
  .otter-svg .ink { fill: #3f2822; }
  .otter-svg .edge { stroke: #3f2822; }

  .phone {
    background: linear-gradient(145deg, #3a3a3c 0%, #1c1c1e 42%, #0a0a0a 100%);
    box-shadow:
      0 18px 36px rgba(0, 0, 0, 0.45),
      inset 0 1px 0 rgba(255, 255, 255, 0.18),
      inset 0 -1px 0 rgba(0, 0, 0, 0.4);
  }

  .phone::before,
  .phone::after {
    background: #2c2c2e;
  }

}

@media (prefers-reduced-motion: reduce) {
  .otter-svg .swimmer,
  .otter-svg .ripple {
    animation: none;
  }
}
