/* ============================================================
   teaketl.css — Teaketl Splash Page Styles
   Fonts loaded via Google Fonts in teaketl.html
   ============================================================ */

/* ── CSS custom properties (design tokens) ── */
:root {
  --lite-leafy:  #AFB9A5;   /* muted sage green */
  --dark-leafy:  #6A755E;   /* deeper forest green */
  --yuzu-yellow: #F2CB57;   /* warm golden yellow */
  --lite-terra:  #D9A792;   /* soft terracotta */
  --dark-terra:  #B05027;   /* deeper terracotta / CTA hover */
  --creamy:      #F5F1E8;   /* warm off-white background */
  --night:       #434350;   /* dark muted navy for text */
  --font-h:      'Comfortaa', cursive;    /* headings / branding */
  --font-b:      'Quicksand', sans-serif; /* body / UI text */
}

/* ── Base reset — removes default white border around the site ── */
html, body {
  margin: 0;
  padding: 0;
}

/* ── Page wrapper ── */
.tk-wrap {
  font-family: var(--font-b);
  background: var(--creamy);
  margin: 0;
  padding: 0;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.tk-hero {
  background: var(--dark-leafy);
  padding: 0.5rem 0.5rem 0;
  text-align: center;
  position: relative;
}

/* SVG logo sizing */
.tk-logo-svg {
  width: 260px;
  max-width: 82%;
}

/* Increase logo size on desktop */
@media (min-width: 768px) {
  .tk-logo-svg {
    width: 490px;
  }
}

/* Tagline below the logo */
.tk-tagline {
  font-family: var(--font-h);
  color: var(--yuzu-yellow);
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin: 0;
  padding-bottom: 0;
}

/* ── Hero-to-body wave transition ── */
/* Outer container keeps the green background behind the SVG */
.tk-hero-wave-wrap {
  background: var(--dark-leafy);
  margin-bottom: -2px;   /* -2px (was -1px) covers Firefox sub-pixel gap */
  overflow: hidden;
  font-size: 0;          /* kill any inline baseline gap under the SVG */
  line-height: 0;
  position: relative;    /* anchor ::after safety band */
}

/* Firefox compositor "safety band": the animated wave paths get
   promoted to their own compositor layers (via will-change + translateZ),
   and Firefox can leave a sub-pixel gap at that layer's bottom edge where
   the green wrap shows through. This 2px creamy band sits on top of
   the gap. It's invisible in the design (the wave's front path is already
   creamy down to the bottom of the viewBox) but fully covers the artifact. */
.tk-hero-wave-wrap::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--creamy);
  pointer-events: none;
}

/* Animate individual paths in the hero wave */
.tk-hero-wave-wrap svg path {
  transform-origin: bottom center;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transform: translateZ(0);
}

/* Back wave: slowest, most subtle (deepest depth) */
.tk-hero-wave-wrap svg path:nth-child(1) {
  animation: waveSwellBack 6s ease-in-out infinite;
}

/* Middle wave: medium speed and volatility */
.tk-hero-wave-wrap svg path:nth-child(2) {
  animation: waveSwellMid 4.5s ease-in-out infinite 0.3s;
}

/* Front wave: fastest, most volatile (closest to viewer) */
.tk-hero-wave-wrap svg path:nth-child(3) {
  animation: waveSwellFront 3s ease-in-out infinite 0.6s;
}

/* The wave SVG itself is handled inline in the HTML for flexibility */

/* ============================================================
   BODY / CONTENT AREA
   ============================================================ */
.tk-body {
  background: var(--creamy);
  padding: 1rem 1.5rem 2.5rem;
  max-width: 480px;
  margin: 0 auto;
}

/* Restore larger top padding on desktop */
@media (min-width: 768px) {
  .tk-body {
    padding: 2rem 1.5rem 2.5rem;
  }
}

/* ── Intro block ── */
.tk-intro {
  text-align: center;
  margin-bottom: 2rem;
}

.tk-intro h2 {
  font-family: var(--font-h);
  color: var(--dark-leafy);
  font-size: 1.45rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
}

