/* Scrib Notes — marketing site
   Colors aligned with app accent gradient + iOS light chrome */

:root {
  --bg: #eef3f0;
  --bg-soft: #f5f7f6;
  --surface: #ffffff;
  --ink: #0f1720;
  --ink-muted: #5a6570;
  --ink-faint: #8b959e;
  --line: rgba(15, 23, 32, 0.08);
  --blue: #387af5;
  --blue-deep: #2c5fd4;
  --teal: #2eb88c;
  --mint: #d7ebe3;
  --mint-deep: #b8ddd0;
  --nav-pill: rgba(255, 255, 255, 0.72);
  --shadow: 0 18px 50px rgba(28, 55, 70, 0.12);
  --radius: 18px;
  --radius-sm: 12px;
  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --max: 1120px;
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

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

a {
  color: var(--blue-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--blue);
}

/* Atmosphere */

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 55% at 15% -10%, rgba(56, 122, 245, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 5%, rgba(46, 184, 140, 0.22), transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(183, 221, 208, 0.45), transparent 60%),
    linear-gradient(180deg, #e8f1ed 0%, var(--bg) 35%, #f3f6f5 100%);
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  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='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

/* Nav */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: var(--header-h);
  padding-top: env(safe-area-inset-top, 0px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  background: rgba(238, 243, 240, 0.72);
  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, 247, 246, 0.88);
}

.site-header__inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: inherit;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.nav-links {
  display: none;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 550;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: linear-gradient(110deg, var(--blue) 0%, var(--teal) 100%);
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 650;
  font-size: 0.9rem;
  box-shadow: 0 8px 20px rgba(56, 122, 245, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(56, 122, 245, 0.34);
  color: #fff !important;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--ink);
  position: relative;
}

.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: var(--ink);
}

.menu-toggle span::before { top: -5px; }
.menu-toggle span::after { top: 5px; }

.mobile-nav {
  display: none;
  flex: 1 0 100%;
  width: 100%;
  padding: 0.35rem 1rem 1.15rem;
  padding-left: max(1rem, env(safe-area-inset-left, 0px));
  padding-right: max(1rem, env(safe-area-inset-right, 0px));
  background: rgba(245, 247, 246, 0.98);
  border-bottom: 1px solid var(--line);
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav ul {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  width: min(100%, var(--max));
  display: grid;
  gap: 0.25rem;
}

.mobile-nav a {
  display: block;
  padding: 0.85rem 0.65rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  border-radius: 12px;
  min-height: 44px;
}

.mobile-nav a[href*="apps.apple.com"] {
  margin-top: 0.35rem;
  text-align: center;
  color: #fff !important;
  background: linear-gradient(110deg, var(--blue) 0%, var(--teal) 100%);
}

@media (min-width: 768px) {
  .nav-links { display: flex; }
  .menu-toggle { display: none; }
  .mobile-nav { display: none !important; }
}

/* Layout helpers */

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

@media (max-width: 480px) {
  .wrap,
  .site-header__inner {
    width: min(100% - 1.5rem, var(--max));
  }
}

.section {
  padding: 4.5rem 0;
}

.section--tight {
  padding: 3rem 0;
}

.eyebrow {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(110deg, var(--blue), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 0;
}

h1 { font-size: clamp(2rem, 7vw, 3.75rem); font-weight: 750; }
h2 { font-size: clamp(1.55rem, 4.5vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }

.lede {
  margin: 0.85rem 0 0;
  color: var(--ink-muted);
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  max-width: 36rem;
}

/* Hero — one composition */

.hero {
  min-height: calc(100svh - var(--header-h) - env(safe-area-inset-top, 0px));
  display: grid;
  align-items: center;
  padding: 1.5rem 0 2.5rem;
  overflow: clip;
}

.hero__grid {
  display: grid;
  gap: 1.75rem;
  align-items: center;
}

.hero__brand-row {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  opacity: 0;
  animation: rise 0.8s ease forwards 0.1s;
}

.hero__brand-row img {
  width: clamp(52px, 12vw, 64px);
  height: clamp(52px, 12vw, 64px);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.hero__brand-name {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 5vw, 2.35rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  background: linear-gradient(110deg, var(--blue) 10%, var(--teal) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 {
  opacity: 0;
  animation: rise 0.8s ease forwards 0.22s;
}

.hero .lede {
  opacity: 0;
  animation: rise 0.8s ease forwards 0.34s;
}

.hero__actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  opacity: 0;
  animation: rise 0.8s ease forwards 0.46s;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none !important;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

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

.btn--primary {
  background: linear-gradient(110deg, var(--blue) 0%, var(--teal) 100%);
  color: #fff !important;
  box-shadow: 0 14px 32px rgba(56, 122, 245, 0.3);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink) !important;
  border: 1px solid var(--line);
}

.hero__visual {
  position: relative;
  justify-self: center;
  width: min(100%, 360px);
  opacity: 0;
  animation: float-in 1s ease forwards 0.3s;
}

.hero__visual img {
  width: 100%;
  max-height: min(62vh, 620px);
  object-fit: contain;
  object-position: top center;
  filter: drop-shadow(0 18px 36px rgba(28, 55, 70, 0.14));
  animation: gentle-float 7s ease-in-out infinite;
}

.hero__glow {
  position: absolute;
  inset: 12% 8% 8%;
  background: radial-gradient(circle, rgba(56, 122, 245, 0.28), transparent 70%);
  filter: blur(30px);
  z-index: -1;
}

@media (max-width: 899px) {
  .hero {
    min-height: 0;
    padding: 1.25rem 0 2rem;
  }

  .hero__actions .btn {
    flex: 1 1 calc(50% - 0.4rem);
    min-width: min(100%, 11rem);
  }
}

@media (max-width: 420px) {
  .hero__actions .btn {
    flex: 1 1 100%;
  }
}

@media (min-width: 768px) and (max-width: 899px) {
  .hero__grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 1.5rem;
    align-items: center;
  }

  .hero__visual {
    width: min(100%, 340px);
    justify-self: end;
  }

  .hero__visual img {
    max-height: min(70vh, 680px);
  }
}

@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 1.5rem;
  }

  .hero__visual {
    width: min(100%, 520px);
    justify-self: end;
    margin-right: -1rem;
  }

  .hero__visual img {
    max-height: none;
  }
}

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

@keyframes float-in {
  from { opacity: 0; transform: translateY(28px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes gentle-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Privacy strip */

.privacy-strip {
  padding: 1.25rem 0 0;
}

.privacy-strip__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
}

.privacy-strip p {
  margin: 0;
  color: var(--ink-muted);
  max-width: 42rem;
}

.privacy-strip strong {
  color: var(--ink);
  font-weight: 700;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--mint);
  color: #1d4d40;
  font-size: 0.82rem;
  font-weight: 650;
}

/* Feature showcase */

.feature {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  padding: 2.75rem 0;
}

.feature + .feature {
  border-top: 1px solid var(--line);
}

.feature__copy .lede {
  margin-top: 0.75rem;
}

.feature__shot {
  justify-self: center;
  width: min(100%, 320px);
}

.feature__shot img {
  width: 100%;
  max-height: min(70vh, 640px);
  object-fit: contain;
  object-position: top center;
  filter: drop-shadow(0 16px 32px rgba(28, 55, 70, 0.12));
}

.how-list {
  margin: 1.35rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.85rem;
}

.how-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
}

.how-list__step {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 750;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  flex-shrink: 0;
}

.how-list p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.how-list strong {
  display: block;
  color: var(--ink);
  font-weight: 700;
  margin-bottom: 0.15rem;
}

@media (min-width: 768px) {
  .feature {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 3.25rem 0;
  }

  .feature__shot {
    width: min(100%, 360px);
  }

  .feature__shot img {
    max-height: none;
  }

  .feature--flip .feature__copy { order: 2; }
  .feature--flip .feature__shot { order: 1; justify-self: start; }
  .feature:not(.feature--flip) .feature__shot { justify-self: end; }
}

@media (min-width: 900px) {
  .feature {
    gap: 3rem;
    padding: 3.5rem 0;
  }

  .feature__shot {
    width: min(100%, 380px);
  }
}

/* Reveal on scroll */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Tabs overview */

.tabs-overview {
  padding: 3rem 0 1.5rem;
}

.tabs-overview__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1.5rem;
}

@media (min-width: 560px) {
  .tabs-overview__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .tabs-overview {
    padding: 4rem 0 2rem;
  }

  .tabs-overview__grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 2rem;
  }
}

.tab-chip {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.9rem 0.7rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--line);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}

