/*
 * Tagwisp — product site
 *
 * Layout language follows ldmcollc.com (DM Sans, pill controls, rounded
 * glass cards, status pills). Colour follows the Tagwisp app: deep ocean
 * teal with an aqua glow. Content is readable without any script.
 */

@font-face {
  font-family: "DM Sans";
  src: url("/assets/fonts/dm-sans-regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("/assets/fonts/dm-sans-semibold.ttf") format("truetype");
  font-weight: 600 700;
  font-display: swap;
}

@font-face {
  font-family: "DM Serif Display";
  src: url("/assets/fonts/dm-serif-display-italic.ttf") format("truetype");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;

  --bg: #04161b;
  --bg-deep: #021014;
  --surface: rgba(14, 52, 60, 0.55);
  --surface-solid: #0a2a31;
  --surface-raised: rgba(22, 74, 84, 0.6);
  --line: rgba(120, 230, 222, 0.14);
  --line-strong: rgba(120, 230, 222, 0.3);

  --text: #eaf7f5;
  --text-soft: #b9d3d0;
  --muted: #86a6a3;

  --aqua: #54d9d1;
  --aqua-bright: #8ff0e8;
  --aqua-deep: #00666b;
  --ocean: #0b5a73;
  --on-aqua: #032a2c;

  --font-sans: "DM Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-accent: "DM Serif Display", Georgia, serif;

  --content-max: 74rem;
  --reading-max: 46rem;
  --gutter: clamp(1rem, 4vw, 3rem);
  --radius-lg: 1.75rem;
  --radius-md: 1.25rem;
  --header-height: 4.25rem;
  --section-space: clamp(4rem, 9vw, 7.5rem);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  position: relative;
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, figure {
  margin: 0;
}

h1, h2, h3 {
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.02;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.9rem, 7.6vw, 5.6rem);
}

h2 {
  font-size: clamp(2.1rem, 4.8vw, 3.6rem);
}

h3 {
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

p {
  text-wrap: pretty;
}

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

/* Ambient glow, painted once behind the page rather than per scroll frame. */
body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60rem 40rem at 85% -10%, rgba(84, 217, 209, 0.16), transparent 60%),
    radial-gradient(50rem 40rem at -10% 40%, rgba(11, 90, 115, 0.35), transparent 65%);
  pointer-events: none;
  content: "";
}

a {
  color: var(--aqua);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 0.07em;
}

a:hover {
  color: var(--aqua-bright);
}

:focus-visible {
  outline: 3px solid var(--aqua);
  outline-offset: 3px;
  border-radius: 0.5rem;
}

::selection {
  background: var(--aqua);
  color: var(--on-aqua);
}

code {
  padding: 0.1em 0.4em;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: rgba(84, 217, 209, 0.08);
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.accent {
  color: var(--aqua);
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.soft {
  color: var(--muted);
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: var(--aqua);
  color: var(--on-aqua);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: none;
}

.shell {
  width: min(100% - 2 * var(--gutter), var(--content-max));
  margin-inline: auto;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid transparent;
  background: rgba(4, 22, 27, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-height);
}

.brand {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}

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

.brand img {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.6rem;
  box-shadow: 0 0 0 1px var(--line), 0 6px 20px rgba(84, 217, 209, 0.18);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2.5vw, 1.75rem);
  font-size: 0.95rem;
  font-weight: 600;
}

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

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

.site-nav .button {
  color: var(--on-aqua);
}

@media (max-width: 34rem) {
  .site-nav .nav-optional {
    display: none;
  }
}

/* Buttons and pills */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.6rem 1.3rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(14, 52, 60, 0.5);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.button:hover {
  color: var(--text);
  background: var(--surface-raised);
  transform: translateY(-1px);
}

.button--primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--aqua-bright), var(--aqua));
  color: var(--on-aqua);
  box-shadow: 0 8px 30px rgba(84, 217, 209, 0.25);
}

.button--primary:hover {
  background: linear-gradient(135deg, #b4f7f1, var(--aqua-bright));
  color: var(--on-aqua);
  box-shadow: 0 10px 36px rgba(84, 217, 209, 0.38);
}

.button--small {
  min-height: 2.35rem;
  padding: 0.45rem 1rem;
  font-size: 0.875rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(84, 217, 209, 0.07);
  color: var(--text-soft);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
}

.pill--status::before {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: 0 0 0 0 rgba(84, 217, 209, 0.6);
  content: "";
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(84, 217, 209, 0.55); }
  70%, 100% { box-shadow: 0 0 0 0.5rem rgba(84, 217, 209, 0); }
}

