/* ============================================================
   Mosaica — landing page styles
   ============================================================ */

:root {
  /* Grounds */
  --paper: #F4EFE3;
  --paper-2: #EDE5D4;
  --paper-3: #E7DDC8;
  --ink: #2A231D;
  --ink-2: #342B24;
  --ink-3: #41372E;

  /* Text */
  --text: #2A231D;
  --text-soft: #6E6153;
  --text-faint: #93857510;
  --on-ink: #F4EFE3;
  --on-ink-soft: #C4B6A2;

  /* Earthen tile palette (from logo) */
  --rust: #B0532E;
  --terracotta: #C2703B;
  --brick: #9B3B2C;
  --ochre: #C99A33;
  --gold: #D2A93E;
  --mustard: #BB8A2C;
  --sage: #7E8A63;
  --olive: #5F6A43;
  --slate: #4F6A78;
  --cream: #E2D7B8;
  --brown: #6E523C;
  --clay: #CC8A5A;

  /* Accent roles */
  --accent: #B0532E;        /* rust — primary */
  --accent-deep: #9B3B2C;   /* brick */
  --accent-cool: #4F6A78;   /* slate */

  --line: rgba(42, 35, 29, 0.12);
  --line-strong: rgba(42, 35, 29, 0.2);
  --line-ink: rgba(244, 239, 227, 0.14);

  --radius: 14px;
  --radius-lg: 26px;
  --shadow-sm: 0 1px 2px rgba(42, 35, 29, 0.06), 0 4px 14px rgba(42, 35, 29, 0.05);
  --shadow-md: 0 8px 30px rgba(42, 35, 29, 0.1);
  --shadow-lg: 0 30px 70px rgba(42, 35, 29, 0.18);

  --maxw: 1200px;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--paper);
  color: var(--text);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.06;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

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

.eyebrow {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 20px; height: 8px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 12px 0 0 var(--ochre), -12px 0 0 var(--slate);
  margin-left: 12px;
}

