/* ============================================
   Tideline — tideline.anovelproject.com
   Static site stylesheet matching app theme
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Palette drawn from the app icon: blue-hour ocean, teal tide, pale foam */
  --ink: #06121E;          /* page background — deep-sea navy            */
  --deep: #0A2436;         /* raised surfaces / alternate sections       */
  --deeper: #081B29;       /* cards on alt sections                      */
  --tide: #45B8CB;         /* primary accent — the app's tide teal       */
  --tide-dim: #198596;     /* darker teal for gradients + hovers         */
  --foam: #ECF8F9;         /* near-white text on dark                    */
  --mist: #92B2BC;         /* secondary text                             */
  --mist-faint: #5D7B86;   /* tertiary text, tick labels                 */
  --line: rgba(69, 184, 203, 0.22);   /* hairlines and card borders      */
  --glow: rgba(69, 184, 203, 0.45);   /* now-marker glow                 */
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--ink);
  color: var(--foam);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--tide); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--tide);
  outline-offset: 3px;
  border-radius: 4px;
}

img, svg { max-width: 100%; }

/* --- Layout --- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 96px 0; }
.section--alt { background: var(--deep); }
.text-center { text-align: center; }

/* --- Typography --- */
h1, h2 {
  font-family: var(--display);
  font-weight: 560;
  letter-spacing: -0.01em;
  color: var(--foam);
}

h1 {
  font-size: clamp(2.4rem, 6vw, 3.9rem);
  line-height: 1.08;
}

h1 em, h2 em {
  font-style: italic;
  font-weight: 480;
  color: var(--tide);
}

h2 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); line-height: 1.2; }

h3 {
  font-size: 1.08rem;
  font-weight: 650;
  color: var(--foam);
  letter-spacing: 0.01em;
}

.subtitle {
  color: var(--mist);
  font-size: 1.08rem;
  max-width: 620px;
  margin: 16px auto 0;
}

.section-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tide);
  margin-bottom: 12px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.98rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn--primary {
  background: var(--foam);
  color: var(--ink);
  box-shadow: 0 6px 30px rgba(69, 184, 203, 0.25);
}
.btn--primary:hover { box-shadow: 0 8px 36px rgba(69, 184, 203, 0.4); }

.btn--outline {
  border: 1px solid var(--line);
  color: var(--foam);
  background: rgba(69, 184, 203, 0.06);
}
.btn--outline:hover { background: rgba(69, 184, 203, 0.14); }

.btn--small { padding: 9px 18px; font-size: 0.88rem; }

.btn-group {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 30px;
}

.btn-note {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--mist-faint);
}

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(6, 18, 30, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(69, 184, 203, 0.12);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 560;
  color: var(--foam);
}
.nav__logo:hover { text-decoration: none; }
.nav__logo svg { display: block; }

.nav__hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--foam);
  font-size: 1.6rem;
  cursor: pointer;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav__links a { color: var(--mist); font-size: 0.95rem; }
.nav__links a:hover { color: var(--foam); text-decoration: none; }
.nav__links .btn { color: var(--ink); }

/* --- Hero --- */
.hero {
  padding: 88px 0 0;
  text-align: center;
  overflow: hidden;
}

.hero__tagline {
  color: var(--mist);
  font-size: 1.12rem;
  max-width: 640px;
  margin: 22px auto 0;
}

/* --- The tideline (signature) --- */
.tideline {
  position: relative;
  margin-top: 40px;
  height: 300px;
}

.tideline__axis {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 12%, var(--line) 88%, transparent);
}

.tideline__waves {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.tideline__waves svg {
  position: absolute;
  top: 50%;
  left: 0;
  width: 200%;
  max-width: none;   /* the global svg { max-width: 100% } would break the loop */
  height: 280px;
  transform: translateY(-50%);
}

.wave--back { opacity: 0.16; animation: drift 58s linear infinite; }
.wave--front { opacity: 0.95; animation: drift 34s linear infinite; }

@keyframes drift {
  from { transform: translateY(-50%) translateX(0); }
  to   { transform: translateY(-50%) translateX(-50%); }
}

.tideline__now {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.tideline__now-line {
  flex: 1;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(236, 248, 249, 0.5), transparent);
}

.tideline__now-pill {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--foam);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  box-shadow: 0 0 24px var(--glow), 0 0 60px var(--glow);
}

.moment {
  position: absolute;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: rgba(10, 36, 54, 0.72);
  border: 1px solid var(--line);
  border-radius: 50%;
  backdrop-filter: blur(6px);
  animation: bob 6s ease-in-out infinite alternate;
}

.moment:nth-child(odd) { animation-duration: 7.5s; }

@keyframes bob {
  from { transform: translateY(-7px); }
  to   { transform: translateY(7px); }
}

