/* mYo - warm-scrapbook landing. Self-contained; no Tailwind/daisyUI dependency.
   Palette: cream paper + graphite ink + terracotta / amber accents, warm green
   for tags. Display serif (Fraunces) over Inter body. Polaroid-tilted photos. */

:root {
  --paper: #f7f1e6;
  --paper-2: #efe6d5;
  --card: #fffaf1;
  --ink: #2c2620;
  --ink-soft: #5b5142;
  --ink-faint: #8a7d69;
  --line: #e2d6c0;
  --terracotta: #c2603f;
  --terracotta-d: #a94f31;
  --amber: #e0a458;
  --sage: #6f8a5f;
  --sage-soft: #eef1e6;
  --tape: rgba(224, 164, 88, 0.42);
  --shadow-sm:
    0 1px 2px rgba(58, 44, 28, 0.06), 0 4px 12px rgba(58, 44, 28, 0.06);
  --shadow-md:
    0 6px 18px rgba(58, 44, 28, 0.1), 0 18px 40px rgba(58, 44, 28, 0.1);
  --radius: 14px;
  --radius-lg: 22px;
  --maxw: 1080px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

/* The [hidden] attribute must win over components that set their own display
   (e.g. .ea-success is display:flex) - otherwise the success panel shows on load. */
[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font-sans);
  color: var(--ink);
  background-color: var(--paper);
  /* Faint paper grain via layered radial dots. */
  background-image:
    radial-gradient(
      circle at 18% 12%,
      rgba(224, 164, 88, 0.06),
      transparent 42%
    ),
    radial-gradient(circle at 82% 8%, rgba(194, 96, 63, 0.05), transparent 40%),
    radial-gradient(rgba(120, 96, 60, 0.035) 1px, transparent 1px);
  background-size:
    auto,
    auto,
    22px 22px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* ---------- Typography ---------- */
h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.08;
  margin: 0;
  letter-spacing: -0.01em;
}
.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 0.75rem;
}
.section-title {
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
}
.section-lead {
  font-size: 1.06rem;
  color: var(--ink-soft);
  max-width: 44ch;
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  background: var(--btn-bg);
  color: var(--btn-fg);
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 0.18s var(--ease),
    box-shadow 0.18s var(--ease),
    background 0.18s var(--ease);
}
.btn svg {
  flex: none;
}
.btn--primary {
  --btn-bg: var(--terracotta);
  --btn-fg: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover {
  --btn-bg: var(--terracotta-d);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn--ghost {
  --btn-fg: var(--ink);
  border-color: var(--line);
  background: var(--card);
}
.btn--ghost:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.btn--soft {
  --btn-bg: var(--paper-2);
  --btn-fg: var(--ink);
}
.btn--soft:hover {
  --btn-bg: var(--line);
}
.btn--sm {
  font-size: 0.86rem;
  padding: 0.45rem 0.85rem;
}
.btn--lg {
  font-size: 1.04rem;
  padding: 0.85rem 1.4rem;
}

.focus-ring:focus-visible {
  outline: 3px solid rgba(194, 96, 63, 0.45);
  outline-offset: 2px;
  border-radius: 8px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1.25rem;
  max-width: var(--maxw);
  margin-inline: auto;
  backdrop-filter: saturate(1.4) blur(8px);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(247, 241, 230, 0.78);
  border-bottom: 1px solid var(--line);
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  font-weight: 700;
}
.logo-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(150deg, var(--terracotta), var(--amber));
  color: #fff;
  box-shadow: var(--shadow-sm);
  transform: rotate(-4deg);
}
.logo-word {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.logo-word b {
  color: var(--terracotta);
  font-weight: 600;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  transition:
    color 0.15s,
    background 0.15s;
}
.nav-link:hover {
  color: var(--ink);
  background: var(--paper-2);
}
/* On narrow screens the in-page anchors would overflow the header (pushing the
   whole document wider than the viewport); the page is short, so drop them and
   keep the logo + the "Get early access" button. */
@media (max-width: 700px) {
  .site-nav .nav-link {
    display: none;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(3.5rem, 7vw, 5.5rem);
}
.hero-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    120% 90% at 50% 0%,
    transparent 46%,
    rgba(247, 241, 230, 0.38) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 40rem;
  margin-inline: auto;
  text-align: center;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.25rem;
}
.chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage);
}
.hero-title {
  font-size: clamp(2.4rem, 6.4vw, 4.1rem);
  margin-bottom: 1.1rem;
}
.hero-title .accent {
  color: var(--terracotta);
  position: relative;
}
.hero-title .accent::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.06em;
  height: 0.28em;
  background: var(--tape);
  border-radius: 3px;
  z-index: -1;
  transform: rotate(-1deg);
}
.hero-sub {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 34ch;
  margin: 0 auto 1.9rem;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
}

