/*
 * Keystone Lane demo: bright, practical design for two audiences (owners and tenants).
 * Sunny yellow and deep green on white and cream; Lexend throughout; rounded cards and line icons.
 */

@font-face { font-family: "Lexend"; src: url("../fonts/lexend-latin-variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --green: #1f3b2d;
  --green-2: #2d5a43;
  --leaf: #e3efe6;
  --sun: #ffc845;
  --sun-2: #f5b417;
  --cream: #fbf8f1;
  --white: #ffffff;
  --ink: #1b2620;
  --muted: #56645b;
  --line: #e4e2da;
  --radius: 20px;
  --font: "Lexend", "Segoe UI", Arial, sans-serif;
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--ink); font: 300 1.05rem/1.65 var(--font); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.12; }
h1 { font-size: clamp(2.5rem, 5.2vw, 4.3rem); }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
strong { font-weight: 600; }
.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }
.eyebrow { font-size: .82rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--green-2); margin: 0 0 12px; }
.lead { font-size: 1.18rem; color: var(--muted); }
.mark { background: linear-gradient(transparent 58%, var(--sun) 58%, var(--sun) 92%, transparent 92%); padding: 0 .08em; }
.icon { width: 26px; height: 26px; flex: none; }
main { overflow-x: clip; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--green); color: var(--white); padding: 10px 14px; z-index: 2000; }
.skip-link:focus { left: 12px; top: 12px; }
:focus-visible { outline: 3px solid var(--sun-2); outline-offset: 3px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 15px 26px; border-radius: 999px; font: 500 1rem/1 var(--font); text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-green { background: var(--green); color: var(--white); }
.btn-green:hover { background: var(--green-2); box-shadow: 0 10px 24px rgba(31, 59, 45, .25); }
.btn-sun { background: var(--sun); color: var(--green); }
.btn-sun:hover { background: var(--sun-2); }
.btn-outline { border-color: var(--green); color: var(--green); background: transparent; }
.btn-outline:hover { background: var(--leaf); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.text-link { font-weight: 500; color: var(--green); text-underline-offset: 5px; text-decoration-color: var(--sun-2); text-decoration-thickness: 3px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .95); backdrop-filter: blur(8px); transition: box-shadow .25s ease; }
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(27, 38, 32, .08); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 80px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-name { display: flex; flex-direction: column; font-weight: 600; font-size: 1.15rem; line-height: 1.1; color: var(--green); }
.brand-name small { font-size: .72rem; font-weight: 400; color: var(--muted); letter-spacing: .04em; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 6px; }
.main-nav a { text-decoration: none; font-size: .95rem; font-weight: 400; padding: 9px 14px; border-radius: 999px; transition: background .2s ease; }
.main-nav a:hover { background: var(--leaf); }
.main-nav a[aria-current="page"] { background: var(--leaf); color: var(--green); font-weight: 500; }
.main-nav .nav-cta a { background: var(--sun); color: var(--green); font-weight: 500; margin-left: 8px; }
.main-nav .nav-cta a:hover { background: var(--sun-2); }
.nav-toggle { display: none; align-items: center; gap: 10px; border: 2px solid var(--green); background: var(--white); color: var(--green); border-radius: 999px; padding: 9px 16px; font: 500 .95rem var(--font); cursor: pointer; }
.nav-toggle .bars { display: flex; flex-direction: column; gap: 4px; }
.nav-toggle .bars span { width: 16px; height: 2px; background: currentColor; border-radius: 2px; }

/* Hero */
.hero { background: linear-gradient(180deg, var(--cream), var(--white)); padding: 56px 0 96px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; background: var(--leaf); color: var(--green); padding: 8px 14px; border-radius: 999px; font-size: .88rem; font-weight: 500; margin-bottom: 22px; }
.pill .icon { width: 18px; height: 18px; }
.hero h1 { margin-bottom: 20px; }
.hero .lead { margin-bottom: 30px; max-width: 32em; }
.hero-media { position: relative; }
.hero-media img { border-radius: 32px; aspect-ratio: 5 / 4; object-fit: cover; width: 100%; box-shadow: 0 30px 60px rgba(27, 38, 32, .14); }
.float-card { position: absolute; display: flex; align-items: center; gap: 12px; background: var(--white); border-radius: 16px; padding: 14px 18px; box-shadow: 0 16px 40px rgba(27, 38, 32, .16); }
.float-card .icon { color: var(--green); background: var(--sun); border-radius: 12px; padding: 8px; width: 42px; height: 42px; }
.float-card strong { display: block; font-size: .98rem; }
.float-card span { font-size: .82rem; color: var(--muted); }
.fc-one { left: -28px; bottom: 44px; }
.fc-two { right: -20px; top: 34px; }
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: up .8s cubic-bezier(.2, .7, .2, 1) both; }
  .hero-copy > *:nth-child(2) { animation-delay: .07s; }
  .hero-copy > *:nth-child(3) { animation-delay: .14s; }
  .hero-copy > *:nth-child(4) { animation-delay: .21s; }
  .hero-media img { animation: up 1s .1s cubic-bezier(.2, .7, .2, 1) both; }
  .fc-one { animation: up .8s .45s cubic-bezier(.2, .7, .2, 1) both, bob 6s 1.4s ease-in-out infinite; }
  .fc-two { animation: up .8s .6s cubic-bezier(.2, .7, .2, 1) both, bob 6s 2.4s ease-in-out infinite; }
  @keyframes up { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
  @keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
}

