/* TraceWeather brand landing — static, mobile-first */

:root {
  --sky-deep: #0b3d4d;
  --sky-mid: #1a6b7a;
  --sky-soft: #3d9aaa;
  --mist: #e8f4f6;
  --foam: #f5fbfc;
  --ink: #13262b;
  --ink-muted: #4a646b;
  --accent: #c46b2b;
  --accent-hover: #a8561f;
  --line: rgba(19, 38, 43, 0.1);
  --glass: rgba(255, 255, 255, 0.72);
  --shadow: 0 24px 48px rgba(11, 61, 77, 0.18);
  --radius: 16px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Outfit", system-ui, sans-serif;
  --wrap: min(1120px, calc(100% - 2rem));
  --header-h: 4rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--foam);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--sky-mid);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--sky-deep);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
  border-radius: 6px;
}

.skip-link:focus {
  top: 1rem;
}

.wrap {
  width: var(--wrap);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  backdrop-filter: blur(12px);
  background: rgba(245, 251, 252, 0.82);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(245, 251, 252, 0.94);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--sky-deep);
  text-decoration: none;
  font-weight: 600;
}

.brand:hover {
  color: var(--sky-deep);
}

.brand-mark {
  display: grid;
  place-items: center;
  color: var(--sky-mid);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.header-nav a:not(.btn) {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.header-nav a:not(.btn):hover {
  color: var(--ink);
}

@media (max-width: 640px) {
  .header-nav a:not(.btn) {
    display: none;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 0.95rem 1.6rem;
  font-size: 1.05rem;
}

.btn-primary {
  background: var(--sky-deep);
  color: #fff;
}

.btn-primary:hover {
  background: #083240;
  color: #fff;
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 28px rgba(196, 107, 43, 0.28);
}

.btn-accent:hover {
  background: var(--accent-hover);
  color: #fff;
}

/* Store buttons */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.cta-center {
  justify-content: center;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 11.5rem;
  padding: 0.7rem 1.15rem;
  border-radius: 12px;
  text-decoration: none;
  color: #fff;
  background: #111;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.store-btn:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.store-google {
  background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
}

.store-apple {
  background: linear-gradient(145deg, #222, #333);
}

.store-btn.is-soon {
  opacity: 0.55;
  pointer-events: none;
  cursor: default;
}

.store-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.store-label {
  font-size: 0.7rem;
  opacity: 0.8;
  letter-spacing: 0.02em;
}

.store-name {
  font-size: 1.15rem;
  font-weight: 600;
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 2.5rem 0 3.5rem;
}

.hero-atmosphere {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(61, 154, 170, 0.35), transparent 55%),
    radial-gradient(ellipse 55% 45% at 15% 80%, rgba(196, 107, 43, 0.12), transparent 50%),
    linear-gradient(165deg, #cfe8ec 0%, #e8f4f6 40%, #f5fbfc 100%);
  z-index: 0;
  animation: atmosphere-drift 18s ease-in-out infinite alternate;
}

.hero-atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.04;
  pointer-events: none;
}

@keyframes atmosphere-drift {
  from { transform: scale(1) translate(0, 0); }
  to { transform: scale(1.04) translate(-1%, 1%); }
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sky-mid);
  opacity: 0;
  animation: rise 0.7s ease 0.1s forwards;
}

.hero-brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 7vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--sky-deep);
  opacity: 0;
  animation: rise 0.75s ease 0.2s forwards;
}

.hero-tagline {
  margin: 1rem 0 0;
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
  font-weight: 500;
  color: var(--ink);
  opacity: 0;
  animation: rise 0.75s ease 0.35s forwards;
}

.hero-support {
  margin: 0.85rem 0 0;
  max-width: 32rem;
  color: var(--ink-muted);
  opacity: 0;
  animation: rise 0.75s ease 0.45s forwards;
}

.hero-copy .cta-row {
  opacity: 0;
  animation: rise 0.75s ease 0.55s forwards;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Phone mock */
.hero-visual {
  display: flex;
  justify-content: center;
  opacity: 0;
  animation: rise 0.9s ease 0.4s forwards;
}

.phone-frame {
  width: min(280px, 78vw);
  border-radius: 36px;
  padding: 12px;
  background: linear-gradient(160deg, #1a3a44, #0b3d4d);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  position: relative;
}

.phone-notch {
  width: 90px;
  height: 8px;
  margin: 4px auto 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
}

.phone-screen {
  border-radius: 26px;
  padding: 1.25rem 1.1rem 1.35rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(232, 244, 246, 0.98));
  color: var(--ink);
}

.dash-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--ink-muted);
  font-weight: 500;
}

.dash-humidity {
  display: flex;
  align-items: baseline;
  gap: 0.15rem;
  margin-top: 1.25rem;
}

.dash-value {
  font-family: var(--font-display);
  font-size: 4.25rem;
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--sky-deep);
  animation: pulse-soft 4s ease-in-out infinite;
}

.dash-unit {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--sky-mid);
}

@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.88; }
}