/* ---------- Sections ---------- */
.section {
  padding: clamp(3rem, 6vw, 4.75rem) 0;
}
.section-head {
  max-width: 42rem;
  margin: 0 auto 2.5rem;
  text-align: center;
}
.section-head .section-lead {
  margin-inline: auto;
}
.rule {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--line) 15%,
    var(--line) 85%,
    transparent
  );
}

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* How it works */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.step {
  padding: 1.6rem 1.5rem;
  position: relative;
}
.step-num {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(150deg, var(--terracotta), var(--amber));
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
  transform: rotate(-3deg);
}
.step-title {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}
.step-body {
  color: var(--ink-soft);
  font-size: 0.98rem;
  margin: 0;
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
}
.feature {
  padding: 1.6rem 1.5rem;
}
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--sage-soft);
  color: var(--sage);
  margin-bottom: 1rem;
}
.feature-title {
  font-size: 1.22rem;
  margin-bottom: 0.45rem;
}
.feature-body {
  color: var(--ink-soft);
  font-size: 0.96rem;
  margin: 0;
}

/* Tech stack */
.stack-band {
  padding: 2rem 1.75rem;
  text-align: center;
}
.tag-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 0;
  margin: 1.5rem auto 0;
  justify-content: center;
  max-width: 40rem;
}
.tag-list li {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
}

/* Early-access form */
.ea-card {
  padding: clamp(1.75rem, 4vw, 2.75rem);
  max-width: 40rem;
  margin-inline: auto;
}
.ea-inner {
  text-align: center;
}
.ea-form {
  margin-top: 1.75rem;
  text-align: left;
}
.ea-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 560px) {
  .ea-fields {
    grid-template-columns: 1fr;
  }
}
.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.field-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.field-input {
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--ink);
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.field-input::placeholder {
  color: var(--ink-faint);
}
.field-input:focus {
  outline: none;
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(194, 96, 63, 0.15);
}
.field-input.is-invalid {
  border-color: #c0392b;
}
.field-error {
  color: #c0392b;
  font-size: 0.82rem;
  min-height: 1.1em;
  margin: 0;
}
.ea-form .btn {
  margin-top: 1.15rem;
  width: 100%;
  justify-content: center;
}
.ea-fineprint {
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.82rem;
  margin: 0.9rem 0 0;
}
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.ea-success {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: center;
  color: var(--sage);
  background: var(--sage-soft);
  border: 1px solid #d7e0c9;
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  margin-top: 0.5rem;
}
.ea-success p {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
  text-align: left;
}
.ea-repos {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--ink-faint);
}
.footer-link {
  color: var(--terracotta);
  font-weight: 600;
  text-decoration: none;
}
.footer-link:hover {
  text-decoration: underline;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Compact early-access strip directly under the hero. */
.ea-strip {
  padding: 1.5rem 0;
}
.ea-strip-inner {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem 1.75rem;
}
.ea-strip-copy {
  flex: 1 1 240px;
  min-width: 220px;
}
.ea-strip-copy .eyebrow {
  margin-bottom: 0.35rem;
}
.ea-strip-lead {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
  max-width: 34ch;
}
.ea-strip-form {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  flex: 2 1 380px;
  flex-wrap: wrap;
}
.ea-strip-form .field {
  flex: 1 1 150px;
  gap: 0.2rem;
}
/* Override the full-form's width:100%/margin-top so the strip button stays inline. */
.ea-strip-form .btn {
  flex: none;
  align-self: flex-start;
  width: auto;
  margin-top: 0;
  padding-top: 0.72rem;
  padding-bottom: 0.72rem;
}
.ea-strip-success {
  flex: 1 1 100%;
  margin-top: 0;
}
@media (max-width: 640px) {
  .ea-strip-form {
    flex-direction: column;
    align-items: stretch;
  }
  .ea-strip-form .btn {
    align-self: stretch;
    justify-content: center;
  }
}

/* Privacy highlight band. */
.privacy-band {
  padding: 2.5rem 1.75rem;
  text-align: center;
}
.privacy-band .chip {
  margin-bottom: 1.1rem;
}
.privacy-band .btn {
  margin-top: 1.5rem;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 2rem 0 3rem;
}
.site-footer .wrap {
  text-align: center;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
}
.footer-row p {
  margin: 0;
  color: var(--ink-faint);
  font-size: 0.9rem;
}
@media (max-width: 560px) {
  .footer-row {
    justify-content: center;
    text-align: center;
  }
}

/* ---------- Scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.6s var(--ease),
    transform 0.6s var(--ease);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
