/* ============================================================
   LaraSmile Group — Patient Referral Form
   Flat, editorial system: one dark ink hero, one warm sand body.
   No gradients, no resting shadows — contrast comes from tone and scale.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --ink: #15231E;
  --ink-soft: #1F3A32;
  --teal-deep: #0E4F45;
  --teal-bright: #1AAE8E;
  --gold: #C9973F;
  --sand: #FAF6EE;
  --card: #FFFFFF;
  --stone: #5F6E69;
  --stone-on-dark: #AFC2BB;
  --line: #E3DBC9;
  --error: #B3423A;
  --error-bg: #FBEAE8;

  --ease: cubic-bezier(.22,.9,.3,1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--sand);
  color: var(--ink);
  line-height: 1.5;
  overflow-x: hidden;
}

/* ---------- Hero (dark band, real logo lives here) ---------- */
.hero {
  background: var(--ink);
  padding: 40px 20px 52px;
}
.hero-inner { max-width: 460px; margin: 0 auto; }

.logo {
  height: 30px;
  width: auto;
  display: block;
  margin-bottom: 30px;
}

.hero h1 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: clamp(30px, 8vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: #FBF8F2;
  margin: 0;
  max-width: 11ch;
}

.swoosh { display: block; width: 150px; height: 26px; margin: 10px 0 16px -2px; }
.swoosh path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 900ms var(--ease) 500ms forwards;
}
.swoosh circle {
  opacity: 0;
  transform-origin: center;
  animation: pop 420ms var(--ease) 1250ms forwards;
}

.hero p {
  color: var(--stone-on-dark);
  font-size: 16px;
  line-height: 1.55;
  max-width: 36ch;
  margin: 0;
}

/* ---------- Body / form ---------- */
.content { padding: 34px 20px 60px; }
.card-wrap { max-width: 460px; margin: 0 auto; }

.card { background: var(--card); padding: 0; }

.field { margin-bottom: 18px; }
.field:last-of-type { margin-bottom: 0; }
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--stone);
  margin-bottom: 6px;
}
input, select, textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: 4px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--teal-bright);
  box-shadow: 0 0 0 3px rgba(26, 174, 142, 0.16);
}
textarea { resize: vertical; min-height: 76px; }

/* Referral code — distinct but no dashed/coupon cliché, just a tone step + gold rule */
.referral-field {
  background: #FBF3E3;
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  padding: 14px 16px 16px;
  margin-bottom: 24px;
}
.referral-field label { color: #8A6A2A; margin-bottom: 4px; }
.referral-field input { border-color: #E6CE9E; background: #fff; font-weight: 600; letter-spacing: 0.02em; }
.referral-field .hint { font-size: 13px; color: var(--stone); margin-top: 7px; font-weight: 500; }

.btn {
  display: block;
  width: 100%;
  background: var(--teal-deep);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 16px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  margin-top: 26px;
  touch-action: manipulation;
  transition: background .15s var(--ease), transform .1s var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--ink-soft); }
  .social-btn:hover { background: var(--sand); }
}
.btn:active { transform: scale(0.98); }

.honeypot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.error-box {
  background: var(--error-bg);
  color: var(--error);
  padding: 13px 15px;
  border-radius: 4px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
}

/* ---------- Thank-you page ---------- */
.confirm { padding: 4px 0 0; }

.social-row { display: flex; flex-direction: column; gap: 10px; }
.social-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid var(--line);
  color: var(--ink);
  background: #fff;
  transition: background .15s var(--ease);
}
.social-btn svg { width: 19px; height: 19px; stroke: var(--ink); flex-shrink: 0; }

