:root {
  /* Brand — pulled from the app icon */
  --orange: #FF9B69;
  --orange-soft: #FFB388;
  --orange-deep: #E87C46;
  --orange-darkest: #8C3D17;

  /* Surfaces */
  --bg: #FAFAF7;
  --bg-warm: #FFF6EE;
  --surface: #FFFFFF;
  --surface-soft: #F4F2EC;

  /* Ink */
  --ink: #0A0A0A;
  --ink-2: #2A2A28;
  --ink-3: #6B6B66;
  --ink-4: #9B9B95;
  --rule: rgba(10, 10, 10, 0.08);
  --rule-strong: rgba(10, 10, 10, 0.14);

  /* Semantic */
  --success: #16A34A;
  --success-bg: #ECFDF3;
  --danger: #DC2626;
  --danger-bg: #FEF2F2;

  /* Type */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;

  /* Layout */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 1px 2px rgba(10, 10, 10, 0.04);
  --shadow: 0 4px 20px rgba(10, 10, 10, 0.06);
  --shadow-lg: 0 24px 60px rgba(232, 124, 70, 0.12), 0 8px 24px rgba(10, 10, 10, 0.06);
}

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

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11', 'ss01';
  letter-spacing: -0.01em;
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

/* Ambient blob behind hero */
.ambient {
  position: absolute;
  top: -200px;
  right: -150px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(255, 155, 105, 0.5) 0%, rgba(255, 179, 136, 0.2) 35%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

/* Header */
.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  overflow: hidden;
  background: var(--orange);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.brand-icon img,
.brand-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-icon.small {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.brand-sub {
  font-size: 0.78rem;
  color: var(--ink-3);
  font-weight: 500;
}

.site-nav {
  display: flex;
  gap: 0.5rem;
}

.site-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-2);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  transition: background 0.18s ease, color 0.18s ease;
}

.site-nav a:hover {
  background: rgba(10, 10, 10, 0.05);
  color: var(--ink);
}

main {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
  box-sizing: border-box;
}

/* Hero */
.hero {
  padding: 3.5rem 0 5rem;
  max-width: 760px;
}

.hero h1 {
  font-size: clamp(2.5rem, 6.5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin-bottom: 1.25rem;
  color: var(--ink);
}

.gradient-text {
  background: linear-gradient(135deg, var(--orange-deep) 0%, var(--orange) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.lede {
  font-size: 1.2rem;
  color: var(--ink-3);
  margin-bottom: 2rem;
  max-width: 600px;
  line-height: 1.5;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 1px 2px rgba(10, 10, 10, 0.1), 0 4px 14px rgba(10, 10, 10, 0.15);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(10, 10, 10, 0.12), 0 8px 24px rgba(10, 10, 10, 0.18);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-2);
  border: 1px solid var(--rule-strong);
}

.btn-ghost:hover {
  background: rgba(10, 10, 10, 0.04);
  color: var(--ink);
}

.btn-large {
  padding: 1.1rem 2rem;
  font-size: 1rem;
}

/* Section tags */
.section-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--orange-deep);
  background: var(--bg-warm);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

/* Form section */
.form-section {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-xl);
  padding: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 5rem;
  box-shadow: var(--shadow);
  position: relative;
  scroll-margin-top: 2rem;
}

.form-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.form-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
  color: var(--ink);
}

.form-header p {
  color: var(--ink-3);
  font-size: 1.05rem;
  max-width: 460px;
  margin: 0 auto;
}

/* Fieldsets */
fieldset {
  border: none;
  padding: 0;
  margin-bottom: 2.25rem;
  padding-bottom: 2.25rem;
  border-bottom: 1px solid var(--rule);
}

fieldset:last-of-type {
  border-bottom: none;
  margin-bottom: 1.5rem;
  padding-bottom: 0;
}

legend {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 1.25rem;
  letter-spacing: -0.015em;
}

/* Rows */
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.row.three { grid-template-columns: 1fr 1fr 1fr; }

@media (max-width: 600px) {
  .row, .row.three { grid-template-columns: 1fr; }
}

.field {
  margin-bottom: 1.1rem;
  display: flex;
  flex-direction: column;
}

.field label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
  letter-spacing: -0.005em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.optional, .req {
  font-weight: 500;
  font-size: 0.72rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
}

.optional {
  background: var(--surface-soft);
  color: var(--ink-3);
}

.req {
  background: var(--bg-warm);
  color: var(--orange-deep);
}

.field small {
  font-size: 0.82rem;
  color: var(--ink-3);
  margin-top: 0.4rem;
}

/* Inputs */
input[type="text"],
input[type="email"],
input[type="url"],
select,
textarea {
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  width: 100%;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  letter-spacing: -0.005em;
}

input::placeholder, textarea::placeholder {
  color: var(--ink-4);
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--rule-strong);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 155, 105, 0.18);
}

textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.55;
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%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='%236B6B66' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.75rem;
}

input.invalid,
select.invalid,
textarea.invalid {
  border-color: var(--danger);
  background: var(--danger-bg);
}

