/* Quadera Property Management — site styles */
@font-face { font-family: "Poppins"; font-weight: 400; font-display: swap; src: url("../fonts/poppins-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-display: swap; src: url("../fonts/poppins-500.woff2") format("woff2"); }

:root {
  --brand: #176889;
  --brand-dark: #10506a;
  --ink: #1e2a31;
  --muted: #56636b;
  --hint: #66747b;
  --line: #c7d5db;
  --tint: #eef4f7;
  --bg: #ffffff;
  --error: #b42318;
  --radius: 10px;
  --wrap: 1080px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1rem/1.65 "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  display: flex; flex-direction: column; min-height: 100vh;
}
main { flex: 1; }
img, svg { display: block; max-width: 100%; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-dark); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-weight: 500; line-height: 1.2; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); letter-spacing: -.01em; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.narrow { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.narrow > * { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--brand); color: #fff; padding: .5rem 1rem; border-radius: 6px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header (inner pages): a white bar with a hairline, wordmark left, links right */
.site-header { background: rgba(255, 255, 255, .94); border-bottom: 1px solid #e3ecf0; }
.site-header .wrap { display: flex; align-items: stretch; justify-content: space-between; gap: 1rem 2rem; min-height: 76px; }
.brand { flex: none; display: block; align-self: center; padding-block: .65rem; }
.brand img { width: 160px; height: auto; }
.nav { display: flex; align-items: stretch; gap: clamp(1.25rem, 3vw, 2.25rem); }
/* Links run the full height of the header, so the active page's bar sits right on the header's bottom line */
.nav a {
  position: relative; display: flex; align-items: center; justify-content: center;
  color: var(--ink); text-decoration: none; text-transform: uppercase; letter-spacing: .16em; font-size: .76rem; font-weight: 500;
  padding: 0 .1rem; transition: color .2s;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: .16em; bottom: -1px; height: 2px; background: var(--brand);   /* right: skip the trailing letter-space */
  transform: scaleX(0); transition: transform .2s ease;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--brand); }
.nav a:hover::after { transform: scaleX(1); opacity: .35; }
.nav a[aria-current="page"]::after { transform: scaleX(1); opacity: 1; }
.nav a:focus-visible { outline-offset: -3px; }
@media (min-width: 720px) and (min-height: 500px) {   /* not on phones in landscape, where it would cover too much */
  .site-header { position: sticky; top: 0; z-index: 5; backdrop-filter: saturate(1.4) blur(10px); }
}
@media (max-width: 560px) {
  .site-header .wrap { flex-direction: column; align-items: stretch; gap: 0; padding-top: .35rem; min-height: 0; }
  .brand { align-self: center; }
  .brand img { width: 150px; }
  .nav { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .5rem; text-align: center; }
  .nav a { padding-block: .85rem; }
  .nav a::after { left: 15%; right: 15%; }   /* bar under each tab, not edge to edge */
}

/* Home: centred stacked logo + three cards */
body.home main { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(4rem, 13vh, 8rem); padding-block: clamp(4rem, 14vh, 9rem) clamp(3rem, 8vh, 5rem); }
.intro { --logo-w: min(480px, 86vw); }
.lockup { width: var(--logo-w); margin: 0; }
/* House + apartment icon: 23.08% of the logo's width */
.intro .mark { width: calc(var(--logo-w) * .2308); height: auto; margin-bottom: calc(var(--logo-w) * .062); }
.intro { display: flex; flex-direction: column; align-items: center; text-align: center; padding-inline: var(--gutter); }
.intro p { margin: clamp(1.1rem, 2.6vw, 1.5rem) 0 0; color: var(--brand); font-size: clamp(.8rem, 3.8vw, 1.1rem); font-weight: 500; letter-spacing: .02em; }
.lockup img { width: 100%; height: auto; }
/* Home logo and icon: can't be dragged, selected, long-pressed (iPhone "Save image") or right-clicked to save */
.intro img { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; pointer-events: none; }
.cards { display: grid; gap: clamp(.875rem, 1.6vw, 1.25rem); grid-template-columns: 1fr; max-width: 980px; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  display: flex; flex-direction: column; gap: .4rem; padding: clamp(1.4rem, 2.4vw, 1.85rem);
  border: 1px solid #dbe6eb; border-radius: 14px; color: var(--ink); text-decoration: none; background: #fff;
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.card strong { font-weight: 500; font-size: 1.1rem; }
.card span { flex: 1; font-size: .92rem; line-height: 1.6; color: var(--muted); margin-bottom: 1.1rem; }
.card em { font-style: normal; font-weight: 500; font-size: .9rem; color: var(--brand); }
.card i { display: inline-block; font-style: normal; transition: transform .25s; }
.card:hover { color: var(--ink); border-color: var(--brand); box-shadow: 0 16px 36px -24px rgba(23, 104, 137, .55); transform: translateY(-2px); }
.card:hover i { transform: translateX(4px); }
body.home .site-footer { margin-top: 0; border-top: 0; }

/* Page heads */
.page-head { padding-block: clamp(2.5rem, 7vw, 5rem) clamp(1.5rem, 3vw, 2.5rem); }
.page-head h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
.lead { font-size: clamp(1.02rem, 1.5vw, 1.15rem); color: var(--muted); max-width: 38rem; margin: 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 500; font-size: .95rem; line-height: 1; cursor: pointer;
  padding: .95rem 1.5rem; border-radius: 999px; border: 1.5px solid var(--brand);
  background: var(--brand); color: #fff; text-decoration: none; transition: background .15s, color .15s;
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn.ghost { background: transparent; color: var(--brand); }
.btn.ghost:hover { background: var(--tint); color: var(--brand-dark); }
.btn.small { padding: .6rem 1rem; font-size: .85rem; }
.btn[disabled] { opacity: .6; cursor: progress; }

.notice { border-left: 3px solid var(--brand); background: var(--tint); padding: 1rem 1.25rem; border-radius: 0 var(--radius) var(--radius) 0; margin-bottom: 2.5rem; font-size: .95rem; }
.notice p:last-child { margin: 0; }

/* Forms */
form { display: grid; gap: 2.25rem; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 1rem; min-width: 0; }
legend { font-size: 1.15rem; font-weight: 500; color: var(--brand); padding: 0 0 .6rem; margin-bottom: .4rem; border-bottom: 1.5px solid var(--brand); width: 100%; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.grid.wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.field { display: grid; gap: .35rem; min-width: 0; }
.field > span, .group-label { font-size: .875rem; color: var(--muted); }
.field small { font-size: .8rem; color: var(--hint); }
.field .char-count { text-align: right; }
.req::after { content: " *"; color: var(--brand); }
input, select, textarea {
  font: inherit; font-size: 1rem; color: var(--ink); width: 100%;
  padding: .7rem .85rem; border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
textarea { min-height: 8rem; resize: vertical; }
/* Every single-line field the same height, whatever the browser does with dates and drop-downs */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select { height: 3.2rem; }
input[type="date"] { min-width: 0; -webkit-appearance: none; appearance: none; display: block; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; margin: 0; }
input[type="date"]::-webkit-datetime-edit, input[type="date"]::-webkit-datetime-edit-fields-wrapper { padding: 0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--error); }
input[type="file"] { padding: .55rem; background: var(--tint); border-style: dashed; }
.choices { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.choices label, .check { display: inline-flex; align-items: center; gap: .55rem; font-size: .95rem; cursor: pointer; }
.choices label { min-width: 2.75rem; }   /* short options like "EI" still get a full-size tap target */
.choices input, .check input { width: 1.15rem; height: 1.15rem; margin: 0; accent-color: var(--brand); flex: none; }
.check { align-items: flex-start; }
.check input { margin-top: .25rem; }
.row-occupant { display: grid; gap: .75rem; grid-template-columns: 1fr 1fr 11rem; align-items: end; }
.occupant-actions { display: flex; flex-wrap: wrap; gap: .5rem .75rem; }
.btn.quiet { border-color: var(--line); color: var(--muted); }
.btn.quiet:hover { border-color: var(--error); color: var(--error); background: #fef3f2; }
/* Income lines: 4 columns on wide screens (source spans 2), 2 on tablets, 1 on phones */
@media (min-width: 601px) { .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.four > .span-2 { grid-column: 1 / -1; } }
@media (min-width: 900px) {
  .grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid.four > .span-2 { grid-column: span 2; }
}
/* Phones: one field per row */
@media (max-width: 600px) {
  .grid, .grid.wide, .row-occupant { grid-template-columns: 1fr; }
  .row-occupant + .row-occupant { border-top: 1px dashed var(--line); padding-top: 1rem; }
  .choices .inline-detail { flex-basis: 100%; width: 100%; margin: 0; }
}
.choices .inline-detail { display: block; width: 18rem; max-width: 100%; margin-top: -.35rem; margin-bottom: -.35rem; }
.choices .inline-detail input { width: 100%; height: auto; }
/* Signatures: name box and "I agree" side by side */
.sign-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .75rem 1.5rem; align-items: end; }
.sign-row .check { padding-bottom: .85rem; }
@media (max-width: 600px) { .sign-row { grid-template-columns: 1fr; gap: .6rem; margin-bottom: .75rem; } .sign-row .check { padding-bottom: 0; } }
input::placeholder { color: var(--hint); opacity: 1; }
.icon { width: 1.25rem; height: 1.25rem; fill: currentColor; flex: none; }
.btn.with-icon { display: inline-flex; align-items: center; gap: .4rem; padding-left: .8rem; }
.applicant { border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.1rem, 3vw, 1.75rem); }
/* Each applicant box collapses: the name bar is the toggle */
.applicant .applicant-box { border-top: 0; padding-top: 0; margin: 0; }
.applicant-box > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; list-style: none; margin: 0; color: inherit; font-size: inherit; }
.applicant-box > summary::-webkit-details-marker { display: none; }
.applicant-box[open] > summary { margin-bottom: 1rem; }
.applicant-box > summary .chevron { width: 1.6rem; height: 1.6rem; color: var(--brand); transition: transform .2s; }
.applicant-box:not([open]) > summary .chevron { transform: rotate(-90deg); }
.applicant-body { display: grid; gap: 1.25rem; }
.applicant h2 { color: var(--brand); margin: 0; font-size: 1.05rem; }
.applicant h3 { margin: .75rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--line); font-weight: 500; font-size: .95rem; }
.applicant-body > h3:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.applicant-body details { margin-top: -.25rem; }
.subsection { display: grid; gap: 1rem; border-top: 1px dashed var(--line); padding-top: 1rem; }
.legal { font-size: .9rem; color: var(--muted); background: var(--tint); border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.legal p:last-child { margin: 0; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-size: .95rem; padding: 1rem 1.25rem; border-radius: var(--radius); }
.form-status:empty { display: none; }
.form-status.error { background: #fef3f2; color: var(--error); border: 1px solid #fecdca; }
.form-status.ok { background: var(--tint); color: var(--ink); border: 1px solid var(--line); }
.submit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }

.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span {
  display: flex; align-items: center; justify-content: center; text-align: center; min-height: 3rem; padding: .5rem .75rem;
  border: 1px solid var(--line); border-radius: 10px; font-size: .92rem; font-weight: 500; color: var(--ink);
  transition: border-color .15s, background-color .15s, color .15s;
}
.segmented label:hover span { border-color: var(--brand); }
.segmented input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.segmented input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; }
@media (max-width: 400px) { .segmented { gap: .375rem; } .segmented span { font-size: .85rem; padding-inline: .25rem; } }
fieldset > .notice { margin: 0; }

/* Contact details */
.contact-list { display: grid; gap: 1.25rem; padding: 0; margin: 0; list-style: none; }
.contact-list strong { display: block; font-weight: 500; font-size: .75rem; color: var(--muted); letter-spacing: .18em; text-transform: uppercase; }
.two-col { display: grid; gap: clamp(2.5rem, 7vw, 5rem); grid-template-columns: 2fr 1fr; align-items: start; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }

/* Footer (inner pages) */
.site-footer { margin-top: clamp(4rem, 10vw, 7rem); border-top: 1px solid var(--line); padding-block: 1.75rem; font-size: .78rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.5rem; }
.site-footer a { color: inherit; }
.site-footer a:hover { color: var(--brand); }

/* Phones and tablets: comfortable touch targets (44px where it matters) */
@media (pointer: coarse) {
  .brand { padding-block: .65rem; }
  .nav a { padding-block: .85rem; }
  .contact-list a, .site-footer a { display: inline-block; padding-block: .55rem; }
  .choices label, .check { min-height: 2.6rem; }
  .choices { row-gap: 0; }
  details > summary { padding-block: .6rem; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print { .site-header nav, .site-footer, .btn { display: none; } }
[hidden] { display: none !important; }
details { border-top: 1px dashed var(--line); padding-top: .75rem; }
details > summary { cursor: pointer; color: var(--brand); font-size: .9rem; font-weight: 500; margin-bottom: .25rem; }
details[open] > summary { margin-bottom: 1rem; }
details > .grid + .grid { margin-top: 1rem; }

a[href^="tel:"] { white-space: nowrap; }