.tab-chip:hover,
.tab-chip:focus-visible {
  background: rgba(255, 255, 255, 0.75);
  border-color: var(--line);
  transform: translateY(-2px);
  color: inherit;
}

@media (min-width: 768px) {
  .tab-chip {
    background: transparent;
    border-color: transparent;
  }
}

.tab-chip__icon {
  width: 42px;
  height: 42px;
  margin-inline: auto;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  color: var(--blue);
}

.tab-chip__icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tab-chip strong {
  font-family: var(--font-display);
  font-size: 0.95rem;
}

.tab-chip span {
  font-size: 0.8rem;
  color: var(--ink-muted);
  line-height: 1.35;
}

/* How-to dense section */

.howto {
  background: rgba(255, 255, 255, 0.45);
  border-block: 1px solid var(--line);
  padding: 3rem 0;
}

.howto__grid {
  display: grid;
  gap: 1.75rem;
  margin-top: 1.75rem;
}

@media (min-width: 768px) {
  .howto {
    padding: 4rem 0;
  }

  .howto__grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem 2rem;
    margin-top: 2rem;
  }
}

.howto-block {
  padding: 0.25rem 0;
}

.howto-block h3 {
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.howto-block h3 .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--teal));
}

.howto-block ol {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--ink-muted);
}

