/* Rigley marketing site — design tokens from prototype/design_handoff_rigley_core.
   Clay (--clay) is reserved exclusively for the Escalate mockup. Do not reuse it. */

:root {
  --paper: #F4F0E7;
  --surface: #FCFAF4;
  --surface-alt: #F1ECE1;
  --spruce: #2E5249;
  --spruce-tint: #EAF1EC;
  --spruce-on-tint: #33493F;
  --ember: #D8893C;
  --ember-tint: #F8EBDA;
  --clay: #C0492F;
  --clay-tint: #FBE7DF;
  --clay-ink: #7A2E1C;
  --sage: #7E9A6F;
  --sage-label: #5F7A52;
  --sage-tint: #EDF1E8;
  --water: #5E86A8;
  --ink: #2A2520;
  --ink-muted: #6B6358;
  --ink-soft: #7A7163;
  --hint: #9A8E7B;
  --hairline: #E8E1D4;
  --hairline-2: #E4DDD0;

  --serif: 'Newsreader', Georgia, serif;
  --sans: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  --shadow-card: 0 1px 2px rgba(40,30,20,.04);
  --shadow-spruce: 0 6px 18px rgba(46,82,73,.22);
  --shadow-ember: 0 2px 8px rgba(216,137,60,.32);
  --shadow-clay: 0 6px 20px rgba(192,73,47,.18);
  --shadow-phone: 0 24px 60px rgba(40,30,20,.18);

  --maxw: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }
body { overflow-x: hidden; max-width: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--spruce); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--ink); margin: 0; line-height: 1.12; overflow-wrap: break-word; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--hint);
  margin: 0 0 14px;
}

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

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 26px; border-radius: 13px; border: none;
  font-family: var(--sans); font-size: 16px; font-weight: 600; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-ember { background: var(--ember); color: #fff; box-shadow: var(--shadow-ember); }
.btn-ember:hover { background: #cd7e31; }
.btn-spruce { background: var(--spruce); color: #fff; box-shadow: var(--shadow-spruce); }
.btn-ghost { background: transparent; color: #5B5248; border: 1px solid #DAD2C3; height: 48px; font-weight: 500; font-size: 14.5px; }
.btn-block { width: 100%; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244,240,231,.86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand:hover { text-decoration: none; }
.brand .mark { width: 32px; height: 32px; border-radius: 9px; display: block; }
.brand .wordmark { font-family: var(--serif); font-size: 21px; font-weight: 600; color: var(--ink); }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { color: var(--ink-muted); font-size: 14.5px; font-weight: 500; }
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav .btn { height: 40px; padding: 0 18px; font-size: 14.5px; border-radius: 11px; }
.nav-toggle { display: none; }

/* ---------- sections ---------- */
section { padding: 84px 0; }
.section-tint { background: var(--surface); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.section-spruce { background: var(--spruce); color: #F4F0E7; }
.section-head { max-width: 640px; margin: 0 auto 52px; text-align: center; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); }
.section-head p { color: var(--ink-muted); font-size: 18px; margin: 16px 0 0; }
.section-spruce .section-head p { color: rgba(244,240,231,.78); }

/* ---------- hero ---------- */
.hero { padding: 72px 0 64px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(36px, 5.4vw, 60px); letter-spacing: -0.01em; }
.hero .lede { font-size: 19px; color: var(--ink-muted); margin: 22px 0 30px; max-width: 30em; }
.hero .cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero .reassure { margin-top: 18px; font-size: 13.5px; color: var(--ink-soft); }
.hero-art { display: flex; justify-content: center; }

/* ---------- phone frame ---------- */
.phone {
  width: 332px; background: #14110e; border-radius: 50px; padding: 13px;
  box-shadow: var(--shadow-phone); flex-shrink: 0;
}
.phone-screen {
  background: var(--paper); border-radius: 38px; overflow: hidden; position: relative;
  aspect-ratio: 9 / 19.3; display: flex; flex-direction: column;
}
.phone-island {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  width: 98px; height: 27px; background: #0c0a08; border-radius: 16px; z-index: 6;
}
.phone-status { display: flex; align-items: center; justify-content: space-between; padding: 13px 26px 0; font-size: 12px; font-weight: 700; color: var(--ink); position: relative; z-index: 5; }
.phone-status .sb-right { display: flex; align-items: center; gap: 5px; }
.phone-pad { flex: 1 1 auto; padding: 8px 16px 0; overflow: hidden; }

/* ---------- in-app mockup primitives (matches the real home screen) ---------- */
.app-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-top: 8px; }
.app-greeting .hi { font-family: var(--serif); font-size: 15px; font-weight: 400; color: var(--ink-muted); }
.app-greeting .ready { font-family: var(--serif); font-size: 21px; font-weight: 600; color: var(--ink); line-height: 1.12; margin-top: 1px; }
.app-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--spruce-tint); color: var(--spruce-on-tint); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

.rig-card { margin: 13px 0; background: var(--spruce); color: #fff; border-radius: 16px; padding: 15px 16px; box-shadow: var(--shadow-spruce); }
.rig-card .rig-name { font-family: var(--serif); font-size: 20px; font-weight: 600; }
.rig-card .rig-spec { font-size: 11.5px; color: rgba(244,240,231,.74); margin-top: 3px; }

.ask-card { background: var(--surface); border: 1px solid var(--hairline); border-radius: 16px; padding: 14px; box-shadow: var(--shadow-card); }
.ask-card .ask-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ask-card .ask-title { display: flex; align-items: center; gap: 7px; font-family: var(--serif); font-size: 16px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.ask-card .ask-flame { width: 16px; height: 18px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ask-card .ask-meter { font-family: var(--mono); font-size: 9px; color: var(--hint); text-align: right; padding-left: 8px; }
.ask-field2 { display: flex; align-items: center; gap: 8px; background: var(--surface-alt); border: 1px solid var(--hairline-2); border-radius: 12px; padding: 7px 7px 7px 13px; }
.ask-field2 .ph { flex: 1; font-size: 12.5px; color: var(--ink-soft); }
.ask-field2 .send { width: 28px; height: 28px; border-radius: 50%; background: var(--ember); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ask-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.ask-chip { background: var(--ember-tint); color: #a9621f; font-size: 11.5px; font-weight: 500; padding: 7px 12px; border-radius: 100px; }

.sys-head { margin: 16px 2px 10px; }
.sys-head .h { font-family: var(--serif); font-size: 18px; font-weight: 600; color: var(--ink); }
.sys-head .sub { font-size: 12px; color: var(--ink-muted); margin-top: 2px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.tile { background: var(--surface); border: 1px solid var(--hairline); border-radius: 14px; padding: 14px 8px; display: flex; flex-direction: column; align-items: center; gap: 9px; box-shadow: var(--shadow-card); }
.tile .ic { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.tile .nm { font-size: 11.5px; font-weight: 600; color: var(--ink); }

.phone-tabbar { display: flex; justify-content: space-around; align-items: flex-start; background: var(--surface); border-top: 1px solid var(--hairline); padding: 9px 14px 18px; position: relative; }
.phone-tabbar::after { content: ""; position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); width: 100px; height: 4px; border-radius: 2px; background: rgba(40,30,20,.26); }
.phone-tab { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 10px; font-weight: 600; color: var(--hint); }
.phone-tab.active { color: var(--spruce); }
.phone-tab.is-ask { color: var(--ember); }
.phone-tab .tab-ic { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; }

/* chat */
.chat-row { display: flex; gap: 9px; margin-bottom: 12px; }
.flame-av { width: 28px; height: 28px; border-radius: 50%; background: var(--ember); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.bubble-rig { flex: 1; background: var(--surface); border: 1px solid var(--hairline); border-radius: 4px 15px 15px 15px; padding: 12px 14px; }
.bubble-rig .voice { font-family: var(--serif); font-size: 15px; line-height: 1.46; color: var(--ink); }
.bubble-rig .voice strong { font-weight: 600; }
.chat-row.user { justify-content: flex-end; }
.bubble-user { max-width: 82%; background: #E8E1D3; border-radius: 15px 15px 4px 15px; padding: 10px 13px; font-size: 13.5px; color: var(--ink); line-height: 1.4; }
.zone-tag { display: inline-block; font-family: var(--mono); font-size: 9px; letter-spacing: .07em; padding: 3px 7px; border-radius: 5px; margin-bottom: 8px; }
.zone-op { color: var(--spruce); background: var(--spruce-tint); }
.zone-ts { color: var(--sage-label); background: var(--sage-tint); }
.citation { display: inline-flex; align-items: center; gap: 6px; background: var(--paper); border: 1px solid var(--hairline-2); padding: 5px 9px; border-radius: 7px; margin-top: 10px; }
.citation span { font-family: var(--mono); font-size: 10px; color: #8A7D63; }

/* escalate — the only place clay appears */
.escalate { background: var(--clay-tint); border: 1.5px solid #E3A593; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-clay); }
.escalate .esc-head { background: var(--clay); padding: 12px 15px; display: flex; align-items: center; gap: 10px; }
.escalate .esc-head .t { font-family: var(--serif); font-size: 17px; font-weight: 600; color: #fff; }
.escalate .esc-body { padding: 13px 15px 15px; }
.escalate .esc-body p { font-size: 13px; color: var(--clay-ink); line-height: 1.45; margin: 0 0 10px; }
.esc-step { display: flex; gap: 9px; align-items: flex-start; margin-bottom: 8px; }
.esc-step .n { width: 18px; height: 18px; flex-shrink: 0; border-radius: 50%; background: var(--clay); color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.esc-step .x { font-size: 12.5px; color: var(--clay-ink); line-height: 1.4; }

/* safe checks (troubleshoot) */
.check { display: flex; gap: 10px; margin-bottom: 11px; }
.check .box { width: 18px; height: 18px; flex-shrink: 0; border-radius: 5px; border: 1.6px solid #B7C2AC; margin-top: 1px; }
.check .x { font-size: 13px; color: #3E382F; line-height: 1.42; }
.check .x strong { font-weight: 600; }

/* ---------- feature grid ---------- */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.feature { background: var(--surface); border: 1px solid var(--hairline); border-radius: 18px; padding: 26px; box-shadow: var(--shadow-card); }
.feature .ic-badge { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.feature h3 { font-size: 22px; }
.feature p { color: var(--ink-muted); font-size: 15.5px; margin: 10px 0 0; }
.feature .mini { margin-top: 20px; }

/* ---------- how it works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { text-align: center; }
.step .num { font-family: var(--mono); font-size: 12px; color: var(--ember); font-weight: 500; letter-spacing: .1em; }
.step h3 { font-size: 20px; margin: 10px 0 8px; }
.step p { color: var(--ink-muted); font-size: 15px; margin: 0; }

/* ---------- beta form ---------- */
.beta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.beta-copy h2 { font-size: clamp(28px, 4vw, 40px); color: #fff; }
.beta-copy p { color: rgba(244,240,231,.82); font-size: 17px; margin: 16px 0 0; }
.beta-copy ul { list-style: none; padding: 0; margin: 22px 0 0; }
.beta-copy li { padding: 6px 0 6px 26px; position: relative; color: rgba(244,240,231,.9); font-size: 15px; }
.beta-copy li::before { content: ""; position: absolute; left: 0; top: 12px; width: 12px; height: 12px; border-radius: 50%; background: var(--ember); }

.card-form { background: var(--surface); border-radius: 20px; padding: 28px; box-shadow: 0 18px 50px rgba(20,34,30,.34); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-muted); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--hairline-2); background: var(--surface-alt); border-radius: 11px;
  padding: 13px 14px; font-family: var(--sans); font-size: 15px; color: var(--ink);
  appearance: none; -webkit-appearance: none;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ember); background: #fff; box-shadow: 0 0 0 3px rgba(216,137,60,.16); }
.field select { background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B6358' stroke-width='1.6' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.field .errors { color: var(--clay); font-size: 12.5px; margin-top: 5px; list-style: none; padding: 0; }
.form-foot { font-size: 12.5px; color: var(--ink-soft); margin-top: 14px; text-align: center; }
.form-foot a { color: var(--ink-muted); text-decoration: underline; }

.flash { background: var(--spruce-tint); border: 1px solid #CADBCF; color: var(--spruce-on-tint); border-radius: 12px; padding: 16px 18px; margin-bottom: 18px; font-size: 14.5px; }
.flash strong { display: block; font-family: var(--serif); font-size: 17px; margin-bottom: 3px; }

/* ---------- problem band ---------- */
.problem { text-align: center; }
.problem .wrap { max-width: 760px; }
.problem h2 { font-size: clamp(26px, 3.6vw, 36px); }
.problem p { font-size: 19px; color: var(--ink-muted); margin: 20px 0 0; line-height: 1.6; }

/* ---------- legal / support pages ---------- */
.page { padding: 64px 0 90px; }
.page .wrap { max-width: 760px; }
.page h1 { font-size: clamp(32px, 5vw, 46px); }
.page .updated { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--hint); margin: 12px 0 28px; }
.page h2 { font-size: 22px; margin: 34px 0 10px; }
.page p { color: var(--ink-muted); font-size: 16px; }
.draft-banner { background: var(--ember-tint); border: 1px solid #EAC79B; border-radius: 12px; padding: 14px 18px; font-size: 14px; color: #7c5827; margin-bottom: 30px; }
.support-grid { display: grid; grid-template-columns: 1fr 360px; gap: 48px; align-items: start; }
.support-aside { background: var(--surface); border: 1px solid var(--hairline); border-radius: 16px; padding: 24px; }
.support-aside h3 { font-size: 18px; }
.support-aside p { font-size: 14.5px; margin: 8px 0 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--hairline); padding: 44px 0; }
.site-footer .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; }
.site-footer .brand .wordmark { font-size: 18px; }
.foot-links { display: flex; gap: 24px; flex-wrap: wrap; }
.foot-links a { color: var(--ink-muted); font-size: 14px; }
.foot-meta { width: 100%; color: var(--ink-soft); font-size: 12.5px; border-top: 1px solid var(--hairline); padding-top: 18px; margin-top: 4px; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  section { padding: 60px 0; }
  .hero { padding: 48px 0; }
  .hero .wrap { grid-template-columns: 1fr; gap: 44px; }
  .hero h1 { font-size: clamp(28px, 7.4vw, 38px); }
  .hero-art { order: -1; }
  .features { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 30px; }
  .beta-grid { grid-template-columns: 1fr; gap: 30px; }
  .support-grid { grid-template-columns: 1fr; }
  .nav a:not(.btn) { display: none; }
}

@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .brand .wordmark { font-size: 19px; }
  .nav .btn { padding: 0 14px; font-size: 14px; }
  .phone { width: 280px; }
}