.tideline__ticks {
  display: flex;
  justify-content: space-between;
  max-width: 860px;
  margin: 6px auto 0;
  padding: 0 24px 20px;
  font-size: 0.8rem;
  color: var(--mist-faint);
  font-variant-numeric: tabular-nums;
}

.tideline__ticks .tick--major { color: var(--mist); font-weight: 600; }

/* --- Facts strip --- */
.facts {
  border-top: 1px solid rgba(69, 184, 203, 0.12);
  border-bottom: 1px solid rgba(69, 184, 203, 0.12);
  background: var(--deep);
}

.facts__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 44px 0;
  text-align: center;
}

.fact__figure {
  font-family: var(--display);
  font-size: 1.65rem;
  font-weight: 560;
  color: var(--tide);
}

.fact__label { color: var(--mist); font-size: 0.9rem; margin-top: 4px; }

/* --- Features --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 48px;
  text-align: left;
}

.feature-card {
  background: var(--deep);
  border: 1px solid rgba(69, 184, 203, 0.14);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
}

.section--alt .feature-card { background: var(--deeper); }

.feature-card__icon {
  font-size: 1.5rem;
  margin-bottom: 14px;
}

.feature-card p { color: var(--mist); font-size: 0.94rem; margin-top: 8px; }

/* --- How it works --- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-top: 48px;
}

.step {
  padding: 30px 22px;
  background: var(--deeper);
  border: 1px solid rgba(69, 184, 203, 0.14);
  border-radius: var(--radius-lg);
}

.step__number {
  width: 34px;
  height: 34px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(69, 184, 203, 0.15);
  color: var(--tide);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.step p { color: var(--mist); font-size: 0.94rem; margin-top: 8px; }

/* --- Zoom triptych --- */
.zoom-strips { margin-top: 48px; display: grid; gap: 18px; }

.zoom-strip {
  position: relative;
  background: var(--deep);
  border: 1px solid rgba(69, 184, 203, 0.14);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.zoom-strip svg {
  display: block;
  width: 100%;
  height: 76px;
  opacity: 0.85;
}

.zoom-strip__label {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mist);
}

/* --- CTA banner --- */
.cta-banner {
  background: linear-gradient(135deg, var(--tide-dim), #0E4A5C 55%, var(--deep));
  border: 1px solid rgba(69, 184, 203, 0.3);
  border-radius: 26px;
  padding: 64px 40px;
  text-align: center;
}

.cta-banner p { color: rgba(236, 248, 249, 0.85); margin-top: 12px; }

/* --- Footer --- */
.footer {
  border-top: 1px solid rgba(69, 184, 203, 0.12);
  padding: 60px 0 32px;
  background: var(--ink);
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
}

.footer__brand p {
  color: var(--mist-faint);
  font-size: 0.9rem;
  margin-top: 12px;
  max-width: 260px;
}

.footer__links h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mist);
  margin-bottom: 14px;
}

.footer__links ul { list-style: none; }
.footer__links li { margin-bottom: 9px; }
.footer__links a { color: var(--mist-faint); font-size: 0.92rem; }
.footer__links a:hover { color: var(--tide); }

.footer__bottom {
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid rgba(69, 184, 203, 0.1);
  color: var(--mist-faint);
  font-size: 0.85rem;
  text-align: center;
}

/* --- Legal & support pages --- */
.legal { padding: 72px 0 96px; }

.legal .container { max-width: 760px; }

.legal h1 { font-size: 2.4rem; margin-bottom: 6px; }

.legal .last-updated {
  color: var(--mist-faint);
  font-size: 0.9rem;
  margin-bottom: 36px;
}

.legal h2 {
  font-size: 1.25rem;
  margin: 36px 0 12px;
}

.legal p, .legal li { color: var(--mist); }
.legal p { margin-bottom: 14px; }
.legal ul { margin: 0 0 16px 22px; }
.legal li { margin-bottom: 8px; }
.legal strong { color: var(--foam); }

/* --- Responsive --- */
@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .facts__grid { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .section { padding: 68px 0; }
  .features-grid { grid-template-columns: 1fr; }
  .tideline { height: 230px; }
  .tideline__waves svg { height: 220px; }
  .moment { width: 38px; height: 38px; font-size: 1.05rem; }
  .tideline__ticks .tick--optional { display: none; }

  .nav__hamburger { display: block; }
  .nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--deep);
    border-bottom: 1px solid rgba(69, 184, 203, 0.15);
    padding: 12px 24px;
  }
  .nav__links.open { display: flex; }
  .nav__links li { width: 100%; }
  .nav__links a { display: block; padding: 12px 0; }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wave--back, .wave--front { animation: none; }
  .moment { animation: none; }
  .btn { transition: none; }
}
