/* Tidebird v3 landing. Palette is navy, cream, and yellow used only as a small accent. */
:root {
  --navy: #0A2143;
  --cream: #FAF1E0;
  --yellow: #F9C76E;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --phone-radius: 2.5rem;
  --phone-pad: 0.72rem;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--navy);
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--navy);
  color: var(--cream);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 1.125rem;
  font-style: normal;
  font-weight: 400;
  font-optical-sizing: auto;
  line-height: 1.55;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-underline-offset: 0.18em;
  touch-action: manipulation;
}

a:focus-visible,
.cta:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
}

button, a, .cta {
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  padding: calc(1.5rem + env(safe-area-inset-top, 0px)) 0 4rem;
  background: var(--navy);
  color: var(--cream);
}

.hero-sky {
  position: relative;
  height: 32svh;
  min-height: 11.25rem;
  pointer-events: none;
  overflow: hidden;
}

.hero-bird {
  position: absolute;
  top: -8%;
  right: -24%;
  width: 118%;
}

.hero-bird img {
  width: 100%;
  height: auto;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, 68rem);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.hero-copy {
  width: min(100%, 28rem);
  padding-top: 1rem;
}

.icon {
  width: 4rem;
  height: 4rem;
  border-radius: 22%;
}

.brand {
  margin: 1.1rem 0 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0;
}

h1, h2 {
  margin: 0;
  font-weight: 600;
  letter-spacing: 0;
  font-style: normal;
}

h1 {
  margin-top: 0.85rem;
  font-size: clamp(2.35rem, 9vw, 4.25rem);
  line-height: 1.08;
}

.lede {
  margin: 0.85rem 0 0;
  font-size: clamp(1.15rem, 3.2vw, 1.4rem);
  line-height: 1.35;
}

.cta {
  display: inline-block;
  margin: 1.6rem 0 0;
  padding: 0.85rem 1.25rem;
  background: var(--cream);
  color: var(--navy);
  border-radius: 0.7rem;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.3;
  letter-spacing: 0;
  transition: transform 140ms var(--ease-out);
}

.cta:active {
  transform: scale(0.97);
}

.cta-on-navy {
  background: var(--cream);
  color: var(--navy);
}

.tone-cream .cta,
.close.tone-cream .cta {
  background: var(--navy);
  color: var(--cream);
}

@media (hover: hover) and (pointer: fine) {
  a:hover {
    color: var(--yellow);
  }
}

/* Device frame: a simple rounded bezel, not a card. */
.phone {
  margin: 0;
  width: min(18.75rem, 78vw);
  padding: var(--phone-pad);
  border-radius: var(--phone-radius);
}

.phone img {
  width: 100%;
  height: auto;
  aspect-ratio: 402 / 874;
  object-fit: cover;
  border-radius: calc(var(--phone-radius) - var(--phone-pad));
}

.phone-on-navy {
  background: var(--cream);
}

.phone-on-cream {
  background: var(--navy);
}

.hero .phone {
  width: min(18.75rem, 78vw);
}

/* Feature sections */
.feature,
.close {
  padding: 4.5rem 0;
}

.tone-cream {
  background: var(--cream);
  color: var(--navy);
}

.tone-navy {
  background: var(--navy);
  color: var(--cream);
}

.feature-inner,
.close-inner {
  width: min(100% - 2rem, 68rem);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  align-items: flex-start;
}

.feature-inner.single {
  max-width: 40rem;
}

.feature-copy {
  width: min(100%, 28rem);
}

.feature-copy h2,
.close-inner h2 {
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.12;
}

.feature-copy p,
.close-inner p {
  margin: 0.9rem 0 0;
}

.phone-pair {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  width: 100%;
}

.phone-pair .phone {
  width: min(16.5rem, 46vw);
}

.phone-secondary {
  display: none;
}

.widget-shot {
  margin: 0;
  width: min(18rem, 80%);
  justify-self: center;
}

.widget-shot img {
  display: block;
  width: 100%;
  height: auto;
}

