/* CaterFind (/caterers/): shared styles for home, find, list and profile pages. */
:root {
  --bg: #F6F4EE; --surface: #FFFFFF; --sunk: #EDE9DF; --line: #E6E1D6; --line-2: #D5CFC2;
  --ink: #1D2420; --ink-2: #4F5853; --muted: #5B6460;
  --green: #1E5B3A; --green-dark: #123D26; --green-tint: #E4EFE6;
  --saffron-ink: #9A4A0C; --saffron-tint: #FFF1DF; --saffron-soft: #F3C893; --error: #A3261B;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: Inter, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); line-height: 1.5; }
a { color: var(--green); } a:hover { color: var(--green-dark); }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 9; }

/* Header */
.top { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; padding: 18px 0; }
.logo { font-family: var(--display); font-weight: 700; font-size: 24px; color: var(--ink); text-decoration: none; }
.logo span { color: var(--green); }
.logo small { font-family: var(--body); font-size: 13px; font-weight: 600; color: var(--saffron-ink); margin-left: 6px; }
.top nav { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; font-size: 15px; font-weight: 500; }
.top nav a:not(.btn) { color: var(--ink); text-decoration: none; }
.top nav a:not(.btn):hover { color: var(--green); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 26px; border-radius: 999px;
  font: 600 16px/1 var(--body); text-decoration: none; cursor: pointer; border: 1.5px solid transparent; transition: background .15s, color .15s; }
