/* Barstow Gardens - rental application styles */
:root {
  --green: #2f6b3a;
  --green-dark: #224f2b;
  --green-soft: #e7f0e6;
  --ink: #1f2a22;
  --muted: #5c665e;
  --line: #d5dbd3;
  --bg: #f5f3ec;
  --card: #ffffff;
  --error: #b3261e;
  --error-soft: #fbeceb;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

a { color: var(--green); }

.site-header {
  background: var(--green);
  color: #fff;
  padding: 18px 16px;
}
.site-header .inner { max-width: 860px; margin: 0 auto; }
.site-header .brand { font-size: 1.5rem; font-weight: 700; letter-spacing: .02em; }
.site-header .tag { opacity: .85; font-size: .95rem; }

main { max-width: 860px; margin: 0 auto; padding: 24px 16px 48px; }

h1 { font-size: 1.75rem; margin: 0 0 8px; }
.intro { color: var(--muted); margin: 0 0 20px; }
.req { color: var(--error); font-weight: 700; }

fieldset {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 0 0 18px;
  padding: 18px 18px 6px;
  min-width: 0;
}
legend {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--green-dark);
  padding: 0 6px;
}
.section-note { color: var(--muted); font-size: .92rem; margin: -2px 0 14px; }

h3 {
  font-size: 1rem;
  margin: 14px 0 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--green-dark);
}
fieldset > h3:first-of-type { border-top: 0; padding-top: 0; }

.grid { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .g2 { grid-template-columns: 1fr 1fr; }
  .g3 { grid-template-columns: 1fr 1fr 1fr; }
  .name { grid-template-columns: 2fr 1fr 2fr; }
  .addr { grid-template-columns: 3fr 2fr 1fr 1.3fr; }
  .pair { grid-template-columns: 3fr 2fr; }
}

.field { margin-bottom: 14px; min-width: 0; }
.field > label, .field > .label {
  display: block;
  font-weight: 600;
  font-size: .93rem;
  margin-bottom: 4px;
}
.hint { display: block; color: var(--muted); font-size: .85rem; margin-top: 3px; }

input[type=text], input[type=email], input[type=tel], input[type=date],
input[type=number], select, textarea {
  width: 100%;
  font: inherit;
  font-size: 16px; /* keeps iOS from zooming on focus */
  color: var(--ink);
  background: #fff;
  border: 1px solid #b9c2b7;
  border-radius: 8px;
  padding: 10px 12px;
  min-height: 44px;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(47,107,58,.2);
}

.choices { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  min-height: 36px;
  cursor: pointer;
}
.choice input { width: 20px; height: 20px; accent-color: var(--green); margin: 0; }

.question { padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; }
.question:last-of-type { border-bottom: 0; }
.question .label { font-weight: 400 !important; }

.invalid input, .invalid select, .invalid textarea { border-color: var(--error); background: var(--error-soft); }
.err { color: var(--error); font-size: .85rem; margin-top: 4px; min-height: 0; }
.err:empty { display: none; }

.subsection { border-left: 3px solid var(--green-soft); padding-left: 14px; margin: 4px 0 8px; }
[hidden] { display: none !important; }