/* ---------- Motion ---------- */
/* Always plays (fade + rise). Reduced-motion users get fade only, no movement. */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  animation: rise 800ms var(--ease) forwards;
}
.hero h1.reveal { animation-duration: 1000ms; }
.logo.reveal { transform: translateY(-14px); }
.card .field, .card .referral-field, .card .btn {
  opacity: 0;
  transform: translateY(16px);
  animation: rise 650ms var(--ease) forwards;
}
.card .referral-field { animation-delay: 450ms; }
.card .field:nth-of-type(1) { animation-delay: 540ms; }
.card .field:nth-of-type(2) { animation-delay: 620ms; }
.card .field:nth-of-type(3) { animation-delay: 700ms; }
.card .field:nth-of-type(4) { animation-delay: 780ms; }
.card .field:nth-of-type(5) { animation-delay: 860ms; }
.card .field:nth-of-type(6) { animation-delay: 940ms; }
.card .btn { animation-delay: 1020ms; }

@keyframes rise { to { opacity: 1; transform: translateY(0); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { 0% { opacity: 0; transform: scale(0.4); } 70% { opacity: 1; transform: scale(1.15); } 100% { opacity: 1; transform: scale(1); } }
@keyframes breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.5); } }
.swoosh circle { transform-box: fill-box; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .card .field, .card .referral-field, .card .btn { transform: none; }
  @keyframes rise { to { opacity: 1; transform: none; } }
}


