/* ============================================================
   Lattice Research — landing site
   Palette & type adapted from the LatticeWorks / Polipo
   visual style guide (Plus Jakarta Sans, sepia warmth,
   coral CTA, indigo accent, teal brand gem).
   ============================================================ */

:root {
  --bg:          #FBF6EE;   /* warm off-white page */
  --bg-warm:     #F3E9D8;   /* warmer alternating band */
  --surface:     #FFFFFF;   /* cards */
  --ink:         #1B1B1F;   /* headings */
  --body:        #5B554C;   /* body text */
  --muted:       #8C8175;   /* secondary text */
  --border:      #E8DECC;   /* warm hairline */

  --teal:        #2E9E78;   /* logo gem green */
  --teal-deep:   #1F7D5F;
  --teal-soft:   #E0F1E8;

  --accent:      #5650FF;   /* brand indigo */
  --accent-hover:#4944D2;

  --cta:         #FF906C;   /* brand coral */
  --cta-hover:   #DC6F4B;
  --cta-text:    #2A0D00;

  --ink-btn:     #1A1A18;

  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 8px rgba(40, 30, 10, 0.07);
  --shadow-md: 0 10px 30px rgba(40, 30, 10, 0.10), 0 2px 6px rgba(40,30,10,.05);
  --shadow-lg: 0 20px 50px rgba(40, 30, 10, 0.14);

  --t: 0.18s ease;
  --t-spring: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);

  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 { color: var(--ink); line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }
p  { font-size: 1.02rem; }

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

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal-deep);
  margin-bottom: 14px;
}

.hl { color: var(--teal-deep); }

/* ───────────── Buttons ───────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background var(--t), color var(--t), transform var(--t-spring), box-shadow var(--t);
}
.btn:hover { transform: translateY(-2px); }

.btn-cta {
  background: var(--cta);
  color: var(--cta-text);
  box-shadow: 0 4px 14px rgba(255, 144, 108, 0.4);
}
.btn-cta:hover { background: var(--cta-hover); color: #fff; box-shadow: 0 8px 22px rgba(255,144,108,.5); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}
.btn-ghost:hover { background: #fff; border-color: var(--teal); color: var(--teal-deep); }

.btn-lg { padding: 15px 30px; font-size: 1.05rem; }

/* ───────────── Header ───────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 246, 238, 0.82);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 70px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 34px; height: 34px; object-fit: contain; }
.brand-name { font-weight: 800; color: var(--ink); letter-spacing: -0.02em; font-size: 1.05rem; }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--body);
  transition: color var(--t);
}
.nav-links a:hover { color: var(--teal-deep); }
.site-header .btn-cta { margin-left: auto; padding: 9px 18px; font-size: 0.9rem; }

/* ───────────── Hero ───────────── */
.hero { padding: clamp(28px, 4vw, 48px) 0; }
.hero-grid {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  grid-template-areas:
    "copy form"
    "card form";
  gap: clamp(28px, 5vw, 56px) clamp(32px, 6vw, 72px);
  align-items: start;
}
.hero-copy  { grid-area: copy; align-self: center; }
.form-panel { grid-area: form; }
.hero-card  { grid-area: card; }
.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 30px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.hero-logo { width: 168px; height: 168px; object-fit: contain; filter: drop-shadow(0 12px 20px rgba(46,158,120,.25)); }
.hero-card-name { font-size: 1.3rem; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.hero-socials { display: flex; gap: 14px; margin-top: 4px; }
.hero-socials a {
  display: inline-flex;
  width: 42px; height: 42px;
  align-items: center; justify-content: center;
  border-radius: var(--radius-pill);
  background: var(--bg-warm);
  color: var(--ink);
  transition: background var(--t), color var(--t), transform var(--t-spring);
}
.hero-socials a:hover { background: var(--teal); color: #fff; transform: translateY(-2px) scale(1.05); }

.hero-copy h1 { margin-bottom: 14px; }
.lede { font-size: 1.1rem; color: var(--body); max-width: 38ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

.hero-card { max-width: 340px; }
.hero-card .hero-logo { width: 120px; height: 120px; }

/* ───────────── Demo request form ───────────── */
.form-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: clamp(22px, 3vw, 30px);
}
.form-panel h2 { margin-bottom: 6px; }
.form-intro { color: var(--body); margin-bottom: 18px; font-size: 0.98rem; }

/* Two-column form on wider screens — uses the horizontal space so the
   whole page fits one screen. Collapses to one column on phones. */
#demo-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 16px;
  row-gap: 14px;
  align-items: start;
}
.field { display: flex; flex-direction: column; }
.contact-field, .field-wide, .form-submit, .form-status { grid-column: 1 / -1; }
.contact-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field label, .contact-field legend {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
  margin-bottom: 6px;
}
.req { color: var(--cta-hover); }
.hint { font-weight: 500; font-size: 0.84rem; color: var(--muted); }
.field .hint { margin-top: 6px; }
.contact-field { border: 0; padding: 0; min-width: 0; }

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  font-family: var(--font);
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  width: 100%;
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
}
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, textarea:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}
textarea { resize: vertical; min-height: 72px; line-height: 1.55; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-submit { width: 100%; margin-top: 4px; }
.form-status { margin: 12px 0 0; font-size: 0.95rem; font-weight: 600; min-height: 1.2em; }
.form-status.ok { color: var(--teal-deep); }
.form-status.err { color: var(--cta-hover); }

/* ───────────── Sections ───────────── */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-warm { background: var(--bg-warm); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.centered { text-align: center; }

.mission { max-width: 880px; margin: 0 auto; text-align: center; }
.mission-text {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  line-height: 1.4;
  color: var(--ink);
  font-weight: 600;
}
.mission-text strong { color: var(--teal-deep); font-weight: 700; }

/* ───────────── Product ───────────── */
.product-single {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.product-single h2 { margin-bottom: 18px; }
.product-body {
  font-size: 1.18rem;
  line-height: 1.75;
  color: var(--body);
  margin-bottom: 30px;
}

.product-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(36px, 6vw, 64px);
  align-items: start;
}
.product-intro { position: sticky; top: 96px; }
.product-intro h2 { margin-bottom: 16px; }
.product-intro p { margin-bottom: 26px; color: var(--body); }

.feature-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-spring), box-shadow var(--t);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  background: var(--teal-soft);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}
.card h3 { margin-bottom: 8px; }
.card p { font-size: 0.96rem; color: var(--body); }

