/* HexGrab site — shared styles */

:root {
  --ink: #1a1c22;
  --paper: #f7f5f1;
  --muted: rgba(247, 245, 241, 0.62);
  --soft: rgba(247, 245, 241, 0.42);
  --line: rgba(247, 245, 241, 0.16);
  --glass: rgba(26, 28, 34, 0.38);
  --glass-edge: rgba(247, 245, 241, 0.1);
  --coral: #ff6b5f;
  --green: #34c98a;
  --blue: #5b8def;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  min-height: 100%;
  overscroll-behavior-y: none;
}

body {
  font-family: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: var(--paper);
  background: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Soft mesh: solid blobs + heavy blur (avoids CSS gradient banding) */
.field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: #2a2e38;
}

.field .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
}

.field .blob-1 {
  width: 70vmax;
  height: 70vmax;
  left: -18%;
  top: -20%;
  background: #ff8276;
  opacity: 0.72;
}

.field .blob-2 {
  width: 65vmax;
  height: 65vmax;
  left: 28%;
  top: -28%;
  background: #78a5ff;
  opacity: 0.68;
}

.field .blob-3 {
  width: 72vmax;
  height: 72vmax;
  right: -22%;
  top: 18%;
  background: #4edca0;
  opacity: 0.65;
}

.field .blob-4 {
  width: 55vmax;
  height: 55vmax;
  left: 12%;
  bottom: -22%;
  background: #78a5ff;
  opacity: 0.48;
}

.field .blob-5 {
  width: 48vmax;
  height: 48vmax;
  right: -8%;
  bottom: -18%;
  background: #ff8276;
  opacity: 0.42;
}

.veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(26, 28, 34, 0.12) 0%,
    rgba(26, 28, 34, 0.32) 45%,
    rgba(26, 28, 34, 0.58) 100%
  );
}

main {
  position: relative;
  z-index: 5;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 1.5rem clamp(1.25rem, 4vw, 3rem) 1.75rem;
}

/* —— Site chrome —— */

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

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: inherit;
  text-decoration: none;
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.brand .wordmark {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.back {
  font-size: 0.88rem;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.back:hover {
  color: var(--paper);
  border-bottom-color: var(--muted);
}

footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}

.footer-links {
  display: inline-flex;
  align-items: center;
  gap: 1.1rem;
}

footer a {
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

footer a:hover {
  border-bottom-color: var(--muted);
}

/* —— Typography shared —— */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.9rem;
}

.eyebrow i {
  display: block;
  width: 1.75rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--coral), var(--green), var(--blue));
}

h1 {
  font-weight: 620;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.lead {
  line-height: 1.55;
  color: var(--muted);
  font-weight: 400;
}

/* —— Home —— */

.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 38rem;
  padding: 4rem 0 3rem;
}

.hero .eyebrow {
  margin-bottom: 1.35rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 6.5vw, 4.1rem);
  letter-spacing: -0.045em;
  line-height: 1.05;
  margin-bottom: 1.25rem;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(105deg, var(--coral) 0%, var(--green) 48%, var(--blue) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .lead {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  max-width: 28rem;
  margin-bottom: 2.25rem;
}

.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.55rem 0.35rem;
  font-size: clamp(1.15rem, 2.8vw, 1.45rem);
  font-weight: 550;
  letter-spacing: -0.025em;
  margin-bottom: 2.5rem;
  color: var(--paper);
}

.flow span {
  white-space: nowrap;
}

.flow .step-1 { color: var(--coral); }
.flow .step-2 { color: var(--green); }
.flow .step-3 { color: var(--blue); }