.btn svg { flex: none; }
.btn-primary { background: var(--green); color: #fff; border-color: var(--green); }
.btn-primary:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.btn-primary[disabled] { opacity: .6; cursor: wait; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-outline { background: #fff; color: var(--green); border-color: var(--green); }
.btn-outline:hover { background: var(--green-tint); color: var(--green); }
.btn-sm { min-height: 44px; padding: 0 20px; font-size: 15px; }
.btn-block { width: 100%; }
.linkbtn { background: none; border: 0; min-height: 44px; padding: 0 6px; font: 600 16px var(--body); color: var(--green); text-decoration: underline; cursor: pointer; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* Shared bits */
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--saffron-ink); }
.lede { font-size: 18px; line-height: 1.55; color: var(--ink-2); max-width: 600px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 26px; display: flex; flex-direction: column; gap: 22px; }
.card h2 { font-size: 23px; }
.lift { box-shadow: 0 20px 40px -24px rgba(29, 36, 32, .25); }
.hint { font-size: 13px; line-height: 1.4; color: var(--muted); font-weight: 400; }
.tag { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--green-tint); color: var(--green); font-size: 13px; font-weight: 600; }
.tag.saffron { background: var(--saffron-tint); color: #8A420B; }
.tag.plain { background: var(--bg); color: var(--ink); font-weight: 500; font-size: 14px; padding: 8px 14px; }

/* Forms */
.split { padding: 12px 0 80px; display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.split > .main { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.split > aside { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 960px) { .split > aside { position: sticky; top: 16px; } }
.page-head { display: flex; flex-direction: column; gap: 12px; }
.page-head h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.04; letter-spacing: -0.02em; }
.q { display: flex; flex-direction: column; gap: 10px; border: 0; margin: 0; padding: 0; min-width: 0; }
.q > legend, .lbl { font: 600 15px/1.3 var(--body); color: var(--ink); padding: 0; margin-bottom: 2px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.field-wrap { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field { width: 100%; min-height: 50px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: #fff; font: 16px var(--body); color: var(--ink); }
textarea.field { padding: 12px 14px; min-height: 96px; resize: vertical; line-height: 1.5; }
.field:focus { outline: 2px solid var(--green); outline-offset: 1px; border-color: var(--green); }
.field[aria-invalid="true"] { border-color: var(--error); }
.prefix { display: flex; gap: 8px; }
.prefix > span { min-height: 50px; display: flex; align-items: center; padding: 0 14px; border-radius: 12px; background: var(--sunk); font-size: 16px; flex: none; }
.err { font-size: 14px; color: var(--error); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line-2);
  background: #fff; font: 500 15px/1 var(--body); color: var(--ink); cursor: pointer; user-select: none; transition: background .12s; }
.chip span:hover { border-color: var(--green); }
.chip input:checked + span { background: var(--green); border-color: var(--green); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }
.submit-row { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: center; }
.form-err { padding: 12px 16px; border-radius: 12px; background: #FBE9E7; color: var(--error); font-size: 15px; }

/* Reach toggles (list page) */
.reach { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.reach label { position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 96px; padding: 16px; border-radius: 16px; border: 1.5px solid var(--line-2); background: #fff; cursor: pointer; }
.reach input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.reach b { font-size: 17px; display: flex; justify-content: space-between; align-items: center; }
.reach b::after { content: ''; width: 22px; height: 22px; border-radius: 999px; border: 2px solid #A8A196; box-sizing: border-box; }
.reach small { font-size: 14px; line-height: 1.4; color: var(--ink-2); }
.reach label:has(input:checked) { background: var(--green); border-color: var(--green); color: #fff; }
.reach label:has(input:checked) small { color: #DCEBE1; }
.reach label:has(input:checked) b::after { background: #fff; border: 6px solid var(--saffron-soft); }
.reach label:has(input:focus-visible) { outline: 2px solid var(--green); outline-offset: 2px; }

/* Side panels */
.panel-green { background: var(--green); color: #fff; border-radius: 22px; padding: 26px; display: flex; flex-direction: column; gap: 16px; }
.panel-green h2 { font-size: 22px; }
.tick { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.5; color: #E4F0E8; }
.tick svg { flex: none; margin-top: 1px; }

/* Done screens */
.done { max-width: 720px; margin: 0 auto; padding: 40px 0 96px; display: flex; flex-direction: column; gap: 24px; }
.done h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.05; letter-spacing: -0.02em; }
.badge-ok { width: 64px; height: 64px; border-radius: 999px; background: var(--green); display: flex; align-items: center; justify-content: center; }
.steps-list { display: flex; flex-direction: column; gap: 14px; }
.steps-list div { display: flex; gap: 14px; align-items: flex-start; font-size: 16px; }
.steps-list span { flex: none; width: 32px; height: 32px; border-radius: 999px; background: var(--green-tint); color: var(--green); display: flex; align-items: center; justify-content: center; font-weight: 600; }

footer.foot { padding: 32px 0 48px; display: flex; flex-wrap: wrap; gap: 12px 20px; justify-content: space-between; font-size: 14px; color: var(--muted); }
footer.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.other { display: block; max-width: 440px; }
.other .field { min-height: 46px; font-size: 15px; }
.verify { border: 1.5px solid var(--green); background: var(--green-tint); }
.verify .code { font-family: var(--display); font-size: 30px; letter-spacing: .08em; color: var(--green); }
[hidden] { display: none !important; }

/* ── App shell on phones: sticky top bar, bottom tabs, safe areas, no zoom-on-focus ── */
.tabbar { display: none; }
@media (max-width: 759px) {
  html { -webkit-tap-highlight-color: transparent; }
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); overscroll-behavior-y: none; }
  .wrap { padding: 0 16px; }
  .top { position: sticky; top: 0; z-index: 15; margin: 0 -16px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
    background: rgba(246, 244, 238, .92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); flex-wrap: nowrap; }
  .top.scrolled { box-shadow: 0 1px 0 var(--line); }
  /* On the home page the header sits in its own .wrap, so pin that wrapper instead. */
  body > .wrap:has(> .top:only-child) { position: sticky; top: 0; z-index: 15; }
  .top nav a:not(.btn) { display: none; }
  .top nav .btn { min-height: 38px; padding: 0 14px; font-size: 14px; }
  .logo { font-size: 21px; }
  .logo small { display: none; }
  .page-head h1 { font-size: 30px; }
  .lede { font-size: 16px; }
  .card { padding: 20px; border-radius: 18px; gap: 18px; }
  .card h2 { font-size: 21px; }
  .split { padding: 4px 0 40px; gap: 18px; }
  .field, .other .field, select.field, textarea.field { font-size: 16px; }   /* 16px+ stops iOS zooming into fields */
  .btn:active, .chip span:active, .tabbar a:active { transform: scale(.97); }
  footer.foot { padding: 24px 0 20px; font-size: 13px; gap: 10px; }
  footer.foot nav { gap: 6px 14px; }
  .done { padding: 20px 0 40px; }

  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: rgba(255, 255, 255, .97); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-top: 1px solid var(--line); padding: 4px 6px calc(4px + env(safe-area-inset-bottom)); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px;
    font: 600 11px/1.1 var(--body); color: var(--muted); text-decoration: none; border-radius: 12px; }
  .tabbar a svg { width: 23px; height: 23px; }
  .tabbar a[aria-current="page"] { color: var(--green); }
  .tabbar a[aria-current="page"] svg { stroke-width: 2.4; }
  body.has-bar .tabbar { display: none; }  /* caterer profiles show Call / WhatsApp instead */
}
@media (display-mode: standalone) { .top { padding-top: calc(12px + env(safe-area-inset-top)); } }