/* Type cards (radio) */
.type-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  margin-top: 0.25rem;
  align-items: stretch;
}

.type-card {
  position: relative;
  cursor: pointer;
  display: flex;
}

.type-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.type-card-inner {
  background: var(--surface);
  border: 1.5px solid var(--rule);
  border-radius: var(--radius);
  padding: 1rem 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  gap: 0.35rem;
  width: 100%;
  min-height: 130px;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.type-card:hover .type-card-inner {
  border-color: var(--rule-strong);
  transform: translateY(-1px);
}

.type-card input:checked + .type-card-inner {
  border-color: var(--orange);
  background: var(--bg-warm);
  box-shadow: 0 0 0 4px rgba(255, 155, 105, 0.15);
  transform: translateY(0);
}

.type-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.type-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
}

.type-desc {
  font-size: 0.78rem;
  color: var(--ink-3);
  line-height: 1.35;
  text-wrap: balance;
}

/* Submit */
.submit-row {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

.submit-note {
  margin-top: 0.85rem;
  font-size: 0.85rem;
  color: var(--ink-3);
}

/* Status messages */
.form-status {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.92rem;
  text-align: center;
  display: none;
  font-weight: 500;
}

.form-status.success {
  display: block;
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(22, 163, 74, 0.2);
}

.form-status.error {
  display: block;
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

/* FAQ */
.faq-section {
  margin-bottom: 4rem;
  text-align: center;
}

.faq-section h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 0.85rem;
  color: var(--ink);
}

.faq-intro {
  font-size: 1.05rem;
  color: var(--ink-3);
  max-width: 540px;
  margin: 0 auto 2.5rem;
  line-height: 1.55;
}

.faq-grid {
  display: grid;
  gap: 0.65rem;
  max-width: 760px;
  margin: 0 auto;
  text-align: left;
}

/* Group headings inside the FAQ */
.faq-group {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--orange-deep);
  margin: 1.25rem 0 0.35rem;
  padding-left: 0.25rem;
}

.faq-group:first-child {
  margin-top: 0;
}

/* "Didn't find it? Send a message" bridge between FAQ and form */
.faq-bridge {
  margin-top: 2.5rem;
  padding: 2rem 1.5rem;
  background: var(--bg-warm);
  border: 1px solid rgba(255, 155, 105, 0.25);
  border-radius: var(--radius-lg);
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.faq-bridge p {
  font-size: 1.05rem;
  color: var(--ink-2);
  margin-bottom: 1rem;
  font-weight: 500;
}

details {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 0 1.5rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

details:hover {
  border-color: var(--rule-strong);
}

details[open] {
  border-color: var(--orange-soft);
  box-shadow: var(--shadow-sm);
}

details summary {
  font-size: 1.02rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  color: var(--ink);
}

details summary::-webkit-details-marker { display: none; }

.chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-soft);
  flex-shrink: 0;
  transition: transform 0.25s ease, background 0.2s ease;
  position: relative;
}

.chevron::before {
  content: '';
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--ink-2);
  border-bottom: 2px solid var(--ink-2);
  transform: rotate(45deg);
  margin-top: -3px;
  transition: transform 0.25s ease;
}

details[open] .chevron {
  background: var(--orange);
}

details[open] .chevron::before {
  transform: rotate(-135deg);
  margin-top: 3px;
}

details p {
  padding: 0 0 1.5rem;
  color: var(--ink-3);
  font-size: 0.95rem;
  line-height: 1.6;
}

details a {
  color: var(--orange-deep);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1.5px solid rgba(232, 124, 70, 0.3);
}

details a:hover {
  border-color: var(--orange-deep);
}

/* Footer */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--rule);
  background: var(--surface);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.footer-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.footer-sub {
  font-size: 0.82rem;
  color: var(--ink-3);
  margin-top: 0.1rem;
}

.footer-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--ink-3);
}

@media (max-width: 600px) {
  .footer-meta { align-items: flex-start; }
}

.footer-meta a {
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 500;
}

.footer-meta a:hover { color: var(--orange-deep); }

/* Reveal animation */
@media (prefers-reduced-motion: no-preference) {
  .hero, .form-section, .faq-section {
    animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) backwards;
  }
  .hero { animation-delay: 0.05s; }
  .faq-section { animation-delay: 0.15s; }
  .form-section { animation-delay: 0.25s; }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Selection */
::selection {
  background: var(--orange);
  color: var(--ink);
}

/* ─── Mobile optimization ─────────────────────────────────────────── */

/* iPad and smaller tablets */
@media (max-width: 900px) {
  main { padding: 0 1.5rem; }
  .site-header { padding: 1rem 1.5rem; }
  .form-section { padding: 2rem 1.5rem; }
  .hero { padding: 2.5rem 0 3.5rem; }
  .footer-inner { padding: 2rem 1.5rem; }
}