.flow .arrow {
  color: rgba(244, 242, 238, 0.28);
  font-weight: 400;
  margin: 0 0.35rem;
  user-select: none;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.cta {
  display: inline-block;
  line-height: 0;
  text-decoration: none;
}

.cta img {
  display: block;
  height: 40px;
  width: auto;
}

.platform {
  font-size: 0.88rem;
  color: var(--muted);
}

/* —— Document pages (privacy, help) —— */

.doc {
  max-width: 32rem;
  padding: 2.75rem 0 2rem;
}

.doc-wide {
  max-width: 42rem;
}

.doc h1 {
  font-size: clamp(1.85rem, 4.5vw, 2.4rem);
  margin-bottom: 1.75rem;
}

.doc .lead {
  font-size: 1rem;
  margin-bottom: 1.75rem;
}

.doc h1 + .lead {
  margin-top: -0.75rem;
}

.updated {
  font-size: 0.8rem;
  color: var(--soft);
  margin-top: 1.5rem;
  font-variant-numeric: tabular-nums;
}

/* —— Doc content (help + privacy) —— */

.doc section {
  margin-bottom: 2.75rem;
}

.doc section > h2 {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-bottom: 0.4rem;
}

.section-lead {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 1.15rem;
}

.steps {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
  }
}

.step {
  padding: 1.1rem 1.15rem 1.15rem;
  border-radius: 16px;
  background: var(--glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.step .n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  color: var(--ink);
}

.step:nth-child(1) .n { background: var(--coral); }
.step:nth-child(2) .n { background: var(--green); }
.step:nth-child(3) .n { background: var(--blue); }

.step h3 {
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 0.4rem;
}

.step p {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
}

.options {
  display: grid;
  gap: 0.75rem;
}

.option {
  padding: 1.05rem 1.15rem 1.1rem;
  border-radius: 16px;
  background: var(--glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.option h3 {
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 0.4rem;
}

.option p {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--muted);
}

/* Matches in-app recent-color dismiss (SF Symbol xmark.circle.fill) */
.deleteme {
  display: inline-block;
  width: 1em;
  height: 1em;
  margin: 0 0.14em;
  vertical-align: -0.25em;
  overflow: visible;
  user-select: none;
  flex-shrink: 0;
}

.deleteme .deleteme-bg {
  fill: rgba(247, 245, 241, 0.42);
}

.deleteme .deleteme-x {
  fill: none;
  stroke: rgba(26, 28, 34, 0.72);
  stroke-width: 1.65;
  stroke-linecap: round;
}


.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 520;
  font-variant-numeric: tabular-nums;
  color: var(--paper);
  background: rgba(247, 245, 241, 0.1);
  padding: 0.1em 0.4em;
  border-radius: 5px;
  border: 1px solid rgba(247, 245, 241, 0.12);
}

.tips {
  display: grid;
  gap: 0.65rem;
}

.tip {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: var(--glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.tip .mark {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 2px;
  margin-top: 0.42rem;
  flex-shrink: 0;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 0 0 1px rgba(0, 0, 0, 0.15);
}

.tip:nth-child(3n + 1) .mark { background: var(--coral); }
.tip:nth-child(3n + 2) .mark { background: var(--green); }
.tip:nth-child(3n + 3) .mark { background: var(--blue); }

.tip h3 {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 0.3rem;
  line-height: 1.3;
}

.tip p {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
}

.path {
  display: inline;
  font-weight: 520;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}

code,
kbd {
  font-family: "SF Mono", SFMono-Regular, ui-monospace, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88em;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--paper);
  background: rgba(247, 245, 241, 0.1);
  padding: 0.1em 0.4em;
  border-radius: 5px;
  border: 1px solid rgba(247, 245, 241, 0.12);
}

.support {
  margin-top: 0.5rem;
  padding: 1.2rem 1.25rem;
  border-radius: 16px;
  background: rgba(247, 245, 241, 0.07);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.support h2 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.support p {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--muted);
}

.support a {
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid rgba(247, 245, 241, 0.35);
}

.support a:hover {
  border-bottom-color: var(--paper);
}

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

  .cta,
  .back,
  footer a {
    transition: none;
  }
}