/* ---------- Form card (v2) ---------- */
.content { padding: 0 20px 56px; }
.card-wrap { margin-top: -28px; position: relative; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 26px 22px 24px;
}
.group-title {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  margin: 30px 0 16px;
}
.referral-field + .group-title { margin-top: 28px; }
.req { color: var(--gold); }
.field { margin-bottom: 16px; }
label { font-size: 13px; color: var(--ink-soft); letter-spacing: 0; }
input, select, textarea {
  background: #F8F4EA;
  border: 1.5px solid transparent;
  border-bottom-color: var(--line);
  padding: 15px 14px;
  min-height: 52px;
}
input:focus, select:focus, textarea:focus {
  background: #fff;
  border-color: var(--teal-bright);
}
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none'%3E%3Cpath d='M1 1.5l6 6 6-6' stroke='%230E4F45' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
textarea { min-height: 96px; }
::placeholder { color: #9AA6A1; }
.referral-field { background: #FBF3E3; margin-bottom: 0; padding: 16px 16px 16px; }
.referral-field input { background: #fff; border: 1.5px solid #E6CE9E; font-size: 17px; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 18px 16px; margin-top: 28px; font-size: 17px;
}
.btn .arrow { transition: transform .2s var(--ease); }
@media (hover: hover) and (pointer: fine) { .btn:hover .arrow { transform: translateX(4px); } }
.privacy { margin: 14px 0 0; font-size: 13px; color: var(--stone); text-align: center; }
@media (min-width: 560px) {
  .card { padding: 34px 34px 30px; }
  .card-wrap { margin-top: -40px; }
}


/* ---------- Sand area decoration + next steps ---------- */
.content { position: relative; overflow: hidden; padding-bottom: 72px; }
.deco { position: absolute; pointer-events: none; z-index: 0; }
.deco-a { width: 300px; height: 300px; right: -130px; top: 380px; }
.deco-b { width: 160px; height: 48px; left: 12px; bottom: 28px; }
.card-wrap { z-index: 1; }
.steps {
  list-style: none; margin: 44px 0 0; padding: 0;
  display: flex; flex-direction: column; gap: 22px;
}
.steps li { display: flex; gap: 16px; align-items: flex-start; font-size: 15px; color: var(--stone); line-height: 1.5; }
.steps li strong { color: var(--ink); font-size: 16px; }
.steps b {
  flex: 0 0 34px; height: 34px; border-radius: 50%;
  background: var(--teal-deep); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif; font-size: 16px; font-weight: 600;
}
@media (min-width: 900px) {
  .deco-a { width: 460px; height: 460px; right: -140px; top: 200px; }
  .deco-b { width: 220px; height: 66px; left: 6%; bottom: 40px; }
}


/* ---------- Sand-area motion (transform/opacity only) ---------- */
.deco-c { width: 34px; height: 34px; left: 44px; top: 470px; }
.deco-a { animation: drift 11s ease-in-out infinite; will-change: transform; }
.deco-c { animation: float 6s ease-in-out infinite; }
.deco-b path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1200ms var(--ease) 600ms forwards; }
.steps li { opacity: 0; transform: translateY(20px); animation: rise 650ms var(--ease) forwards; }
.steps li:nth-child(1) { animation-delay: 1200ms; }
.steps li:nth-child(2) { animation-delay: 1320ms; }
.steps li:nth-child(3) { animation-delay: 1440ms; }
@keyframes drift { 0%,100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(-16px,18px,0) scale(1.06); } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* Where supported, reveal on scroll instead of on load */
@supports (animation-timeline: view()) {
  .steps li { animation: rise linear both; animation-timeline: view(); animation-range: entry 5% entry 70%; animation-delay: 0ms !important; }
  .deco-b path { animation: draw linear both; animation-timeline: view(); animation-range: entry 0% entry 100%; animation-delay: 0ms; }
}
@media (hover: hover) and (pointer: fine) {
  .steps li:hover b { transform: scale(1.1); }
}
.steps b { transition: transform .2s var(--ease); }
@media (prefers-reduced-motion: reduce) {
  .deco-a, .deco-c { animation: none; }
  .steps li { transform: none; }
}


/* ---------- Bigger logo + services ---------- */
.logo { height: 56px; margin-bottom: 34px; }
@media (min-width: 560px) { .logo { height: 68px; } }
.services { margin-top: 56px; }
.services .group-title { margin-top: 0; font-size: 24px; }
.svc { padding: 18px 0 18px 18px; border-left: 3px solid var(--teal-bright); margin-bottom: 14px; }
.svc:nth-of-type(2) { border-left-color: var(--gold); }
.svc:nth-of-type(3) { border-left-color: var(--teal-deep); }
.svc h3 { font-family: 'Fraunces', serif; font-size: 20px; font-weight: 600; margin: 0 0 6px; color: var(--ink); }
.svc p { margin: 0; font-size: 15px; color: var(--stone); max-width: 40ch; }
.svc { opacity: 0; transform: translateY(20px); animation: rise 650ms var(--ease) 1600ms forwards; }
@supports (animation-timeline: view()) {
  .svc { animation: rise linear both; animation-timeline: view(); animation-range: entry 5% entry 70%; animation-delay: 0ms; }
}
@media (prefers-reduced-motion: reduce) { .svc { transform: none; } }


/* ---------- Themed art: tooth / hair / aesthetic ---------- */
.deco-a, .deco-c { display: none; }
.svc { position: relative; padding-right: 96px; min-height: 96px; }
.art { position: absolute; right: 0; top: 50%; margin-top: -34px; width: 68px; height: 68px; overflow: visible; }
.art-tooth, .art-face { animation: bob 7s ease-in-out infinite; }
.art-face { animation-delay: -3s; }
.strand { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 4.5s ease-in-out infinite; }
.st2 { animation-delay: -1.2s; } .st3 { animation-delay: -2.4s; }
.spark { transform-box: fill-box; transform-origin: 50% 50%; opacity: 0; animation: twinkle 3.2s ease-in-out infinite; }
.spark.s2 { animation-delay: -1.1s; } .spark.s3 { animation-delay: -2.1s; }
.contour { stroke-dasharray: 1; animation: trace 6s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-16px) rotate(4deg); } }
@keyframes sway { 0%,100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes twinkle { 0%,100% { opacity: 0; transform: scale(.3) rotate(0deg); } 45%,55% { opacity: 1; transform: scale(1.1) rotate(45deg); } }
@keyframes trace { 0% { stroke-dashoffset: 1; } 45%,75% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -1; } }
@media (prefers-reduced-motion: reduce) {
  .art-tooth, .art-face, .strand, .contour { animation: none; stroke-dashoffset: 0; }
  .spark { animation: none; opacity: 1; }
}