/* iPhone and small phones — comprehensive overrides */
@media (max-width: 640px) {
  /* Tighter overall spacing */
  main { padding: 0 1rem; }
  .site-header { padding: 0.85rem 1rem; }

  /* Header: keep brand visible but tighten nav */
  .brand-icon { width: 38px; height: 38px; border-radius: 9px; }
  .brand-name { font-size: 0.92rem; }
  .brand-sub { font-size: 0.72rem; }
  .site-nav { gap: 0.25rem; }
  .site-nav a { padding: 0.4rem 0.75rem; font-size: 0.85rem; }

  /* Hero scales down */
  .hero { padding: 1.5rem 0 2.5rem; }
  .hero h1 {
    font-size: 2.4rem;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 0.85rem;
  }
  .lede {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
    margin-bottom: 0;
  }
  .hero-actions .btn {
    justify-content: center;
    width: 100%;
    padding: 0.95rem 1.5rem;
  }

  /* Form section: tighter padding, smaller radius */
  .form-section {
    padding: 1.75rem 1.25rem;
    margin-bottom: 3rem;
    border-radius: 20px;
  }
  .form-header { margin-bottom: 1.75rem; }
  .form-header h2 {
    font-size: 1.55rem;
    letter-spacing: -0.025em;
    line-height: 1.15;
    text-wrap: balance;
  }
  .form-header p {
    font-size: 0.95rem;
    text-wrap: balance;
  }

  /* Stack all rows */
  .row, .row.three { grid-template-columns: 1fr; gap: 0.5rem; }

  /* Inputs sized at 16px so iOS doesn't zoom on focus */
  input[type="text"],
  input[type="email"],
  input[type="url"],
  select,
  textarea {
    font-size: 16px;
    padding: 0.85rem 0.95rem;
    border-radius: 12px;
  }

  /* Type cards: 2 columns instead of 4 */
  .type-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .type-card-inner {
    padding: 0.85rem 0.6rem;
    gap: 0.3rem;
    min-height: 115px;
  }
  .type-icon { font-size: 1.35rem; }
  .type-label { font-size: 0.88rem; }
  .type-desc { font-size: 0.72rem; }

  /* Legend smaller */
  legend {
    font-size: 1.05rem;
    margin-bottom: 1rem;
  }
  fieldset {
    margin-bottom: 1.75rem;
    padding-bottom: 1.75rem;
  }

  /* Submit button full-width on mobile */
  .submit-row {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
  }
  .btn-large {
    width: 100%;
    justify-content: center;
    padding: 1.1rem 1.5rem;
  }
  .submit-note {
    font-size: 0.82rem;
    margin-top: 0.85rem;
  }

  /* FAQ: tighter cards */
  .faq-section {
    margin-bottom: 3rem;
  }
  .faq-section h2 {
    font-size: 1.65rem;
    margin-bottom: 0.65rem;
  }
  .faq-intro {
    font-size: 0.95rem;
    margin-bottom: 1.75rem;
  }
  .faq-group {
    font-size: 0.72rem;
    margin: 1rem 0 0.25rem;
  }
  details {
    padding: 0 1.15rem;
    border-radius: 16px;
  }
  details summary {
    font-size: 0.95rem;
    padding: 1rem 0;
    gap: 0.75rem;
  }
  details p {
    font-size: 0.9rem;
    padding: 0 0 1.15rem;
  }
  .chevron { width: 26px; height: 26px; }

  /* FAQ → form bridge */
  .faq-bridge {
    margin-top: 2rem;
    padding: 1.5rem 1.25rem;
    border-radius: 16px;
  }
  .faq-bridge p {
    font-size: 0.95rem;
    margin-bottom: 0.85rem;
  }
  .faq-bridge .btn {
    width: 100%;
    justify-content: center;
  }

  /* Footer: stack center */
  .footer-inner {
    padding: 1.75rem 1rem;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.25rem;
  }
  .footer-meta {
    align-items: center;
  }
  .footer-brand {
    flex-direction: column;
    text-align: center;
    gap: 0.6rem;
  }

  /* Ambient blob smaller and fully on-screen on mobile */
  .ambient {
    top: -100px;
    right: -100px;
    width: 350px;
    height: 350px;
    filter: blur(30px);
  }

  /* Optional/required pills shrink */
  .optional, .req {
    font-size: 0.66rem;
    padding: 0.1rem 0.45rem;
  }
}

/* Very small phones (iPhone SE, etc.) */
@media (max-width: 380px) {
  .hero h1 { font-size: 2.05rem; }
  .form-header h2, .faq-section h2 { font-size: 1.45rem; }
  .type-grid { grid-template-columns: 1fr; }
}

/* Safe-area support (iPhone notch/Dynamic Island/home indicator) */
@supports (padding: env(safe-area-inset-bottom)) {
  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  footer {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* Tap targets: ensure links/buttons hit 44px minimum on touch */
@media (hover: none) and (pointer: coarse) {
  .site-nav a,
  .btn,
  details summary,
  .type-card {
    min-height: 44px;
  }
  /* Remove hover-only effects on touch devices */
  .btn-primary:hover { transform: none; }
  .submit-btn:hover svg { transform: none; }
}