.tk-intro p {
  font-family: var(--font-b);
  color: var(--night);
  font-size: 0.86rem;
  line-height: 1.75;
  letter-spacing: 0.02em;
  margin: 0;
  opacity: 0.85;
}

/* Restore larger text size on desktop */
@media (min-width: 768px) {
  .tk-intro p {
    font-size: 0.94rem;
  }
}

/* ── Feature pills ── */
.tk-pills {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 1.25rem 0 1.75rem;
}

.tk-pill {
  background: var(--dark-leafy);
  color: var(--yuzu-yellow);
  font-family: var(--font-b);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  padding: 6px 14px;
  border-radius: 20px;
}

/* ── Three-column feature grid ── */
.tk-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 2rem;
}

.tk-feat {
  background: #fffdf5;
  border: 1.5px solid #e6dece;
  border-radius: 16px;
  padding: 1rem 0.6rem;
  text-align: center;
}

.tk-feat-icon {
  font-size: 20px;
  margin-bottom: 6px;
  display: block;
}

.tk-feat p {
  font-family: var(--font-b);
  font-size: 0.72rem;
  color: var(--night);
  margin: 0;
  line-height: 1.45;
  opacity: 0.8;
}

/* ============================================================
   LOGIN / SIGN-UP CARD
   ============================================================ */
.tk-card {
  background: #fffdf5;
  border: 1.5px solid #e6dece;
  border-radius: 22px;
  padding: 1.75rem 1.5rem;
  margin-bottom: 1rem;
}

.tk-card h3 {
  font-family: var(--font-h);
  color: var(--dark-leafy);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 1.25rem;
  text-align: center;
}

/* ── Tab switcher ── */
.tk-tabs {
  display: flex;
  background: #ede8db;
  border-radius: 12px;
  padding: 3px;
  margin-bottom: 1.25rem;
}

.tk-tab {
  flex: 1;
  padding: 8px 0;
  text-align: center;
  font-family: var(--font-b);
  font-size: 0.86rem;
  font-weight: 600;
  color: #8a8070;
  border-radius: 10px;
  cursor: pointer;
  border: none;
  background: transparent;
  letter-spacing: 0.06em;
  transition: all 0.18s;
}

.tk-tab.active {
  background: #fffdf5;
  color: var(--dark-leafy);
}

/* ── Form fields ── */
.tk-field {
  margin-bottom: 1rem;
}

.tk-field label {
  display: block;
  font-family: var(--font-b);
  font-size: 0.76rem;
  font-weight: 700;
  color: #8a8070;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.tk-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
  border: 1.5px solid #ddd5c3;
  border-radius: 12px;
  background: var(--creamy);
  font-family: var(--font-b);
  font-size: 0.91rem;
  color: var(--night);
  outline: none;
  transition: border-color 0.18s;
  letter-spacing: 0.02em;
}

.tk-field input:focus {
  border-color: var(--lite-leafy);
}

.tk-field input::placeholder {
  color: #c4bdb0;
}

/* ── Submit button ── */
.tk-btn {
  width: 100%;
  box-sizing: border-box;
  padding: 13px;
  background: var(--lite-terra);
  color: #fff;
  font-family: var(--font-h);
  font-size: 0.97rem;
  font-weight: 700;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  letter-spacing: 0.04em;
  margin-top: 0.4rem;
  transition: background 0.18s;
}

.tk-btn:hover {
  background: var(--dark-terra);
}

/* ── Or divider ── */
.tk-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 1rem 0;
  color: #c4b9ab;
  font-size: 0.78rem;
  font-family: var(--font-b);
}

.tk-divider::before,
.tk-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e3d9c8;
}

/* ── Switch tab link ── */
.tk-switch {
  text-align: center;
  font-family: var(--font-b);
  font-size: 0.82rem;
  color: #9a9088;
  margin-top: 0.9rem;
}

.tk-switch span {
  color: var(--dark-leafy);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
}

/* ── Fine-print disclaimer ── */
.tk-disclaimer {
  text-align: center;
  font-family: var(--font-b);
  font-size: 0.72rem;
  color: var(--night);
  letter-spacing: 0.04em;
  margin-top: 0.75rem;
  opacity: 0.5;
  line-height: 1.6;
}