.dash-label {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.dash-meter {
  margin-top: 1rem;
  height: 6px;
  border-radius: 999px;
  background: rgba(26, 107, 122, 0.15);
  overflow: hidden;
}

.dash-meter-fill {
  width: 62%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sky-soft), var(--sky-mid));
  animation: meter-in 1.2s ease 0.8s both;
}

@keyframes meter-in {
  from { width: 0; }
}

.dash-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  margin-top: 1.1rem;
}

.dash-chip {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.4rem;
  text-align: center;
}

.dash-chip span {
  display: block;
  font-size: 0.65rem;
  color: var(--ink-muted);
  margin-bottom: 0.15rem;
}

.dash-chip strong {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--sky-deep);
}

.dash-hours {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.25rem;
  margin-top: 1.15rem;
  text-align: center;
}

.dash-hours div {
  padding: 0.45rem 0.15rem;
  border-radius: 10px;
}

.dash-hours em {
  display: block;
  font-style: normal;
  font-size: 0.65rem;
  color: var(--ink-muted);
}

.dash-hours b {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
}

.dash-hours .is-active {
  background: rgba(26, 107, 122, 0.12);
}

.dash-hours .is-active b {
  color: var(--sky-deep);
}

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-support {
    margin-inline: auto;
  }

  .hero-copy .cta-row {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .phone-frame {
    width: min(240px, 70vw);
  }

  .dash-value {
    font-size: 3.5rem;
  }
}

/* Sections */
.section {
  padding: 4.5rem 0;
}

.section-head {
  max-width: 36rem;
  margin-bottom: 2.5rem;
}

.section-head h2,
.story h2,
.tool-inner h2,
.download-inner h2 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--sky-deep);
  line-height: 1.2;
}

.section-head p,
.tool-inner p,
.download-inner p {
  margin: 0;
  color: var(--ink-muted);
}

/* Features */
.features {
  background: #fff;
}

.feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature-card {
  padding: 1.35rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--foam);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.feature-card:hover {
  border-color: rgba(26, 107, 122, 0.35);
  transform: translateY(-2px);
}

.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  background: rgba(26, 107, 122, 0.1);
  color: var(--sky-mid);
  margin-bottom: 0.85rem;
}

.feature-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.feature-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

.features-cta {
  margin: 2rem 0 0;
  text-align: center;
  font-weight: 600;
}

.features-cta a {
  text-decoration: none;
  color: var(--sky-mid);
}

.features-cta a:hover {
  color: var(--sky-deep);
  text-decoration: underline;
}

@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

/* Tool gate */
.tool-gate {
  background:
    linear-gradient(135deg, rgba(11, 61, 77, 0.94), rgba(26, 107, 122, 0.9)),
    var(--sky-deep);
  color: #fff;
  text-align: center;
  padding: 3.5rem 0;
}

.tool-inner {
  max-width: 34rem;
}

.tool-inner h2 {
  color: #fff;
}

.tool-inner p {
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 1.5rem;
}

/* Story */
.story {
  background: var(--mist);
}

.story-inner {
  max-width: 40rem;
}

.story-prose p {
  margin: 0 0 1.1rem;
  color: var(--ink-muted);
  font-size: 1.05rem;
}

.story-prose p:last-child {
  margin-bottom: 0;
}

.story-prose strong {
  color: var(--ink);
  font-weight: 600;
}

.story-prose em {
  font-style: italic;
  color: var(--sky-deep);
}

/* Download */
.download {
  background: #fff;
  text-align: center;
  border-top: 1px solid var(--line);
}

.download-inner p {
  margin-bottom: 0.25rem;
}

/* Footer */
.site-footer {
  background: var(--sky-deep);
  color: rgba(255, 255, 255, 0.78);
  padding: 2.75rem 0 2rem;
}

.footer-inner {
  display: grid;
  gap: 1.5rem;
}

.footer-brand .brand-name {
  color: #fff;
  display: block;
  margin-bottom: 0.35rem;
}

.footer-brand p {
  margin: 0;
  font-size: 0.95rem;
  max-width: 22rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-size: 0.95rem;
}

.footer-nav a:hover {
  color: #fff;
}

.footer-copy {
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.65;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* Legal / contact pages */
.page-main {
  padding: 3rem 0 4.5rem;
  min-height: 60vh;
}

.page-main h1 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  color: var(--sky-deep);
  letter-spacing: -0.02em;
}

.page-lead {
  margin: 0 0 2rem;
  color: var(--ink-muted);
}

.prose {
  max-width: 40rem;
}

.prose h2 {
  margin: 2rem 0 0.65rem;
  font-size: 1.25rem;
  color: var(--sky-deep);
}

.prose p,
.prose li {
  color: var(--ink-muted);
}

.prose ul {
  padding-left: 1.2rem;
}

.contact-card {
  max-width: 28rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.contact-card a {
  font-weight: 600;
  text-decoration: none;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-atmosphere,
  .dash-value,
  .dash-meter-fill,
  .hero-eyebrow,
  .hero-brand,
  .hero-tagline,
  .hero-support,
  .hero-copy .cta-row,
  .hero-visual {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