.certify {
  background: var(--green-soft);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.certify .choice { align-items: flex-start; }
.certify .choice input { margin-top: 3px; flex: none; }

.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
button {
  font: inherit;
  font-weight: 700;
  border-radius: 8px;
  padding: 12px 28px;
  min-height: 48px;
  cursor: pointer;
  border: 1px solid var(--green);
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-primary[disabled] { opacity: .6; cursor: wait; }
.btn-secondary { background: #fff; color: var(--green); }
@media (max-width: 480px) { .actions button { width: 100%; } }

.summary {
  border: 1px solid var(--error);
  background: var(--error-soft);
  color: var(--error);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 18px;
}
.summary ul { margin: 6px 0 0; padding-left: 20px; }

.notice {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

/* honeypot: hidden from people, visible to naive bots */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.site-footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 0 16px 32px; }

/* ===================== site navigation & pages ===================== */
.site-header .inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
}
.site-header a.brand { color: #fff; text-decoration: none; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px; }
.site-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
}
.site-nav a:hover { background: rgba(255,255,255,.14); }
.site-nav a[aria-current="page"] { background: rgba(255,255,255,.2); }
.site-nav a.nav-cta { background: #fff; color: var(--green-dark); margin-left: 4px; }
.site-nav a.nav-cta:hover { background: var(--green-soft); }
@media (max-width: 560px) {
  .site-header .inner { flex-direction: column; align-items: stretch; }
  .site-nav { justify-content: space-between; }
  .site-nav a { flex: 1; text-align: center; padding: 10px 6px; }
  .site-nav a.nav-cta { margin-left: 0; }
}

a.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  border-radius: 8px;
  padding: 12px 24px;
  border: 1px solid var(--green);
}
a.btn.btn-primary { background: var(--green); color: #fff; }
a.btn.btn-primary:hover { background: var(--green-dark); }
a.btn.btn-secondary { background: #fff; color: var(--green); }
a.btn.btn-secondary:hover { background: var(--green-soft); }

.hero {
  background: linear-gradient(135deg, var(--green-soft), #f9f8f2);
  border-bottom: 1px solid var(--line);
}
.hero .inner { max-width: 860px; margin: 0 auto; padding: 44px 16px 40px; }
.hero h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: 1.15; margin: 0 0 12px; color: var(--green-dark); }
.hero .lead { font-size: 1.12rem; color: var(--ink); max-width: 620px; margin: 0 0 22px; }

h2 { font-size: 1.35rem; color: var(--green-dark); margin: 32px 0 12px; }
main > h2:first-child, main > section:first-child > h2:first-child { margin-top: 0; }
p { margin: 0 0 14px; }

.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
}
.card h3 { border: 0; padding: 0; margin: 0 0 8px; font-size: 1.1rem; }
.card p:last-child { margin-bottom: 0; }
.card .actions { margin-top: auto; padding-top: 10px; }

.property {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}
@media (min-width: 720px) { .property { display: grid; grid-template-columns: 300px 1fr; } }
.photo {
  min-height: 190px;
  background: repeating-linear-gradient(45deg, #dfe8dd 0 14px, #e9efe7 14px 28px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: .9rem;
}
.property .body { padding: 18px 20px; }
.property h2 { margin: 0 0 2px; }
.property .where { color: var(--muted); margin-bottom: 10px; }
.badge {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  margin-bottom: 8px;
}
.badge.soon { background: #fff2d6; color: #7a5200; }

table.units { width: 100%; border-collapse: collapse; margin: 6px 0 14px; font-size: .95rem; }
table.units th, table.units td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); }
table.units th { color: var(--muted); font-weight: 600; font-size: .85rem; }
ul.features { margin: 0 0 14px; padding-left: 20px; }
ul.features li { margin-bottom: 4px; }

.band {
  background: var(--green);
  color: #fff;
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 32px;
}
.band h2 { color: #fff; margin-top: 0; }
.band a.btn { background: #fff; color: var(--green-dark); border-color: #fff; }

.people { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.site-footer .links { margin-bottom: 8px; }
.site-footer .links a { margin: 0 8px; }
.site-footer .eho { margin-top: 6px; }

/* photos */
a.photo { display: block; text-decoration: none; min-height: 0; background: none; align-self: start; }
.photo img { display: block; width: 100%; height: auto; }
.gallery {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  margin: 4px 0 14px;
}
.gallery a { display: block; color: var(--muted); text-decoration: none; font-size: .8rem; line-height: 1.3; }
.gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 3px;
}
.gallery a:hover img { outline: 2px solid var(--green); }
.property > .full { grid-column: 1 / -1; padding: 0 20px 14px; }
.property > .full > h3:first-child { margin-top: 0; }
.photo .cap { display: block; padding: 6px 10px; font-size: .85rem; color: var(--muted); text-decoration: none; }

/* sheet-driven listings */
.badge.open { background: var(--green); color: #fff; }
table.units tr.open td { font-weight: 700; color: var(--green-dark); }
table.units tr.note td { color: var(--muted); font-size: .85rem; padding-top: 0; }
.card-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; margin-bottom: 10px; }
#vacancies { margin-bottom: 8px; }
#vacancies .cards { grid-template-columns: repeat(auto-fill, minmax(240px, 320px)); }
@media (max-width: 560px) {
  table.units { font-size: .85rem; }
  table.units th, table.units td { padding: 6px 4px; }
}

/* logo */
.brand-logo { display: block; height: 70px; width: auto; }
.site-header picture { display: block; }
@media (max-width: 560px) { .brand-logo { height: 42px; } }