.privacy-block {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.close {
  text-align: left;
  padding-bottom: 3rem;
}

.close-inner {
  display: block;
  width: min(100% - 2rem, 36rem);
}

.close-inner .icon {
  margin-bottom: 1.25rem;
}

footer {
  background: var(--navy);
  color: var(--cream);
  padding: 0 0 calc(2.75rem + env(safe-area-inset-bottom, 0px));
}

footer p {
  width: min(100% - 2rem, 68rem);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

/* Document pages */
body.doc {
  background: var(--cream);
  color: var(--navy);
}

body.doc main {
  width: min(100% - 2.5rem, 36rem);
  margin: 0 auto;
  padding: calc(3.5rem + env(safe-area-inset-top, 0px)) 0 calc(4.5rem + env(safe-area-inset-bottom, 0px));
}

body.doc h1 {
  font-size: 2rem;
  line-height: 1.2;
}

body.doc h2 {
  margin: 0 0 0.6rem;
  font-size: 1.15rem;
  line-height: 1.3;
}

body.doc section {
  margin: 2.25rem 0;
}

body.doc p {
  margin: 0 0 0.9rem;
}

body.doc p:last-child {
  margin-bottom: 0;
}

body.doc .back {
  margin: 0 0 2.25rem;
}

body.doc .effective {
  margin: 0.75rem 0 2.25rem;
}

body.doc footer {
  background: transparent;
  color: inherit;
  margin-top: 3.5rem;
  padding: 0;
}

body.doc footer p {
  width: auto;
  margin: 0;
}

body.error {
  background: var(--navy);
  color: var(--cream);
}

body.error main {
  width: min(100% - 2.5rem, 36rem);
  margin: 0 auto;
  padding: calc(4rem + env(safe-area-inset-top, 0px)) 0 calc(4.5rem + env(safe-area-inset-bottom, 0px));
}

body.error footer {
  background: transparent;
  padding: 0;
  margin-top: 3rem;
}

body.error footer p {
  width: auto;
  margin: 0;
}

/* Hero entrance: first visit, marketing-only. */
@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rise-in-sm {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.enter-bird {
  animation: rise-in 700ms var(--ease-out) both;
}

.enter-icon,
.enter-brand {
  animation: fade-in 450ms var(--ease-out) 40ms both;
}

.enter-title {
  animation: rise-in-sm 600ms var(--ease-out) 100ms both;
}

.enter-lede {
  animation: rise-in-sm 550ms var(--ease-out) 160ms both;
}

.enter-cta {
  animation: rise-in-sm 500ms var(--ease-out) 200ms both;
}

.enter-phone {
  animation: rise-in 700ms var(--ease-out) 180ms both;
}

/* Scroll reveals */
.reveal {
  opacity: 0;
  transform: translateY(16px);
}

.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
}

.feature-inner .phone.reveal,
.phone-pair .reveal {
  transition-delay: 0ms;
}

.feature-inner .phone.reveal.is-in,
.phone-pair .phone.reveal.is-in {
  transition-delay: 80ms;
}

.phone-pair .phone-secondary.reveal.is-in {
  transition-delay: 140ms;
}

@media (prefers-reduced-motion: reduce) {
  .enter-bird,
  .enter-icon,
  .enter-brand,
  .enter-title,
  .enter-lede,
  .enter-cta,
  .enter-phone {
    animation: fade-in 200ms ease both;
  }

  .reveal {
    transform: none;
  }

  .reveal.is-in {
    transition: opacity 200ms ease;
  }

  .cta:active {
    transform: none;
  }

  .feature-inner .phone.reveal.is-in,
  .phone-pair .phone.reveal.is-in,
  .phone-pair .phone-secondary.reveal.is-in {
    transition-delay: 0ms;
  }
}

@media (min-width: 960px) {
  .hero {
    display: flex;
    align-items: center;
    padding: 4.5rem 0 5.5rem;
  }

  .hero-sky {
    position: absolute;
    inset: 0 0 0 42%;
    height: auto;
    min-height: 0;
  }

  .hero-bird {
    top: 0;
    right: -10%;
    left: auto;
    width: min(50vw, 42rem);
    margin-top: 0;
  }

  .hero-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    width: min(100% - 6rem, 68rem);
  }

  .hero-copy {
    padding-top: 0;
    width: min(100%, 30rem);
  }

  h1 {
    font-size: clamp(3.25rem, 6vw, 4.75rem);
  }

  .hero .phone {
    width: 19.5rem;
    flex-shrink: 0;
    margin-right: 12.5rem;
  }

  .feature {
    padding: 6.5rem 0;
  }

  .feature-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    width: min(100% - 6rem, 68rem);
  }

  .feature-inner.flip {
    flex-direction: row-reverse;
  }

  .feature-inner.single {
    display: block;
    width: min(100% - 6rem, 40rem);
    margin-left: max(3rem, calc((100% - 68rem) / 2 + 3rem));
  }

  .feature-copy {
    width: min(100%, 28rem);
    flex: 1 1 22rem;
  }

  .feature-copy h2,
  .close-inner h2 {
    font-size: clamp(2.5rem, 4vw, 3.25rem);
  }

  .phone-pair {
    flex: 0 0 auto;
    width: auto;
    position: relative;
    min-width: 22rem;
    min-height: 28rem;
  }

  .phone-pair .phone {
    width: 16.75rem;
  }

  .phone-secondary {
    display: block;
    position: absolute;
    left: 58%;
    bottom: -5%;
  }

  .privacy-block {
    padding-top: 7rem;
    padding-bottom: 7rem;
  }

  .close {
    padding: 6.5rem 0 4rem;
  }

  .close-inner,
  footer p {
    width: min(100% - 6rem, 68rem);
  }

  footer p {
    margin: 0 auto;
  }
}

@media (max-width: 559px) {
  body {
    font-size: 1.0625rem;
  }

  .hero {
    padding-bottom: 3.25rem;
  }

  .hero-copy {
    margin-top: 0.25rem;
  }

  .hero .phone,
  .feature-inner .phone,
  .feature-inner .widget-shot,
  .phone-pair {
    align-self: center;
  }

  .feature,
  .close {
    padding: 3.5rem 0;
  }
}