/* ----------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), background .25s, box-shadow .25s, color .25s, border-color .25s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--ink);
  color: var(--on-ink);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: #16110d; transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }

.btn-store {
  background: var(--ink);
  color: var(--on-ink);
  padding: 12px 22px 12px 18px;
  text-align: left;
  gap: 12px;
}
.btn-store:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-store small { display: block; font-size: 11px; font-weight: 500; opacity: .7; letter-spacing: .04em; line-height: 1; margin-bottom: 3px; }
.btn-store b { display: block; font-size: 17px; font-weight: 700; line-height: 1; }
.btn-store svg { width: 22px; height: 22px; flex: none; }

.on-ink .btn-primary { background: var(--paper); color: var(--ink); }
.on-ink .btn-primary:hover { background: #fff; }
.on-ink .btn-ghost { color: var(--on-ink); border-color: var(--line-ink); }
.on-ink .btn-ghost:hover { border-color: var(--on-ink); }
.on-ink .btn-store { background: var(--paper); color: var(--ink); }

/* ----------------------------------------------------------- nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 239, 227, 0.78);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.scrolled { border-bottom-color: var(--line); background: rgba(244, 239, 227, 0.92); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand img { height: 30px; width: auto; }
.brand .wordmark { font-family: var(--serif); font-size: 25px; font-weight: 600; letter-spacing: -0.01em; }
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a { font-size: 15px; font-weight: 500; color: var(--text-soft); transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; }

/* ----------------------------------------------------------- hero */
.hero { position: relative; padding: 64px 0 90px; overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 50px;
  align-items: center;
}
.hero-copy { max-width: 560px; }
.hero h1 {
  font-size: clamp(44px, 6vw, 78px);
  margin: 22px 0 0;
  font-weight: 500;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-sub {
  margin-top: 24px;
  font-size: 20px;
  color: var(--text-soft);
  max-width: 480px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-proof { display: flex; align-items: center; gap: 16px; margin-top: 30px; }
.proof-tiles { display: flex; }
.proof-tiles span {
  width: 34px; height: 34px; border-radius: 9px;
  border: 2px solid var(--paper);
  margin-left: -10px;
  box-shadow: var(--shadow-sm);
}
.proof-tiles span:first-child { margin-left: 0; }
.hero-proof p { font-size: 14.5px; color: var(--text-soft); }
.hero-proof b { color: var(--text); }

/* hero visual — phone + floating tiles */
.hero-visual { position: relative; display: flex; justify-content: center; align-items: center; min-height: 540px; }
.hero-glow {
  position: absolute; inset: -10% -20%;
  background: radial-gradient(50% 50% at 60% 45%, rgba(176,83,46,0.14), transparent 70%);
  z-index: 0;
}

.phone {
  position: relative;
  z-index: 2;
  width: 286px;
  height: 580px;
  background: var(--ink);
  border-radius: 44px;
  padding: 11px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,0,0,0.2);
}
.phone-screen {
  position: relative;
  width: 100%; height: 100%;
  background: var(--paper);
  border-radius: 34px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.phone-notch {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 96px; height: 26px; background: var(--ink); border-radius: 999px; z-index: 5;
}
.app-top {
  padding: 30px 20px 14px;
  display: flex; align-items: flex-end; justify-content: space-between;
}
.app-top h4 { font-family: var(--serif); font-size: 23px; font-weight: 600; }
.app-top span { font-size: 12px; color: var(--text-soft); font-weight: 600; }
.app-sub { padding: 0 20px 14px; font-size: 12.5px; color: var(--text-soft); }
.app-mosaic {
  flex: 1;
  padding: 0 16px 16px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 1fr;
  gap: 6px;
}
.app-mosaic .tile { border-radius: 7px; }
.app-bar {
  display: flex; justify-content: space-around; align-items: center;
  padding: 12px 0 22px; border-top: 1px solid var(--line);
}
.app-bar i {
  width: 22px; height: 22px; border-radius: 6px; background: var(--line-strong); display: block;
}
.app-bar i.on { background: var(--accent); }

/* floating decorative tiles */
.float-tile {
  position: absolute;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  z-index: 3;
}

/* ----------------------------------------------------------- generic tile */
.tile { display: block; }

/* ----------------------------------------------------------- section scaffolding */
section { position: relative; }
.section-pad { padding: 100px 0; }
.section-head { max-width: 680px; margin-bottom: 56px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(34px, 4.4vw, 52px); margin-top: 18px; }
.section-head p { margin-top: 20px; font-size: 19px; color: var(--text-soft); }

.ink-section { background: var(--ink); color: var(--on-ink); }
.ink-section .section-head p { color: var(--on-ink-soft); }
.ink-section .eyebrow { color: var(--gold); }
.ink-section .eyebrow::before { background: var(--gold); box-shadow: 12px 0 0 var(--clay), -12px 0 0 var(--sage); }

/* ----------------------------------------------------------- features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.feature {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 26px 32px;
  box-shadow: var(--shadow-sm);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s;
}
.feature:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.feature-icon {
  width: 56px; height: 56px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
  margin-bottom: 22px;
}
.feature-icon span { border-radius: 4px; }
.feature h3 { font-size: 22px; margin-bottom: 10px; }
.feature p { font-size: 16px; color: var(--text-soft); }

/* ----------------------------------------------------------- how it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }
.step { position: relative; }
.step-num {
  font-family: var(--serif);
  font-size: 15px; font-weight: 600;
  color: var(--gold);
  letter-spacing: .12em;
  display: inline-block;
  white-space: nowrap;
  margin-bottom: 20px;
}
.step-art {
  height: 168px;
  border-radius: var(--radius);
  background: var(--ink-2);
  border: 1px solid var(--line-ink);
  margin-bottom: 24px;
  display: grid;
  align-content: center;
  justify-content: center;
  gap: 7px;
  padding: 22px;
  overflow: hidden;
}
.step-art span { width: 22px; height: 22px; border-radius: 6px; }
.step h3 { font-size: 24px; color: var(--on-ink); margin-bottom: 10px; }
.step p { font-size: 16px; color: var(--on-ink-soft); }

/* ----------------------------------------------------------- showcase */
.showcase-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 54px; align-items: center; }
.wall {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 7px;
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.wall .tile { aspect-ratio: 1; border-radius: 6px; }
.showcase-copy h2 { font-size: clamp(32px, 4vw, 48px); margin-top: 16px; }
.showcase-copy p { margin-top: 20px; color: var(--text-soft); font-size: 18px; }
.showcase-stats { display: flex; gap: 40px; margin-top: 36px; }
.stat .n { font-family: var(--serif); font-size: 42px; font-weight: 600; color: var(--accent); line-height: 1; }
.stat .l { font-size: 14px; color: var(--text-soft); margin-top: 8px; }

/* ----------------------------------------------------------- testimonials */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.quote {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 30px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.quote .mark { font-family: var(--serif); font-size: 56px; line-height: .6; color: var(--gold); height: 30px; }
.quote p { font-family: var(--serif); font-size: 21px; line-height: 1.4; margin: 10px 0 24px; }
.quote .by { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.quote .av { width: 42px; height: 42px; border-radius: 11px; flex: none; }
.quote .by b { display: block; font-size: 15px; }
.quote .by small { font-size: 13px; color: var(--text-soft); }

/* ----------------------------------------------------------- faq */
.faq { max-width: 800px; margin-inline: auto; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%;
  background: none; border: none; cursor: pointer;
  font-family: var(--serif); font-size: 22px; font-weight: 500; color: var(--text);
  text-align: left;
  padding: 26px 44px 26px 0;
  position: relative;
  display: flex; align-items: center;
}
.faq-q::after {
  content: ""; position: absolute; right: 4px; top: 50%;
  width: 14px; height: 14px;
  background:
    linear-gradient(var(--accent), var(--accent)) center/14px 2.5px no-repeat,
    linear-gradient(var(--accent), var(--accent)) center/2.5px 14px no-repeat;
  transform: translateY(-50%) rotate(0deg);
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.faq-item.open .faq-q::after { transform: translateY(-50%) rotate(135deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .4s ease; }
.faq-a p { padding: 0 44px 28px 0; color: var(--text-soft); font-size: 17px; }

/* ----------------------------------------------------------- final cta */
.cta-final { text-align: center; overflow: hidden; }
.cta-final .mark-big { width: 86px; height: 86px; margin: 0 auto 30px; }
.cta-final h2 { font-size: clamp(38px, 5.5vw, 70px); }
.cta-final p { margin: 22px auto 0; max-width: 520px; color: var(--on-ink-soft); font-size: 20px; }
.cta-actions { display: flex; gap: 14px; justify-content: center; margin-top: 38px; flex-wrap: wrap; }

/* ----------------------------------------------------------- contact form */
.contact-form-wrap {
  max-width: 720px;
  margin-inline: auto;
}
.contact-form {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 44px 44px 40px;
  box-shadow: var(--shadow-md);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 0;
}
.form-group + .form-group { margin-bottom: 20px; }
.contact-form > .form-group { margin-bottom: 20px; }
.contact-form label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: .02em;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  font-family: var(--sans);
  font-size: 16px;
  color: var(--text);
  background: var(--paper-2);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 12px 16px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--text-soft); opacity: .6; }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(176,83,46,.12);
}
.contact-form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236E6153' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  cursor: pointer;
}
.contact-form textarea { resize: vertical; min-height: 130px; }
.form-footer {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.form-note { font-size: 14px; color: var(--text-soft); margin: 0; }
.form-success {
  text-align: center;
  padding: 30px 0 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.form-error-banner {
  background: rgba(155,59,44,.08);
  border: 1px solid rgba(155,59,44,.2);
  border-radius: var(--radius);
  padding: 12px 18px;
  color: var(--brick);
  font-size: 15px;
  margin-bottom: 18px;
}
.field-error {
  font-size: 13px;
  color: var(--brick);
  min-height: 18px;
  display: block;
}
.contact-form input[aria-invalid="true"],
.contact-form select[aria-invalid="true"],
.contact-form textarea[aria-invalid="true"] {
  border-color: var(--brick);
}
.success-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--sage);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 640px) {
  .contact-form { padding: 28px 22px 26px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .form-row .form-group { margin-bottom: 20px; }
}

/* ----------------------------------------------------------- footer */
.footer { background: var(--ink); color: var(--on-ink-soft); padding: 70px 0 40px; border-top: 1px solid var(--line-ink); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer .brand .wordmark { color: var(--on-ink); }
.footer-about { margin-top: 18px; font-size: 15px; max-width: 280px; }
.footer-col h5 { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--on-ink); margin: 0 0 18px; font-weight: 700; font-family: var(--sans); }
.footer-col a { display: block; font-size: 15px; margin-bottom: 12px; color: var(--on-ink-soft); transition: color .2s; }
.footer-col a:hover { color: var(--on-ink); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
  margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line-ink);
  font-size: 13.5px;
}

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(4deg); }
}