/* Sections */
.section { padding: 96px 0; }
.tint { background: var(--cream); }
.center-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.center-link { text-align: center; margin: 40px 0 0; }

/* Owners / tenants switch */
.switch { display: flex; width: max-content; max-width: 100%; margin: 0 auto 40px; background: var(--leaf); border-radius: 999px; padding: 6px; }
.switch button { border: 0; background: transparent; font: 500 1.02rem var(--font); color: var(--green); padding: 14px 28px; border-radius: 999px; cursor: pointer; transition: background .25s ease, color .25s ease; }
.switch button[aria-selected="true"] { background: var(--green); color: var(--white); box-shadow: 0 8px 18px rgba(31, 59, 45, .25); }
.panel-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; background: var(--cream); border-radius: 32px; padding: 32px; }
.panel-grid img { border-radius: 24px; aspect-ratio: 4 / 3.4; object-fit: cover; width: 100%; }
.panel-title { font-size: clamp(1.5rem, 2.4vw, 2rem); margin-bottom: 24px; }
@media (prefers-reduced-motion: no-preference) {
  .panel:not([hidden]) .panel-grid { animation: up .5s cubic-bezier(.2, .7, .2, 1) both; }
}
.point-list { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 18px; }
.point-list li { display: flex; gap: 16px; align-items: flex-start; }
.point-list .icon { color: var(--green); background: var(--sun); border-radius: 14px; padding: 10px; width: 46px; height: 46px; }
.point-list h3 { margin-bottom: 4px; }
.point-list p { margin: 0; color: var(--muted); font-size: .98rem; }
.point-list.big { grid-template-columns: repeat(4, 1fr); gap: 28px; margin: 0; }
.point-list.big li { flex-direction: column; background: var(--cream); border-radius: var(--radius); padding: 28px; }

/* Service cards */
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.service { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.service:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(27, 38, 32, .08); border-color: var(--sun); }
.service .icon { width: 48px; height: 48px; padding: 11px; border-radius: 14px; background: var(--leaf); color: var(--green); margin-bottom: 18px; }
.service h3 { margin-bottom: 8px; }
.service p { margin: 0; color: var(--muted); }