.howto-block li + li {
  margin-top: 0.45rem;
}

.howto-block li::marker {
  color: var(--blue);
  font-weight: 700;
}

/* CTA band */

.cta-band {
  padding: 3rem 0 4rem;
  text-align: center;
}

.cta-band .lede {
  margin-inline: auto;
}

.cta-band__actions {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cta-band__actions .btn {
  flex: 1 1 auto;
  min-width: min(100%, 14rem);
}

@media (min-width: 640px) {
  .cta-band {
    padding: 4rem 0 5rem;
  }

  .cta-band__actions .btn {
    flex: 0 1 auto;
  }
}

.cta-band__logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

/* Footer */

.site-footer {
  padding: 2.25rem 0 calc(2.5rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.35);
}

.site-footer__inner {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .site-footer__inner {
    grid-template-columns: 1.4fr 1fr 1fr;
    align-items: start;
  }
}

@media (min-width: 640px) and (max-width: 767px) {
  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer__inner > :first-child {
    grid-column: 1 / -1;
  }
}

.site-footer p {
  margin: 0.5rem 0 0;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.site-footer h4 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.site-footer a {
  color: var(--ink-muted);
  text-decoration: none;
}

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

.site-footer__bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: space-between;
  color: var(--ink-faint);
  font-size: 0.85rem;
}

/* Legal pages */

.legal-page {
  padding: 2rem 0 3.5rem;
}

@media (min-width: 768px) {
  .legal-page {
    padding: 2.5rem 0 4rem;
  }
}

.legal-page h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
}

.legal-meta {
  margin: 0.75rem 0 2rem;
  color: var(--ink-faint);
  font-size: 0.95rem;
}

.legal-page section {
  margin-bottom: 1.75rem;
}

.legal-page h2 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

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

.legal-page ul {
  padding-left: 1.2rem;
}

.legal-page li + li {
  margin-top: 0.35rem;
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__brand-row,
  .hero h1,
  .hero .lede,
  .hero__actions,
  .hero__visual,
  .hero__visual img {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Landscape phones: keep hero compact */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: 0;
    padding: 1rem 0 1.5rem;
  }

  .hero__visual img {
    max-height: 70vh;
  }
}