/* ----------------------------------------------------------- reveal animation
   NOTE: never animate opacity from 0 as the resting hidden state — some capture
   harnesses freeze the animation clock at frame 0, which would render content
   blank. Transform-only keeps elements fully visible (just offset) at all times. */
.reveal { transform: translateY(26px); transition: transform .75s cubic-bezier(.2,.8,.2,1); }
.reveal.in { transform: none; }
[data-delay="1"] { transition-delay: .08s; }
[data-delay="2"] { transition-delay: .16s; }
[data-delay="3"] { transition-delay: .24s; }
[data-delay="4"] { transition-delay: .32s; }

/* tile pop-in (hero/app) — scale only, stays visible */
.tile.pop { transform: scale(.55); }
.tile.pop.in { transform: none; transition: transform .55s cubic-bezier(.2,1.3,.4,1); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .tile.pop { transform: none !important; transition: none !important; }
  .float-tile { animation: none !important; }
}

/* ----------------------------------------------------------- responsive */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-visual { min-height: 480px; order: 2; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; gap: 30px; max-width: 460px; }
  .showcase-grid { grid-template-columns: 1fr; gap: 36px; }
  .quotes { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 34px; }
}

@media (max-width: 640px) {
  body { font-size: 17px; }
  .wrap { padding-inline: 20px; }
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .section-pad { padding: 72px 0; }
  .features-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1; }
  .showcase-stats { gap: 26px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
