/* =====================================================================
   style.css | Around the Block
   Original look: cream background, warm dark text, coral + sage, EB Garamond.
   Small improvements are marked [NEW].
   ===================================================================== */
:root {
  --bg: #F9F6F5; --card: #FFFFFF; --ink: #2D2623; --muted: #6B625E;
  --coral: #DE9585; --coral-dark: #A9503F;
  --sage: #8FA77E; --sage-light: #E7EEE2; --line: #E4DCD8; --radius: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .card { transition: none; } .card:hover { transform: none; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "EB Garamond", Georgia, serif; font-size: 1.2rem; line-height: 1.5; }
body.modal-open { overflow: hidden; }
dialog:not([open]) { display: none; }
img { max-width: 100%; height: auto; }
a { color: var(--coral-dark); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 10; }
:focus-visible { outline: 3px solid var(--sage); outline-offset: 3px; }

/* Header */
.site-header { background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 8px; padding-bottom: 8px; }
.logo { height: 64px; width: auto; display: block; }
nav { display: flex; gap: 22px; flex-wrap: wrap; }
nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
nav a:hover { color: var(--coral-dark); }

/* Hero */
.hero { padding: 72px 0 56px; text-align: center; background: radial-gradient(circle at 12% 18%, rgba(222,149,133,.20), transparent 42%), radial-gradient(circle at 88% 78%, rgba(143,167,126,.22), transparent 42%); }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.1; margin: 0 0 16px; font-weight: 700; }
.hero h1 em { color: var(--coral-dark); }
.lead { max-width: 620px; margin: 0 auto 28px; color: var(--muted); font-size: 1.3rem; }

.trust { list-style: none; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 26px 0 0; padding: 0; }
.trust li { background: rgba(255,255,255,.85); border: 1px solid var(--line); border-radius: 999px; padding: 4px 16px; font-size: 1rem; font-weight: 600; }

/* Buttons */
.btn { display: inline-block; background: var(--coral-dark); color: #fff; text-decoration: none; font-weight: 700; padding: 12px 30px; border-radius: 999px; border: 2px solid var(--coral-dark); font: inherit; font-weight: 700; cursor: pointer; text-align: center; }
.btn:hover { background: #8E4033; border-color: #8E4033; }
.btn.ghost { background: transparent; color: var(--coral-dark); }
.btn.ghost:hover { background: var(--coral-dark); color: #fff; }

/* Sections */
.section { padding: 56px 0; }
.section.alt { background: var(--sage-light); }
.section-title { text-align: center; font-style: italic; font-weight: 700; font-size: 2rem; margin: 0 0 28px; padding-bottom: 8px; border-bottom: 1.5px solid var(--ink); }
.section-title.left { text-align: left; }

/* Filters */
.filters { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.field { display: flex; flex-direction: column; font-weight: 700; font-size: 1rem; flex: 1 1 200px; }   /* [NEW] bold labels */
.field input, .field select { -webkit-appearance: none; appearance: none; min-height: 46px; font: inherit; font-weight: 400; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); }
.status-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 18px; }
.status { color: var(--muted); margin: 0; }
.status-row .linklike { font-size: 1rem; padding: 6px 0; }

/* Job cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.card { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; box-shadow: 0 2px 6px rgba(45,38,35,.06); cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.card:hover { border-color: var(--coral); box-shadow: 0 8px 20px rgba(45,38,35,.12); transform: translateY(-2px); }
.card h3 { margin: 0; font-size: 1.7rem; line-height: 1.2; font-weight: 700; }                            /* [NEW] slightly larger, bold role */
.card-link { color: var(--ink); text-decoration: none; }
.card-link:hover { color: var(--coral-dark); text-decoration: underline; }
.where { margin: 4px 0 14px; color: var(--muted); font-style: italic; }
.card .meta { margin: 0 0 6px; }
.row { display: flex; gap: 10px; align-items: flex-start; }
.ico { flex: none; width: 1.15em; height: 1.15em; margin-top: .18em; color: var(--coral-dark); }
.ico svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pay { font-weight: 700; color: var(--coral-dark); }                                                      /* [NEW] pay stands out */
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.tag { background: var(--sage-light); color: #3F5434; border-radius: 999px; padding: 2px 12px; font-size: .95rem; font-weight: 600; }
.card .btn { margin-top: auto; }
.card .spacer { flex: 1; min-height: 14px; }
.card .posted { color: var(--muted); font-size: .95rem; margin: 10px 0 0; text-align: center; }
.empty { text-align: center; color: var(--muted); grid-column: 1 / -1; }
.empty .btn { margin-top: 8px; }

/* [NEW] Job detail window */
dialog { border: 0; padding: 0; border-radius: var(--radius); width: min(640px, calc(100% - 24px)); max-height: calc(100% - 24px); background: var(--card); color: var(--ink); box-shadow: 0 20px 60px rgba(45,38,35,.35); }
dialog::backdrop { background: rgba(45,38,35,.55); }
.d-inner { padding: 32px; position: relative; }
.d-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--ink); }
.d-close:hover { background: var(--sage-light); }
.d-head h2 { margin: 0 44px 0 0; font-size: 2.2rem; line-height: 1.1; font-weight: 700; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 18px 0; }
.facts div { background: var(--bg); border-radius: 12px; padding: 10px 14px; }
.facts dt { font-size: .95rem; color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; }
.d-apply { margin: 22px 0; padding: 20px; background: var(--sage-light); border-radius: 14px; }
.d-apply h3 { margin: 0 0 6px; font-size: 1.4rem; }
.d-apply .btn { margin-top: 6px; }
.apply-note { color: var(--muted); font-size: 1rem; margin: 10px 0 0; max-width: 62ch; }
.d-desc h3 { margin: 0 0 6px; font-size: 1.4rem; }
.d-desc p { margin: 0 0 10px; max-width: 62ch; }
.msg-preview { margin-top: 14px; font-size: 1rem; }
.msg-preview summary { cursor: pointer; font-weight: 700; color: var(--coral-dark); padding: 6px 0; }
.msg-preview pre { white-space: pre-wrap; word-wrap: break-word; font: inherit; font-size: .98rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 8px 0 10px; }
.btn.small { padding: 8px 18px; font-size: 1rem; }
.d-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

/* [NEW] Basic pop-up for older iPhones/iPads that lack <dialog> */
dialog.dlg-fallback[open] { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); margin: 0; z-index: 100; overflow-y: auto; box-shadow: 0 0 0 100vmax rgba(45,38,35,.55); }