/* ---------- Background art layer (whole sand area) ---------- */
.svc, .svc { padding-right: 0; min-height: 0; }
.bg-art { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 0; pointer-events: none; overflow: hidden; color: var(--teal-deep); }
.bg-i { position: absolute; opacity: .32; overflow: visible; }
.bg-i.bg-spark { color: var(--gold); opacity: 0; }
.bg-i:nth-child(3n) { color: var(--teal-bright); }
.bg-bob { animation: bgbob 9s ease-in-out infinite; }
.bg-sway { transform-origin: 50% 100%; animation: bgsway 6s ease-in-out infinite; }
.bg-spark { animation: bgtwinkle 3.6s ease-in-out infinite; }
@keyframes bgbob { 0%,100% { transform: translateY(0) rotate(-5deg); } 50% { transform: translateY(-20px) rotate(5deg); } }
@keyframes bgsway { 0%,100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
@keyframes bgtwinkle { 0%,100% { opacity: 0; transform: scale(.3) rotate(0deg); } 50% { opacity: .75; transform: scale(1.1) rotate(45deg); } }
.card-wrap { position: relative; z-index: 1; }
@media (min-width: 900px) { .bg-i { opacity: .38; } .bg-i[style*="width:9"], .bg-i[style*="width:8"] { transform-origin: center; } }
@media (prefers-reduced-motion: reduce) {
  .bg-bob, .bg-sway { animation: none; }
  .bg-spark { animation: none; opacity: .6; }
}

.bg-float { animation: bgfloat 8s ease-in-out infinite; }
@keyframes bgfloat { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-14px) scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .bg-float { animation: none; } }

.referral-field { margin-top: 26px; }
.referral-field + .btn { margin-top: 20px; }


/* ---------- Group footer ---------- */
.group { background: var(--ink); padding: 52px 20px 60px; }
.group-inner { max-width: 460px; margin: 0 auto; }
.group h2 { font-family: 'Fraunces', serif; font-size: 28px; font-weight: 600; color: #FBF8F2; margin: 0 0 8px; }
.group-sub { color: var(--stone-on-dark); font-size: 15px; margin: 0 0 28px; }
.group-list { list-style: none; margin: 0; padding: 0; }
.group-list li { padding: 14px 0 14px 16px; border-left: 3px solid var(--teal-bright); margin-bottom: 12px; }
.group-list li:nth-child(2) { border-left-color: var(--gold); }
.group-list li:nth-child(4) { border-left-color: var(--teal-bright); }
.group-list li:nth-child(5) { border-left-color: var(--gold); }
.group-list strong { display: block; font-family: 'Fraunces', serif; font-size: 20px; font-weight: 600; color: #FBF8F2; }
.group-list span { display: block; font-size: 14px; color: var(--stone-on-dark); margin-top: 2px; }
.group-list li { opacity: 0; transform: translateY(18px); animation: rise 650ms var(--ease) forwards; animation-delay: 1800ms; }
@supports (animation-timeline: view()) {
  .group-list li { animation: rise linear both; animation-timeline: view(); animation-range: entry 5% entry 80%; animation-delay: 0ms; }
}
@media (prefers-reduced-motion: reduce) { .group-list li { transform: none; } }

.group-list li { padding: 0; }
.group-list a { position: relative; display: block; padding: 14px 44px 14px 16px; text-decoration: none; transition: background .2s var(--ease); }
.group-list .go { position: absolute; right: 14px; top: 50%; margin-top: -11px; font-style: normal; font-size: 20px; color: var(--gold); transition: transform .2s var(--ease); }
.group-list a:active { background: rgba(255,255,255,.06); }
@media (hover: hover) and (pointer: fine) {
  .group-list a:hover { background: rgba(255,255,255,.06); }
  .group-list a:hover .go { transform: translate(3px,-3px); }
}
.group-list a:focus-visible { outline: 2px solid var(--teal-bright); outline-offset: 2px; }