/* ── Panel visibility (JS toggles these) ── */
.tk-signup-panel { display: none; }
.tk-login-panel  { display: block; }

/* ============================================================
   FOOTER WAVE + FOOTER
   ============================================================ */

/* Outer container keeps the creamy background behind the footer wave SVG */
.tk-footer-wave-wrap {
  background: var(--creamy);
  margin-bottom: -2px;   /* -2px (was -1px) covers Firefox sub-pixel gap */
  overflow: hidden;
  font-size: 0;          /* kill any inline baseline gap under the SVG */
  line-height: 0;
  position: relative;    /* anchor ::after safety band */
}

/* Firefox compositor safety band (see .tk-hero-wave-wrap::after).
   Here the destination is the --night footer, so the band is --night. */
.tk-footer-wave-wrap::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--night);
  pointer-events: none;
}

/* Animate individual paths in the footer wave */
.tk-footer-wave-wrap svg path {
  transform-origin: bottom center;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transform: translateZ(0);
}

/* Back wave: slowest, most subtle (deepest depth) */
.tk-footer-wave-wrap svg path:nth-child(1) {
  animation: waveSwellBack 6s ease-in-out infinite;
}

/* Front wave: faster, more volatile (closest to viewer) */
.tk-footer-wave-wrap svg path:nth-child(2) {
  animation: waveSwellFront 3s ease-in-out infinite 0.3s;
}

/* Footer bar */
.tk-footer {
  background: var(--night);
  padding: 1.25rem 1.5rem;
}

.tk-footer-top {
  text-align: center;
  font-family: var(--font-b);
  font-size: 0.72rem;
  color: var(--lite-leafy);
  letter-spacing: 0.05em;
  opacity: 0.9;
  margin-bottom: 0.5rem;
}

.tk-footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-family: var(--font-b);
  font-size: 0.68rem;
  color: #7a8f76;
  letter-spacing: 0.05em;
}

.tk-footer-links a {
  color: #7a8f76;
  text-decoration: underline;
  text-decoration-style: dotted;
  cursor: pointer;
}

.tk-footer-links a:hover {
  color: var(--lite-leafy);
}

/* ============================================================
   WAVE ANIMATIONS
   Three-layer parallax effect with depth perception
   Back waves slow/subtle, front waves fast/volatile
   ============================================================ */

/* Back wave: slowest, subtlest movement (appears distant) */
@keyframes waveSwellBack {
  0% {
    transform: scaleY(1);
  }
  25% {
    transform: scaleY(1.04);
  }
  50% {
    transform: scaleY(1.06);
  }
  75% {
    transform: scaleY(1.04);
  }
  100% {
    transform: scaleY(1);
  }
}

/* Middle wave: medium speed and movement */
@keyframes waveSwellMid {
  0% {
    transform: scaleY(1);
  }
  25% {
    transform: scaleY(1.07);
  }
  50% {
    transform: scaleY(1.11);
  }
  75% {
    transform: scaleY(1.07);
  }
  100% {
    transform: scaleY(1);
  }
}

/* Front wave: fastest, most dramatic movement (appears close) */
@keyframes waveSwellFront {
  0% {
    transform: scaleY(1);
  }
  25% {
    transform: scaleY(1.12);
  }
  50% {
    transform: scaleY(1.20);
  }
  75% {
    transform: scaleY(1.12);
  }
  100% {
    transform: scaleY(1);
  }
}


/* ── Sign-up username field + live availability message ── */
.tk-username-wrap { position: relative; }

.tk-username-at {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-b);
  font-size: 0.91rem;
  color: #b3aa98;
  pointer-events: none;
}

.tk-field .tk-username-wrap input { padding-left: 30px; }

.tk-field input.is-taken     { border-color: #c96a5a; }
.tk-field input.is-available { border-color: var(--lite-leafy); }

.tk-username-status {
  font-family: var(--font-b);
  font-size: 0.74rem;
  color: #8a8070;
  margin-top: 5px;
  min-height: 1.1em;
}
.tk-username-status.is-taken     { color: #b4503f; }
.tk-username-status.is-available { color: var(--dark-leafy); }
