:root {
  --paper: #f8f7f3;
  --surface: #ffffff;
  --ink: #17181c;
  --muted: #686a70;
  --line: rgba(23, 24, 28, 0.11);
  --shadow: 0 24px 70px rgba(26, 27, 31, 0.1);
  --orange: #f79432;
  --cyan: #14bbe5;
  --violet: #8e48ef;
  --lime: #d7f86b;
  --radius-sm: 18px;
  --radius-md: 28px;
  --radius-lg: 42px;
  --content: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3,
.wordmark {
  font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  letter-spacing: -0.04em;
}

h1 {
  margin-bottom: 24px;
  font-size: clamp(3.35rem, 8vw, 7.6rem);
  font-weight: 800;
  line-height: 0.93;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2.1rem, 4.5vw, 4.25rem);
  font-weight: 800;
  line-height: 1.02;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.35rem;
  line-height: 1.2;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  transform: translateY(-150%);
  border-radius: 999px;
  background: var(--ink);
  color: white;
  padding: 10px 18px;
}

.skip-link:focus {
  transform: translateY(0);
}

.shell {
  width: min(calc(100% - 40px), var(--content));
  margin-inline: auto;
}

.site-header {
  position: relative;
  z-index: 20;
  padding-top: 20px;
}

.nav-wrap {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 45px rgba(30, 31, 34, 0.06);
  padding: 10px 12px 10px 24px;
  backdrop-filter: blur(18px);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 1.35rem;
  font-weight: 800;
}

.wordmark-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--violet));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  border-radius: 999px;
  color: #37383c;
  padding: 10px 14px;
  font-size: 0.93rem;
  font-weight: 600;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: #f1f1ef;
}

.nav-links .nav-cta {
  background: var(--ink);
  color: white;
  padding-inline: 20px;
}

.nav-links .nav-cta:hover,
.nav-links .nav-cta:focus-visible {
  background: #33353b;
}

.menu-button {
  display: none;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font: inherit;
  cursor: pointer;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 116px 0 90px;
}

.hero::before,
.hero::after {
  position: absolute;
  z-index: -1;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  content: "";
  filter: blur(80px);
  opacity: 0.34;
}

.hero::before {
  top: 0;
  right: -170px;
  background: var(--lime);
}

.hero::after {
  bottom: -180px;
  left: -200px;
  background: #f7b5e6;
}

.hero-grid {
  display: grid;
  align-items: end;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 72px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  padding: 8px 14px;
  color: #45464b;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  content: "";
}

.hero-copy {
  max-width: 900px;
}

.hero-copy h1 span {
  color: #6b6d72;
}

.hero-intro {
  max-width: 720px;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.32rem);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-dark {
  background: var(--ink);
  box-shadow: 0 14px 28px rgba(23, 24, 28, 0.18);
  color: white;
}

.button-light {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.78);
}

.button-orange {
  background: var(--orange);
  box-shadow: 0 14px 30px rgba(247, 148, 50, 0.25);
  color: white;
}

.button-cyan {
  background: #0baed8;
  box-shadow: 0 14px 30px rgba(20, 187, 229, 0.25);
  color: #071a20;
}

.studio-note {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  padding: 28px;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.studio-note strong {
  display: block;
  margin-bottom: 8px;
  font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  font-size: 1.2rem;
}

.studio-note p {
  margin: 0;
  color: var(--muted);
}

.studio-note .scribble {
  display: block;
  margin-bottom: 18px;
  color: var(--violet);
  font-size: 2.4rem;
  line-height: 1;
}

.section {
  padding: 96px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 42px;
}

.section-heading p {
  max-width: 540px;
  margin-bottom: 6px;
  color: var(--muted);
}

.kicker {
  display: block;
  margin-bottom: 12px;
  color: #696b70;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

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

.app-card {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 48px);
  isolation: isolate;
}

.app-card:hover .card-arrow {
  transform: translate(4px, -4px);
}

.app-card-notemail {
  background: #fff0df;
}

.app-card-math {
  background: linear-gradient(145deg, #d9f7ff 0%, #efe3ff 100%);
}

.app-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  padding: 9px 14px 9px 9px;
  font-weight: 700;
}

.app-badge img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.app-card h3 {
  max-width: 480px;
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.app-card p {
  max-width: 500px;
  color: #55575c;
}

.card-arrow {
  position: absolute;
  top: 34px;
  right: 34px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  font-size: 1.35rem;
  transition: transform 180ms ease;
}

.card-art {
  position: absolute;
  right: -8%;
  bottom: -10%;
  width: 82%;
  transform: rotate(-4deg);
}

.app-card-math .card-art {
  right: -4%;
  bottom: -3%;
  width: 66%;
  filter: drop-shadow(0 24px 30px rgba(69, 44, 90, 0.18));
  transform: rotate(4deg);
}

.values-grid,
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.value-card,
.feature-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.66);
  padding: 30px;
}

.value-number {
  display: inline-grid;
  width: 42px;
  height: 42px;
  margin-bottom: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-size: 0.84rem;
  font-weight: 700;
}

.value-card p,
.feature-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.contact-panel {
  display: grid;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: white;
  grid-template-columns: 1.35fr 0.65fr;
}

.contact-copy {
  padding: clamp(40px, 8vw, 90px);
}

.contact-copy p {
  max-width: 650px;
  color: #b8bac0;
}

.contact-art {
  min-height: 360px;
  background:
    radial-gradient(circle at 30% 30%, var(--lime) 0 8%, transparent 9%),
    radial-gradient(circle at 70% 64%, var(--orange) 0 16%, transparent 17%),
    radial-gradient(circle at 20% 80%, var(--cyan) 0 12%, transparent 13%),
    linear-gradient(145deg, #30294d, #1c1d22);
}

.site-footer {
  padding: 44px 0;
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--ink);
}