/* How it works */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; }
.steps li { counter-increment: s; background: #fff; border-radius: var(--radius); padding: 24px; }
.steps li::before { content: counter(s); display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--coral); color: var(--ink); font-weight: 700; margin-bottom: 10px; }
.steps strong { display: block; font-size: 1.5rem; }
.steps span { color: var(--muted); }

/* Businesses */
.biz { display: grid; grid-template-columns: 200px 1fr; gap: 40px; align-items: center; }
.ticks { padding-left: 1.2em; }
.ticks li::marker { color: var(--sage); }

.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--coral-dark); text-decoration: underline; cursor: pointer; }

/* Footer */
.site-footer p { margin: 4px 0; }
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); text-align: center; font-size: 1rem; }

@media (max-width: 640px) {
  .header-row { flex-direction: column; }
  .logo { height: 52px; }
  .biz { grid-template-columns: 1fr; text-align: center; }
  .biz .mascot { margin: 0 auto; width: 150px; }
  .section-title.left { text-align: center; }
  .ticks { text-align: left; display: inline-block; }
  /* [NEW] Job window slides up from the bottom on phones */
  dialog { margin: auto 0 0; width: 100%; max-width: 100%; max-height: 92%; border-radius: 22px 22px 0 0; }
  .d-inner { padding: 24px 18px calc(28px + env(safe-area-inset-bottom, 0px)); }
  .d-head h2 { font-size: 1.9rem; }
  .d-actions .btn { flex: 1 1 100%; }
  dialog.dlg-fallback[open] { top: auto; bottom: 0; left: 0; transform: none; }
}

/* Sheet check panel (only shows when ?check=1 is added to the address) */
.check { background: var(--sage-light); border-radius: 14px; padding: 16px 20px; margin: 0 0 22px; }
.check h3 { margin: 0 0 6px; }
.check .meta { margin: 0 0 4px; font-size: 1rem; word-break: break-word; }
.site-footer .fine { font-size: .9rem; max-width: 640px; margin: 8px auto 0; }

/* Quick filters and saved jobs */
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 14px; }
.chip { font: inherit; font-size: 1rem; font-weight: 600; border: 1.5px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 8px 16px; min-height: 44px; cursor: pointer; }
.chip:hover { border-color: var(--coral); }
.chip.on { background: var(--coral-dark); border-color: var(--coral-dark); color: #fff; }
.card-top { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 4px; }
.titles { min-width: 0; flex: 1; }
.save:not(.save-text) { flex: none; width: 44px; height: 44px; margin: -8px -10px 0 0; border: 0; background: transparent; color: var(--coral-dark); display: grid; place-items: center; cursor: pointer; border-radius: 50%; }
.save:not(.save-text):hover { background: var(--sage-light); }
.save svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linejoin: round; }
.save.on svg { fill: currentColor; }
.know { margin: 0 0 6px; }
.site { margin: 12px 0 0; }
.addr-line { margin-top: 14px; font-size: 1rem; color: var(--muted); }
.addr-line .linklike { margin-left: 6px; }
.about { max-width: 720px; text-align: center; }
.about p { font-size: 1.15rem; }
.biz .btn + .btn { margin-left: 8px; }
.about-sub { font-style: italic; font-size: 1.4rem; margin: 28px 0 14px; }
.stats { list-style: none; padding: 0; margin: 0 0 8px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stats li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 12px; }
.stats strong { display: block; font-size: 2.2rem; color: var(--coral-dark); line-height: 1.1; }
.stats span { font-size: 1.05rem; color: var(--muted); }
@media (max-width: 640px) { .stats { grid-template-columns: 1fr; } }
.foot-title { font-style: italic; font-size: 1.5rem; margin: 0 0 14px; color: var(--ink); }
.site-footer .addr-line { margin: 12px 0 4px; }
.site-footer .foot-small { margin-top: 18px; font-size: .95rem; }