/* Process */
.process { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: none; position: relative; }
.process::before { content: ""; position: absolute; left: 6%; right: 6%; top: 27px; border-top: 2px dashed #c9d9cd; }
.process li { position: relative; text-align: center; padding: 0 8px; }
.step-num { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 50%; background: var(--sun); color: var(--green); font-weight: 600; font-size: 1.3rem; box-shadow: 0 0 0 8px var(--white); }
.tint .step-num { box-shadow: 0 0 0 8px var(--cream); }
.process h3 { margin-bottom: 6px; }
.process p { color: var(--muted); font-size: .97rem; margin: 0; }

/* Split band */
.split-band { background: var(--green); color: var(--white); padding: 96px 0; }
.split-band .eyebrow { color: var(--sun); }
.split-band p { color: rgba(255, 255, 255, .8); }
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split-grid figure { margin: 0; }
.split-grid img { border-radius: 28px; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.split-grid h2 { margin-bottom: 18px; }
.tint .split-grid img { aspect-ratio: 4 / 5; }
/* Handshake and key handover photo: square, shown whole. */
.tint .split-grid img.photo-handover { aspect-ratio: 1 / 1; object-position: 50% 50%; }

/* Inner page hero */
.page-hero { background: linear-gradient(180deg, var(--cream), var(--white)); padding: 64px 0 72px; }
.page-hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center; }
.page-hero-grid img { border-radius: 28px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.page-hero h1 { margin-bottom: 18px; }
.page-hero .lead { max-width: 34em; margin-bottom: 28px; }
.page-hero.slim .lead { margin-bottom: 0; }

/* Services page */
.service-detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service-detail { border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.service-detail .icon { width: 50px; height: 50px; padding: 12px; border-radius: 14px; background: var(--sun); color: var(--green); margin-bottom: 18px; }
.service-detail h2 { font-size: 1.3rem; margin-bottom: 14px; }
.check-list { list-style: none; margin: 0 0 24px; padding: 0; }
.check-list li { position: relative; padding: 6px 0 6px 30px; color: var(--muted); }
.check-list li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 16px; height: 16px; border-radius: 50%; background: var(--leaf); }
.check-list li::after { content: ""; position: absolute; left: 7px; top: 14px; width: 5px; height: 8px; border: solid var(--green); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 900px; margin: 0 auto; }
.plan { background: var(--white); border-radius: 28px; padding: 36px; border: 2px solid var(--line); position: relative; }
.plan.featured { border-color: var(--sun); box-shadow: 0 24px 50px rgba(27, 38, 32, .1); }
.plan-tag { position: absolute; top: -14px; left: 32px; background: var(--sun); color: var(--green); font-size: .82rem; font-weight: 600; padding: 5px 12px; border-radius: 999px; margin: 0; }
.plan h3 { font-size: 1.5rem; margin-bottom: 8px; }
.plan > p { color: var(--muted); }
.fine { text-align: center; color: var(--muted); font-size: .93rem; margin: 28px 0 0; }

/* Owners page */
.timeline { list-style: none; margin: 24px 0 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 100px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.timeline strong { color: var(--green); }
.faq-wrap { max-width: 820px; }
details { background: var(--cream); border-radius: 16px; margin-bottom: 12px; padding: 0 24px; }
summary { cursor: pointer; font-weight: 500; padding: 20px 30px 20px 0; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; position: absolute; right: 4px; top: 26px; width: 10px; height: 10px; border: solid var(--green); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s ease; }
details[open] summary::after { transform: rotate(-135deg); top: 30px; }
details p { color: var(--muted); padding-bottom: 18px; margin: 0; }

/* Tenants page */
.repair-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: start; }
.repair-grid h2 { margin-bottom: 16px; }
.repair-grid > div > p { color: var(--muted); }
.emergency { display: flex; align-items: center; gap: 10px; background: #fff4d6; border-radius: 14px; padding: 14px 18px; color: var(--ink) !important; font-weight: 500; }
.emergency .icon { color: var(--green); }
.repair-photo { border-radius: 24px; margin-top: 24px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

/* Forms */
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: 28px; padding: 36px; box-shadow: 0 24px 50px rgba(27, 38, 32, .07); scroll-margin-top: 100px; }
.form-card h2, .form-card h3 { margin-bottom: 22px; }
.form-card h3 { font-size: 1.5rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 24px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .9rem; font-weight: 500; }
.field input, .field select, .field textarea { font: 300 1rem var(--font); color: var(--ink); background: var(--cream); border: 2px solid transparent; border-radius: 12px; padding: 12px 14px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--sun-2); background: var(--white); }
.was-checked :invalid { border-color: #c0392b; }
.form-note { font-size: .88rem; color: var(--muted); margin: 14px 0 0; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: start; }
.contact-list { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 14px; }
.contact-list li { display: flex; gap: 16px; align-items: flex-start; background: var(--cream); border-radius: 18px; padding: 18px 20px; }
.contact-list .icon { color: var(--green); background: var(--sun); border-radius: 12px; padding: 9px; width: 42px; height: 42px; }
.contact-list strong { display: block; }
.contact-list span, .contact-list a { color: var(--muted); overflow-wrap: anywhere; }
.contact-side img { border-radius: 24px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

/* Footer */
.site-footer { background: var(--green); color: rgba(255, 255, 255, .8); padding: 0 0 32px; margin-top: 40px; }
.footer-cta { display: flex; justify-content: space-between; align-items: center; gap: 28px; background: var(--sun); color: var(--green); border-radius: 28px; padding: 40px 48px; transform: translateY(-50%); }
.footer-cta h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); margin-bottom: 6px; }
.footer-cta p { margin: 0; color: var(--green-2); }
.footer-cta .btn-sun { background: var(--green); color: var(--white); }
.footer-cta .btn-sun:hover { background: var(--green-2); }
.footer-grid { display: grid; grid-template-columns: 2fr 1.4fr 1.4fr 1fr; gap: 36px; padding-bottom: 40px; }
.footer-brand { font-size: 1.4rem; font-weight: 600; color: var(--white); margin-bottom: 8px; }
.site-footer h3 { font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--sun); margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { text-decoration: none; overflow-wrap: anywhere; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; font-size: .86rem; border-top: 1px solid rgba(255, 255, 255, .15); padding-top: 24px; }

/* Fade-in on scroll */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}

/* Tablet */
@media (max-width: 1040px) {
  .nav-toggle { display: inline-flex; }
  .main-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--white); display: none; padding: 8px 24px 24px; box-shadow: 0 16px 30px rgba(27, 38, 32, .1); }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 4px; }
  .main-nav a { display: block; padding: 12px 14px; }
  .main-nav .nav-cta a { margin: 10px 0 0; text-align: center; }
  .hero-grid, .page-hero-grid, .split-grid, .repair-grid, .contact-grid, .panel-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-media { max-width: 640px; }
  .service-grid, .service-detail-grid { grid-template-columns: 1fr 1fr; }
  .point-list.big { grid-template-columns: 1fr 1fr; }
  .process { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .process::before { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-cta { flex-direction: column; align-items: flex-start; }
}

/* Phone */
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .wrap { width: min(var(--wrap), 100% - 32px); }
  .brand-name small { display: none; }
  .hero { padding: 32px 0 64px; }
  .section, .split-band { padding: 64px 0; }
  .fc-one { left: 10px; bottom: -22px; }
  .fc-two { right: 10px; top: -18px; }
  .float-card { padding: 10px 14px; }
  .float-card span { display: none; }
  .switch { width: 100%; }
  .switch button { flex: 1; padding: 12px 10px; font-size: .92rem; }
  .panel-grid { padding: 18px; border-radius: 24px; }
  .service-grid, .service-detail-grid, .point-list.big, .process, .form-grid, .plan-grid, .footer-grid { grid-template-columns: 1fr; }
  .form-card { padding: 24px 18px; }
  .footer-cta { padding: 30px 24px; transform: translateY(-30%); }
  .timeline li { grid-template-columns: 80px 1fr; }
  .btn-row .btn { flex: 1; }
}