/* ───────────── Stats ───────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-num {
  display: block;
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  font-weight: 800;
  color: var(--teal-deep);
  letter-spacing: -0.03em;
  line-height: 1;
}
.stat-label { display: block; margin-top: 10px; color: var(--muted); font-size: 0.98rem; }

/* ───────────── CTA band ───────────── */
.cta-band {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  padding: clamp(56px, 8vw, 88px) 0;
}
.cta-inner { text-align: center; max-width: 680px; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.86); margin: 14px 0 30px; font-size: 1.1rem; }

/* ───────────── Footer ───────────── */
.site-footer { background: #1B1B1F; color: #cfc9bf; padding: 32px 0 20px; }
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-mark { width: 44px; height: 44px; object-fit: contain; }
.footer-brand .brand-name { color: #fff; font-size: 1.15rem; }
.footer-tagline { color: #9a9486; font-size: 0.95rem; }
.footer-contact { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-contact a { color: #cfc9bf; font-weight: 500; transition: color var(--t); }
.footer-contact a:hover { color: var(--cta); }
.footer-bottom { padding-top: 16px; font-size: 0.88rem; color: #8a8478; }

/* ───────────── Responsive ───────────── */
/* Stack to a single column: intro → form → brand card. */
@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "form"
      "card";
    gap: 28px;
  }
  .hero-copy { align-self: auto; }
  .lede { max-width: none; }
  .hero-card { max-width: 440px; width: 100%; margin: 0 auto; }
}

@media (max-width: 560px) {
  .container { padding: 0 18px; }
  .hero { padding: 24px 0 40px; }
  /* The form sits right below the header on phones, so the header CTA is
     redundant — hiding it also avoids the brand + button overflowing. */
  .site-header .btn-cta { display: none; }
  .form-panel { padding: 22px 18px; }
  #demo-form { grid-template-columns: 1fr; }
  .contact-inputs { grid-template-columns: 1fr; }
  .hero-card { padding: 28px 22px; }
  .hero-card .hero-logo { width: 104px; height: 104px; }
  .footer-grid { flex-direction: column; align-items: flex-start; gap: 16px; }
  .footer-contact { gap: 16px; }
}
