/* Roof Repairs Auckland: free roofing tools. Navy, burnt orange, Plus Jakarta Sans. No gradients. */
:root { --navy: #0b1a2e; --ink: #0f172a; --muted: #475569; --faint: #64748b; --line: #e2e8f0; --bg: #f8fafc; --cta: #c2410c; --cta-dark: #9a3412; --tint: #fff7ed; --ok: #15803d; --warn: #b45309; --bad: #b91c1c; --r: 16px; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: #fff; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--cta-dark); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid #fdba74; outline-offset: 2px; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }

header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.95); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand { font-weight: 800; font-size: 18px; letter-spacing: -.02em; color: var(--navy); text-decoration: none; white-space: nowrap; }
.tag { font-size: 13px; color: var(--faint); font-weight: 600; display: none; }
nav.tools { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 0 0 10px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
nav.tools::-webkit-scrollbar { display: none; }
nav.tools a { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 99px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; box-shadow: inset 0 0 0 1px var(--line); background: #fff; }
nav.tools a:hover { color: var(--navy); box-shadow: inset 0 0 0 1px #cbd5e1; }
nav.tools a[aria-current=page] { background: var(--navy); color: #fff; box-shadow: none; }

.hero { background: var(--navy); color: #fff; padding: 36px 0 40px; }
.crumb { font-size: 13px; color: #94a3b8; margin: 0 0 14px; }
.crumb a { color: #cbd5e1; }
.eyebrow { color: var(--cta); font-weight: 800; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; margin: 0; }
.hero .eyebrow { color: #fdba74; }
h1 { font-size: clamp(2rem, 5.5vw, 3.4rem); line-height: 1.06; letter-spacing: -.03em; margin: 10px 0 0; font-weight: 800; }
.hero p.lead { font-size: 18px; color: #cbd5e1; max-width: 44rem; margin: 16px 0 0; }
.updated { font-size: 13px; color: #94a3b8; margin-top: 14px; }

.tool { position: relative; margin-top: -1px; padding: 28px 0 8px; background: var(--navy); }
.tool .card { background: #fff; border-radius: 22px; padding: 22px; box-shadow: 0 24px 60px -24px rgba(0,0,0,.5); outline: 2px solid var(--cta); }
.tool + section { padding-top: 48px; }
.card h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.card .sub { margin: 4px 0 18px; color: var(--muted); font-size: 14px; }
.calc { display: grid; gap: 22px; }
.fields { display: grid; gap: 14px; }
.f > span, .f legend { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.f small { font-weight: 500; color: var(--faint); }
fieldset.f { border: 0; padding: 0; margin: 0; min-width: 0; }
input[type=number], input[type=text], select { width: 100%; min-height: 50px; padding: 10px 14px; border-radius: 12px; border: 1px solid #cbd5e1; font: inherit; font-size: 16px; color: var(--ink); background: #fff; }
input:focus, select:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(11,26,46,.12); }
.unit { position: relative; }
.unit input { padding-right: 52px; }
.unit i { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--faint); font-weight: 600; pointer-events: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chips b { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 12px; box-shadow: inset 0 0 0 1px #cbd5e1; font-weight: 600; font-size: 15px; background: #fff; }
.chips input:checked + b { background: var(--tint); box-shadow: inset 0 0 0 2px var(--cta); color: var(--cta-dark); }
.chips input:focus-visible + b { outline: 3px solid #fdba74; outline-offset: 2px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; }
.check input { width: 22px; height: 22px; accent-color: var(--cta); flex: none; }

.result { border-radius: 18px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); padding: 20px; align-self: start; }
.result .label { font-size: 14px; font-weight: 700; color: var(--muted); }
.result .big { font-size: clamp(2rem, 7vw, 2.8rem); font-weight: 800; letter-spacing: -.03em; color: var(--navy); line-height: 1.1; margin-top: 4px; font-variant-numeric: tabular-nums; }
.result .mid { font-size: 15px; color: var(--muted); margin-top: 6px; }
.result dl { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; margin: 16px 0 0; padding-top: 16px; border-top: 1px dashed #cbd5e1; font-size: 15px; }
.result dt { color: var(--muted); }
.result dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.note { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: #fffbeb; box-shadow: inset 0 0 0 1px #fde68a; color: #78350f; font-size: 14px; line-height: 1.5; }
.badge { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 99px; font-size: 13px; font-weight: 800; }
.b-ok { background: #dcfce7; color: var(--ok); } .b-warn { background: #fef3c7; color: var(--warn); } .b-bad { background: #fee2e2; color: var(--bad); }

section { padding: 48px 0; }
section.alt { background: var(--bg); }
.prose h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); letter-spacing: -.025em; line-height: 1.15; margin: 40px 0 0; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 19px; margin: 26px 0 0; letter-spacing: -.01em; }
.prose p, .prose li { font-size: 17px; color: #334155; }
.prose ul { padding-left: 22px; }
.prose li { margin-top: 6px; }
.tbl { overflow-x: auto; margin-top: 18px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 520px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--bg); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody th { font-weight: 700; color: var(--ink); }

details { border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--line); background: #fff; margin-top: 10px; }
summary { cursor: pointer; list-style: none; padding: 16px 18px; font-weight: 700; display: flex; justify-content: space-between; gap: 12px; align-items: center; min-height: 56px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; flex: none; width: 30px; height: 30px; border-radius: 99px; background: var(--tint); color: var(--cta); display: grid; place-items: center; font-size: 20px; font-weight: 700; transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 0; padding: 0 18px 18px; color: var(--muted); }

.more { display: grid; gap: 12px; margin-top: 20px; }
.more a { display: block; padding: 18px; border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--line); background: #fff; text-decoration: none; color: var(--ink); }
.more a:hover { box-shadow: inset 0 0 0 2px var(--cta); }
.more b { display: block; font-size: 17px; }
.more span { color: var(--muted); font-size: 15px; }

footer { background: #121417; color: #94a3b8; font-size: 14px; padding: 28px 0 36px; border-top: 4px solid var(--cta); }
footer .wrap { display: grid; gap: 6px; }
footer b { color: #fff; font-size: 16px; }
footer a { color: #cbd5e1; }

@media (min-width: 640px) {
  .fields.two { grid-template-columns: 1fr 1fr; }
  .more { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .tag { display: inline; }
  .hero { padding: 56px 0 48px; }
  .tool .card { padding: 32px; }
  .calc { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px; }
  .result { position: sticky; top: 130px; }
  section { padding: 72px 0; }
  .more { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* Hero photo behind a solid navy overlay (no gradient). */
.hero { position: relative; isolation: isolate; background: var(--navy) url(/hero.jpg) 70% 50% / cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; background: rgba(11, 26, 46, .86); z-index: -1; }
.trust { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 10px 18px; }
.trust li { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: #e2e8f0; }
.trust li::before { content: "✓"; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 99px; background: rgba(52, 211, 153, .18); color: #6ee7b7; font-size: 12px; font-weight: 800; flex: none; }

/* Phones: the answer follows you while you change the inputs. */
.livebar { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: 16px; background: var(--navy); color: #fff; text-decoration: none; box-shadow: 0 16px 40px -12px rgba(11, 26, 46, .6); transition: transform .25s, opacity .25s; }
.livebar small { display: block; font-size: 12px; font-weight: 600; color: #94a3b8; }
.livebar b { display: block; font-size: 19px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.livebar span.go { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--cta); font-size: 20px; }
.livebar.hide { transform: translateY(150%); opacity: 0; pointer-events: none; }
@media (min-width: 900px) { .livebar { display: none; } }

/* Header menu: links on desktop, a menu button and panel on phones. */
.top { min-height: 64px; }
.brand { display: flex; flex-direction: column; justify-content: center; min-height: 48px; line-height: 1.15; }
.brand .tag { display: block; font-size: 12px; font-weight: 600; color: var(--faint); letter-spacing: 0; }
nav.menu { display: none; }
nav.menu a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--muted); text-decoration: none; }
nav.menu a:hover { color: var(--navy); background: var(--bg); }
nav.menu a[aria-current=page] { color: var(--navy); box-shadow: inset 0 -3px 0 var(--cta); border-radius: 0; }
.burger { display: grid; place-content: center; gap: 5px; width: 48px; height: 48px; border: 0; border-radius: 12px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.burger span { display: block; width: 22px; height: 2.5px; border-radius: 2px; background: var(--navy); transition: transform .2s, opacity .2s; }
.burger[aria-expanded=true] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.burger[aria-expanded=true] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded=true] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
.mnav { border-top: 1px solid var(--line); background: #fff; box-shadow: 0 16px 30px -16px rgba(11, 26, 46, .25); }
.mnav .wrap { display: grid; padding-top: 6px; padding-bottom: 12px; }
.mnav a { display: flex; align-items: center; justify-content: space-between; min-height: 52px; font-size: 17px; font-weight: 700; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.mnav a:last-child { border-bottom: 0; }
.mnav a::after { content: "›"; color: #94a3b8; font-size: 22px; }
.mnav a[aria-current=page] { color: var(--cta-dark); }
.f small { font-size: 12px; }
@media (min-width: 1000px) {
  nav.menu { display: flex; gap: 2px; }
  .burger, .mnav { display: none !important; }
}

/* Quote request */
.hq { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 12px; background: var(--cta); color: #fff; font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap; margin-left: auto; }
.hq:hover { background: var(--cta-dark); }
.top { gap: 10px; }
.top .brand { margin-right: auto; }
.top .hq { margin-left: 0; }
.quote { background: var(--navy); color: #fff; scroll-margin-top: 70px; }
.qgrid { display: grid; gap: 24px; }
.qcopy h2 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); letter-spacing: -.03em; line-height: 1.1; margin: 8px 0 0; }
.qcopy p { color: #cbd5e1; font-size: 17px; margin: 12px 0 0; }
.quote .eyebrow { color: #fdba74; }
.trust.dark { margin-top: 18px; }
.qform { background: #fff; color: var(--ink); border-radius: 22px; padding: 20px; display: grid; gap: 14px; outline: 2px solid var(--cta); }
.qform textarea { width: 100%; min-height: 84px; padding: 12px 14px; border-radius: 12px; border: 1px solid #cbd5e1; font: inherit; font-size: 16px; resize: vertical; }
.qform textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(11,26,46,.12); }
.qform input[type=tel], .qform input[type=email] { width: 100%; min-height: 50px; padding: 10px 14px; border-radius: 12px; border: 1px solid #cbd5e1; font: inherit; font-size: 16px; }
.qform input[type=tel]:focus, .qform input[type=email]:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(11,26,46,.12); }
.qform [aria-invalid=true] { border-color: var(--bad) !important; box-shadow: 0 0 0 4px rgba(185,28,28,.1) !important; }
.qbtn { min-height: 56px; border: 0; border-radius: 14px; background: var(--cta); color: #fff; font: inherit; font-size: 18px; font-weight: 800; cursor: pointer; }
.qbtn:hover { background: var(--cta-dark); }
.qbtn:disabled { opacity: .7; cursor: wait; }
.qerr { margin: 0; color: var(--bad); font-weight: 600; font-size: 14px; }
.qfine { margin: 0; text-align: center; font-size: 13px; color: var(--faint); }
.hp { position: absolute; left: -9999px; }
.qdone { text-align: center; padding: 24px 8px; }
.qdone .tick { width: 64px; height: 64px; border-radius: 99px; background: #dcfce7; color: var(--ok); display: grid; place-items: center; margin: 0 auto 12px; font-size: 30px; font-weight: 800; }
.qdone h3 { margin: 0; font-size: 22px; }
.qdone p { margin: 6px 0 0; color: var(--muted); }
@media (max-width: 380px) { .hq { padding: 0 10px; font-size: 14px; } .brand .tag { display: none; } }
@media (min-width: 900px) { .qgrid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 56px; align-items: center; } .qform { padding: 28px; } }

/* Tables become stacked cards on phones: row heading on top, each value with its column label. */
@media (max-width: 639px) {
  .tbl { overflow: visible; box-shadow: none; border-radius: 0; }
  .tbl table { min-width: 0; display: block; }
  .tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tbl tbody { display: grid; gap: 10px; }
  .tbl tr { display: block; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); background: #fff; padding: 4px 14px; }
  .tbl tbody th { display: block; padding: 12px 0 8px; border-bottom: 1px solid var(--line); font-size: 16px; }
  .tbl td { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); text-align: right; }
  .tbl tr td:last-child { border-bottom: 0; }
  .tbl td::before { content: attr(data-label); flex: none; max-width: 45%; text-align: left; font-size: 13px; font-weight: 700; color: var(--muted); }
  .tbl td[data-label=""]::before { content: none; }
}