/* Product pages */
.product-hero {
  padding: 90px 0 80px;
}

.product-hero-grid {
  display: grid;
  align-items: center;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 72px;
}

.product-icon {
  width: 78px;
  height: 78px;
  margin-bottom: 28px;
  border-radius: 22px;
  box-shadow: 0 16px 35px rgba(23, 24, 28, 0.14);
}

.product-hero h1 {
  font-size: clamp(3.4rem, 7.2vw, 6.7rem);
}

.notemail-hero-art {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #ffead5;
}

.notemail-hero-art img {
  position: absolute;
  width: 122%;
  max-width: none;
  right: -12%;
  bottom: -2%;
  border-radius: 22px;
  box-shadow: var(--shadow);
  transform: rotate(-3deg);
}

.math-hero-art {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.8), transparent 28%),
    linear-gradient(145deg, #d8f8ff, #e7d8ff);
}

.math-hero-art::before {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(20, 187, 229, 0.22) 1px, transparent 1px);
  background-size: 24px 24px;
  content: "";
}

.math-hero-art img {
  position: absolute;
  z-index: 1;
  width: 82%;
  right: -1%;
  bottom: -3%;
  filter: drop-shadow(0 30px 40px rgba(74, 50, 93, 0.2));
}

.feature-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 34px;
  place-items: center;
  border-radius: 15px;
  background: #eeefed;
  font-size: 1.3rem;
}

.notemail-theme .feature-icon {
  background: #fff0df;
}

.math-theme .feature-icon {
  background: #dff8ff;
}

.showcase {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #ececef;
  padding: clamp(28px, 6vw, 72px);
}

.showcase img {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

.phone-row {
  display: grid;
  align-items: end;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  padding: 46px 22px 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #d7f7ff, #f0e5ff);
}

.phone-frame {
  overflow: hidden;
  border: 8px solid #202126;
  border-bottom: 0;
  border-radius: 36px 36px 0 0;
  box-shadow: 0 28px 60px rgba(35, 28, 44, 0.22);
}

.phone-frame:nth-child(2) {
  transform: translateY(-26px);
}

.product-cta {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--ink);
  padding: clamp(42px, 8vw, 88px);
  color: white;
  text-align: center;
}

.product-cta p {
  max-width: 620px;
  margin: 0 auto 28px;
  color: #bcbec4;
}

.product-cta .button-row {
  justify-content: center;
}

/* Legal and support */
.document-hero {
  padding: 90px 0 44px;
}

.document-hero h1 {
  max-width: 920px;
  font-size: clamp(3rem, 6vw, 5.6rem);
}

.document-hero p {
  max-width: 760px;
  color: var(--muted);
}

.document-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 760px);
  gap: 72px;
  padding-bottom: 110px;
}

.document-nav {
  position: sticky;
  top: 24px;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.66);
  padding: 20px;
}

.document-nav a {
  display: block;
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.document-nav a:hover,
.document-nav a:focus-visible {
  background: #eeeeeb;
  color: var(--ink);
}

.document-content section {
  scroll-margin-top: 24px;
  margin-bottom: 52px;
}

.document-content h2 {
  font-size: clamp(1.65rem, 3vw, 2.25rem);
}

.document-content h3 {
  margin-top: 30px;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.document-content p,
.document-content li {
  color: #4f5156;
}

.document-content li + li {
  margin-top: 8px;
}

.notice {
  border: 1px solid rgba(20, 187, 229, 0.28);
  border-radius: var(--radius-sm);
  background: #eafaff;
  padding: 22px;
}

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

.support-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  padding: 30px;
}

.support-card p {
  color: var(--muted);
}

.support-card .button {
  margin-top: 10px;
}

.error-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px;
  text-align: center;
}

.error-code {
  margin-bottom: 4px;
  color: var(--violet);
  font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  font-size: 6rem;
  font-weight: 800;
  letter-spacing: -0.07em;
}

@media (max-width: 920px) {
  .hero-grid,
  .product-hero-grid,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    align-items: start;
    gap: 40px;
  }

  .studio-note {
    max-width: 520px;
  }

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

  .product-hero-grid {
    gap: 48px;
  }

  .document-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .document-nav {
    position: static;
    display: flex;
    overflow-x: auto;
    gap: 4px;
  }

  .document-nav a {
    white-space: nowrap;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .shell {
    width: min(calc(100% - 28px), var(--content));
  }

  .nav-wrap {
    position: relative;
    min-height: 62px;
    padding: 7px 8px 7px 18px;
  }

  .menu-button {
    display: grid;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    display: none;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
    padding: 10px;
    backdrop-filter: blur(18px);
    flex-direction: column;
  }

  .nav-links[data-open] {
    display: flex;
  }

  .nav-links a {
    padding: 12px 14px;
  }

  .hero,
  .product-hero {
    padding: 76px 0 64px;
  }

  .hero h1 {
    font-size: clamp(3.25rem, 17vw, 5.3rem);
  }

  .section {
    padding: 68px 0;
  }

  .section-heading {
    display: block;
  }

  .app-grid,
  .values-grid,
  .feature-grid,
  .support-grid {
    grid-template-columns: 1fr;
  }

  .app-card {
    min-height: 540px;
  }

  .app-card-math .card-art {
    width: 80%;
  }

  .notemail-hero-art,
  .math-hero-art {
    min-height: 480px;
  }

  .phone-row {
    overflow-x: auto;
    grid-template-columns: repeat(3, 230px);
    justify-content: start;
  }

  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }

  .document-hero {
    padding-top: 70px;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