/* App Store download link. */
.store-badge {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 2.75rem;
  padding: 0.45rem 1.1rem 0.45rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.9rem;
  color: var(--text-soft);
  line-height: 1.1;
}

.store-badge svg {
  width: 1.4rem;
  height: 1.4rem;
  fill: currentColor;
}

.store-badge small {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: normal;
}

.store-badge strong {
  font-size: 1rem;
  font-weight: 600;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 0.8125rem;
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  padding-block: clamp(3rem, 8vw, 6rem) clamp(3rem, 6vw, 5rem);
}

.hero__copy {
  display: grid;
  gap: 1.5rem;
  justify-items: start;
}

.hero h1 .soft {
  color: var(--text-soft);
  opacity: 0.75;
}

.hero__lede {
  max-width: 34rem;
  color: var(--text-soft);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
  isolation: isolate;
  min-height: 30rem;
}

.hero__visual::before {
  position: absolute;
  inset: 8% 4%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(84, 217, 209, 0.38), rgba(11, 90, 115, 0.2) 55%, transparent);
  filter: blur(30px);
  content: "";
}

.phone {
  width: min(16.5rem, 46vw);
  overflow: hidden;
  border: 1px solid rgba(180, 247, 241, 0.28);
  border-radius: 2.4rem;
  background: var(--bg-deep);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 6px rgba(4, 22, 27, 0.9), 0 0 0 7px rgba(120, 230, 222, 0.18);
}

.hero__visual .phone--front {
  position: relative;
  z-index: 2;
  transform: translateX(-12%) rotate(-3deg);
}

.hero__visual .phone--back {
  position: absolute;
  top: 9%;
  left: 54%;
  z-index: 1;
  width: min(14rem, 40vw);
  opacity: 0.92;
  transform: rotate(5deg);
}

/* Waves echo the app icon. */
.waves {
  position: absolute;
  top: -1.5rem;
  right: 2%;
  z-index: 3;
  width: 5.5rem;
  color: var(--aqua);
  filter: drop-shadow(0 0 14px rgba(84, 217, 209, 0.7));
}

/* Sections */

.section {
  padding-block: var(--section-space);
  scroll-margin-top: calc(var(--header-height) - var(--section-space) + 2rem);
}

.section + .section {
  padding-top: 0;
}

.section__head {
  display: grid;
  gap: 1rem;
  max-width: 44rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section__head p {
  color: var(--text-soft);
  font-size: 1.1rem;
}

.kicker {
  color: var(--aqua);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.card {
  position: relative;
  overflow: hidden;
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(22, 74, 84, 0.45), rgba(8, 36, 43, 0.55));
}

.card p {
  color: var(--text-soft);
}

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

.feature-grid .card {
  display: grid;
  align-content: start;
  gap: 0.75rem;
}

.icon {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 0.85rem;
  background: radial-gradient(circle at 30% 25%, rgba(143, 240, 232, 0.35), rgba(0, 102, 107, 0.35));
  color: var(--aqua-bright);
}

.icon svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

/* Screens rail */

.rail {
  display: flex;
  gap: 1.25rem;
  margin: 0;
  padding: 0.5rem var(--gutter) 1.5rem;
  overflow-x: auto;
  list-style: none;
  scroll-padding-inline: var(--gutter);
  scroll-snap-type: x mandatory;
  scrollbar-color: var(--line-strong) transparent;
}

.rail li {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.rail figure {
  display: grid;
  gap: 0.75rem;
  justify-items: center;
}

.rail .phone {
  width: clamp(12rem, 22vw, 15rem);
  border-radius: 2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(120, 230, 222, 0.12);
}

.rail figcaption {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}

@media (min-width: 80rem) {
  .rail {
    justify-content: center;
  }
}

/* Free and Pro */

.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.plan {
  display: grid;
  align-content: start;
  gap: 1rem;
}

.plan__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  white-space: nowrap;
  gap: 0.6rem;
  font-size: 2.4rem;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}

.plan__price small {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0;
}

.plan ul {
  display: grid;
  gap: 0.55rem;
  padding: 0;
  list-style: none;
}

.plan li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--text-soft);
}

.plan li::before {
  position: absolute;
  top: 0.5em;
  left: 0.15rem;
  width: 0.7rem;
  height: 0.38rem;
  border-bottom: 2px solid var(--aqua);
  border-left: 2px solid var(--aqua);
  transform: rotate(-45deg);
  content: "";
}

.plan--pro {
  border-color: var(--line-strong);
  background:
    radial-gradient(30rem 18rem at 100% 0%, rgba(84, 217, 209, 0.22), transparent 70%),
    linear-gradient(160deg, rgba(22, 74, 84, 0.6), rgba(8, 36, 43, 0.6));
}

.plan__note {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Privacy band */

.privacy-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 5vw, 4rem);
}

.stat-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: 0;
  list-style: none;
}

.stat-list li {
  display: grid;
  gap: 0.25rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(8, 36, 43, 0.5);
}

.stat-list strong {
  color: var(--aqua-bright);
  font-size: 1.9rem;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}

.stat-list span {
  color: var(--text-soft);
  font-size: 0.9rem;
}

/* Coming soon CTA */

.launch {
  display: grid;
  justify-items: center;
  gap: 1.25rem;
  padding: clamp(2.5rem, 7vw, 5rem) clamp(1.25rem, 5vw, 4rem);
  text-align: center;
  border-color: var(--line-strong);
  background:
    radial-gradient(40rem 22rem at 50% 0%, rgba(84, 217, 209, 0.28), transparent 70%),
    linear-gradient(180deg, rgba(11, 90, 115, 0.45), rgba(4, 22, 27, 0.6));
}

.launch img {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 1.3rem;
  box-shadow: 0 0 0 1px var(--line-strong), 0 18px 50px rgba(84, 217, 209, 0.3);
}

.launch p {
  max-width: 36rem;
}

.launch .hero__actions {
  justify-content: center;
}

/* Document pages (support, privacy, tag/read) */

.doc-hero {
  display: grid;
  gap: 1.1rem;
  justify-items: start;
  padding-block: clamp(3rem, 8vw, 5.5rem) clamp(2rem, 4vw, 3rem);
}

.doc-hero h1 {
  font-size: clamp(2.6rem, 6.5vw, 4.5rem);
}

.doc-hero p {
  max-width: 40rem;
  color: var(--text-soft);
  font-size: 1.15rem;
}

.doc-layout {
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  align-items: start;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding-bottom: var(--section-space);
}

.doc-layout--single {
  grid-template-columns: minmax(0, var(--reading-max));
}

.doc-toc {
  position: sticky;
  top: calc(var(--header-height) + 1.5rem);
  display: grid;
  gap: 0.15rem;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
}

.doc-toc a {
  display: block;
  padding: 0.4rem 0.8rem;
  border-left: 2px solid var(--line);
  color: var(--muted);
  text-decoration: none;
}

.doc-toc a:hover {
  border-left-color: var(--aqua);
  color: var(--text);
}

.doc-body {
  display: grid;
  gap: 1rem;
  max-width: var(--reading-max);
}

.doc-section {
  display: grid;
  gap: 0.85rem;
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

.doc-section h2 {
  font-size: 1.45rem;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.doc-section p,
.doc-section li {
  color: var(--text-soft);
}

.doc-section ol {
  display: grid;
  gap: 0.5rem;
  padding-left: 1.25rem;
}

.doc-section li::marker {
  color: var(--aqua);
  font-weight: 600;
}

.callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.callout p {
  color: var(--text-soft);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 16, 20, 0.6);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: 2rem;
  padding-block: 3rem;
}

.site-footer p,
.site-footer small {
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer h2 {
  margin-bottom: 0.75rem;
  color: var(--text);
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-footer nav {
  display: grid;
  align-content: start;
  gap: 0.4rem;
}

.site-footer nav a {
  color: var(--text-soft);
  font-size: 0.95rem;
  text-decoration: none;
}

.site-footer nav a:hover {
  color: var(--aqua);
}

.site-footer__intro {
  display: grid;
  align-content: start;
  gap: 0.75rem;
}

/* Responsive */

@media (max-width: 60rem) {
  .hero,
  .privacy-band {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__visual {
    min-height: 0;
    padding-block: 1rem 2rem;
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .doc-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .doc-toc {
    display: none;
  }
}

@media (max-width: 40rem) {
  .feature-grid,
  .plans,
  .site-footer__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .stat-list {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .hero__visual .phone--front {
    transform: translateX(-18%) rotate(-3deg);
  }

  .hero__visual .phone--back {
    left: 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
