/* City View Masonry Ltd. - styles */

/* ============ Tokens ============ */
:root {
  --slate: #2A3743;        /* headings */
  --slate-deep: #1F2A34;   /* dark panels, header */
  --sandstone: #E0B354;    /* accent */
  --sandstone-hover: #EBC46E;
  --stone: #F3F2EE;        /* light panels */
  --line: #DEDAD2;
  --ink: #2B333B;          /* body text */
  --muted: #5E6872;
  --white: #FFFFFF;

  --display: "DM Serif Display", Georgia, "Times New Roman", serif;
  --body: "Manrope", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1240px;
  --gutter: clamp(18px, 4vw, 40px);
  --frame: clamp(8px, 1.2vw, 16px);   /* inset around the hero, like a picture frame */
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 8px;

  /* Brick textures used until real photos are added */
  --brick-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='48'%3E%3Crect width='64' height='48' fill='%2328333E'/%3E%3Crect x='0' y='0' width='62' height='22' fill='%231F2A34'/%3E%3Crect x='-32' y='24' width='62' height='22' fill='%23222D38'/%3E%3Crect x='32' y='24' width='62' height='22' fill='%231F2A34'/%3E%3C/svg%3E");
  --brick-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='48'%3E%3Crect width='64' height='48' fill='%23B9B1A3'/%3E%3Crect x='0' y='0' width='62' height='22' fill='%23C9C2B5'/%3E%3Crect x='-32' y='24' width='62' height='22' fill='%23C4BDAF'/%3E%3Crect x='32' y='24' width='62' height='22' fill='%23C9C2B5'/%3E%3C/svg%3E");
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.08;
  margin: 0;
  color: var(--slate);
  letter-spacing: -0.01em;
}
h2 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); line-height: 1.05; }
h3 { font-size: 1.35rem; letter-spacing: 0; }
/* Italic is used for the second half of a headline, never for single words */
h1 em, h2 em { font-style: italic; }
address { font-style: normal; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

:focus-visible { outline: 3px solid var(--sandstone); outline-offset: 3px; border-radius: 3px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--sandstone); color: var(--slate-deep); padding: 10px 16px; z-index: 100; font-weight: 700; border-radius: var(--radius-sm); }
.skip:focus { left: 12px; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--body); font-weight: 650; font-size: 1rem; line-height: 1.2;
  padding: 13px 22px; border-radius: var(--radius-sm); border: 2px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-lg { padding: 16px 28px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-gold { background: var(--sandstone); color: var(--slate-deep); }
.btn-gold:hover { background: var(--sandstone-hover); }
.btn-dark { background: var(--slate-deep); color: var(--white); }
.btn-dark:hover { background: #2E3D4A; }
.btn-outline-light { border-color: rgba(255,255,255,.7); color: var(--white); }
.btn-outline-light:hover { background: rgba(255,255,255,.12); border-color: var(--white); }
.btn-outline-dark { border-color: var(--slate-deep); color: var(--slate-deep); }
.btn-outline-dark:hover { background: var(--slate-deep); color: var(--white); }
.btn[disabled] { opacity: .65; cursor: progress; }

/* ============ Header ============ */
.site-header {
  position: fixed; z-index: 50;
  top: var(--frame); left: var(--frame); right: var(--frame);
  color: var(--white);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  transition: background-color .25s ease, box-shadow .25s ease, top .25s ease, left .25s ease, right .25s ease, border-radius .25s ease;
}
.site-header.scrolled {
  top: 0; left: 0; right: 0; border-radius: 0;
  background: var(--slate-deep);
  box-shadow: 0 6px 24px rgba(15, 22, 29, .25);
}
.header-inner {
  position: relative; display: flex; align-items: center;
  max-width: calc(var(--wrap) + 40px); margin: 0 auto; padding: 0 var(--gutter);
  height: 92px; transition: height .25s ease;
}
.site-header.scrolled .header-inner { height: 72px; }

.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--white); }
.logo-mark { width: 36px; height: 36px; flex: none; color: var(--white); }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-text strong { font-family: var(--display); font-weight: 400; font-size: 1.5rem; letter-spacing: 0; }
.logo-text span { font-size: .78rem; font-weight: 600; letter-spacing: .06em; opacity: .8; margin-top: 3px; }
.site-header .logo { position: absolute; left: 50%; transform: translateX(-50%); }

.nav { flex: 1; display: flex; align-items: center; justify-content: space-between; }
.nav-group { display: flex; align-items: center; gap: 30px; }
.nav a:not(.btn) { text-decoration: none; font-weight: 600; font-size: .98rem; opacity: .92; }
.nav a:not(.btn):hover { opacity: 1; text-decoration: underline; text-underline-offset: 7px; text-decoration-thickness: 2px; text-decoration-color: var(--sandstone); }
.nav .btn { padding: 11px 20px; }

.menu-toggle {
  display: none; margin-left: auto; align-items: center; gap: 10px;
  background: rgba(255,255,255,.08); border: 1.5px solid rgba(255,255,255,.4); color: var(--white);
  font: inherit; font-weight: 650; font-size: .95rem; padding: 9px 14px; border-radius: var(--radius-sm); cursor: pointer;
}
.menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .2s ease, background-color .2s ease; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -6px; }
.menu-icon::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-icon { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-icon::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon::after { transform: translateY(-6px) rotate(-45deg); }

/* ============ Hero ============ */
.hero { padding: var(--frame) var(--frame) 0; }
.hero-frame {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg);
  min-height: min(94vh, 900px);
  display: flex; align-items: flex-end;
  color: var(--white);
  background-color: var(--slate-deep);
  background-image:
    linear-gradient(180deg, rgba(15,22,29,.55) 0%, rgba(15,22,29,.25) 35%, rgba(15,22,29,.78) 100%),
    url("images/hero.jpg"),
    var(--brick-dark);
  background-size: cover, cover, 64px 48px;
  background-position: center, center, center;
}
.hero-content {
  width: 100%; max-width: calc(var(--wrap) + 40px); margin: 0 auto;
  padding: 150px var(--gutter) clamp(40px, 6vw, 72px);
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 28px clamp(32px, 6vw, 96px);
  align-items: end;
}
.hero-title {
  color: var(--white);
  font-size: clamp(2.8rem, 6.6vw, 5.8rem);
  font-weight: 400; line-height: 1.02;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.hero-side { display: grid; gap: 16px; font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: rgba(255,255,255,.9); max-width: 34em; padding-bottom: 6px; }
.hero-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 14px; }

/* One orchestrated entrance on page load */
@media (prefers-reduced-motion: no-preference) {
  .hero-title, .hero-side, .hero-actions { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
  .hero-side { animation-delay: .15s; }
  .hero-actions { animation-delay: .3s; }
  @keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
}

/* ============ Sections ============ */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-tight { padding: clamp(8px, 2vw, 16px) 0; }
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 64px; align-items: end; margin-bottom: 36px; }
.section-head p { color: var(--muted); font-size: 1.1rem; max-width: 34em; }

.pill {
  display: inline-block; font-size: .85rem; font-weight: 600; color: var(--slate);
  border: 1.5px solid var(--line); background: var(--white);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 20px;
}

/* About */
.about-card {
  display: grid; grid-template-columns: 1fr 1.1fr;
  background: var(--stone); border-radius: var(--radius-lg); overflow: hidden;
}
.about-photo {
  min-height: 560px;
  background-color: #C9C2B5;
  background-image: url("images/about.jpg"), var(--brick-light);
  background-size: cover, 64px 48px;
  background-position: center, center;
}
.about-body { padding: clamp(32px, 5vw, 72px); align-self: center; }
.about-body h2 { margin-bottom: 22px; text-wrap: balance; }
.about-body p { color: var(--muted); }
.about-body p + p { margin-top: 16px; }
.about-sub { font-size: 1.45rem; margin: 26px 0 8px; }
.footer-brand p + p { margin-top: 6px; }
.checks { list-style: none; margin: 26px 0 30px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
.checks li { position: relative; padding-left: 30px; font-weight: 600; color: var(--slate); }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .22em; width: 20px; height: 20px; border-radius: 50%;
  background: var(--sandstone) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%231F2A34' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/20px no-repeat;
}
.about-actions, .cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Services */
.services-panel {
  display: grid; grid-template-columns: 1fr 2fr; gap: clamp(32px, 5vw, 64px);
  background: var(--slate-deep); color: rgba(255,255,255,.78);
  border-radius: var(--radius-lg); padding: clamp(32px, 5vw, 64px);
}
.services-intro h2 { color: var(--white); margin-bottom: 18px; }
.services-intro p { margin-bottom: 28px; max-width: 26em; }
.services-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.service {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-md); padding: 24px 22px; color: rgba(255,255,255,.72);
  transition: border-color .2s ease, background-color .2s ease;
}
.service:hover { border-color: rgba(224,179,84,.6); background: rgba(255,255,255,.07); }
.service svg { width: 30px; height: 21px; color: #6B7783; margin-bottom: 18px; }
.service h3 { color: var(--white); margin-bottom: 8px; font-size: 1.12rem; }
.service p { font-size: .95rem; line-height: 1.55; }

/* Slideshow */
.slider { position: relative; outline: none; }
.slides {
  position: relative; aspect-ratio: 16 / 8; overflow: hidden;
  border-radius: var(--radius-lg); background: var(--slate-deep); touch-action: pan-y;
}
.slide { position: absolute; inset: 0; margin: 0; opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility 0s linear .9s; }
.slide.is-active { opacity: 1; visibility: visible; transition: opacity .9s ease; z-index: 1; }
.slide .photo { position: absolute; inset: 0; }
.slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 7s ease-out; }
.slide.is-active img { transform: scale(1); }
.slide figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 96px clamp(22px, 4vw, 44px) clamp(22px, 3.5vw, 38px);
  background: linear-gradient(transparent, rgba(15,22,29,.88));
  color: rgba(255,255,255,.85); font-size: 1.05rem;
  transform: translateY(14px); opacity: 0; transition: transform .7s ease .35s, opacity .7s ease .35s;
}
.slide.is-active figcaption { transform: none; opacity: 1; }
.slide figcaption strong {
  display: block; color: var(--white); font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.5rem); font-weight: 400; letter-spacing: -0.01em; line-height: 1.1; margin-bottom: 6px;
}
.slider-arrow {
  position: absolute; top: 50%; z-index: 3; width: 54px; height: 54px; margin-top: -27px;
  border: 0; border-radius: 50%; background: rgba(255,255,255,.94); color: var(--slate-deep);
  display: grid; place-items: center; cursor: pointer; box-shadow: 0 8px 22px rgba(0,0,0,.25);
  transition: background-color .15s ease, transform .15s ease;
}
.slider-arrow:hover { background: var(--sandstone); transform: scale(1.06); }
.slider-arrow svg { width: 22px; height: 22px; }
.slider-arrow.prev { left: 18px; }
.slider-arrow.next { right: 18px; }
.slider-bar { display: flex; align-items: center; gap: 16px; margin-top: 18px; }
.slider-count { font-family: var(--display); font-weight: 400; font-size: 1.25rem; color: var(--slate); min-width: 3.5em; font-variant-numeric: tabular-nums; }
.slider-progress { flex: 1; height: 4px; background: #E3E0D9; overflow: hidden; border-radius: 2px; }
.slider-progress span { display: block; height: 100%; width: 100%; background: var(--sandstone); transform-origin: left; transform: scaleX(0); }
.slider-progress span.run { animation: fill 6s linear forwards; }
.slider.paused .slider-progress span.run { animation-play-state: paused; }
@keyframes fill { to { transform: scaleX(1); } }
.slider-pause { font: inherit; font-weight: 600; font-size: .95rem; background: none; border: 1.5px solid var(--line); color: var(--slate); padding: 7px 16px; border-radius: var(--radius-sm); cursor: pointer; }
.slider-pause:hover { border-color: var(--slate); }
.thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-top: 16px; }
.thumb { position: relative; padding: 0; border: 0; cursor: pointer; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius-sm); opacity: .5; transition: opacity .2s ease; background: none; }
.thumb:hover { opacity: .85; }
.thumb[aria-current="true"] { opacity: 1; box-shadow: inset 0 -4px 0 var(--sandstone); }
.thumb .photo { position: absolute; inset: 0; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Photo placeholder (shown until real photos are added to /images) */
.photo { background-color: #C9C2B5; background-image: var(--brick-light); background-size: 64px 48px; }
.photo.is-empty::after {
  content: "Add photo: " attr(data-file); position: absolute; left: 18px; top: 18px; z-index: 1;
  background: rgba(31,42,52,.85); color: var(--white); font-size: .82rem; padding: 5px 12px; border-radius: 999px;
}
.thumb .photo.is-empty::after { display: none; }

/* Call to action band */
.cta-band {
  border-radius: var(--radius-lg); overflow: hidden;
  padding: clamp(28px, 7vw, 96px) clamp(20px, 5vw, 64px);
  background-color: var(--slate-deep);
  background-image: linear-gradient(90deg, rgba(15,22,29,.55), rgba(15,22,29,.1)), url("images/cta.jpg"), var(--brick-dark);
  background-size: cover, cover, 64px 48px;
  background-position: center, center, center;
}
.cta-card { background: var(--white); border-radius: var(--radius-md); padding: clamp(28px, 4vw, 48px); max-width: 580px; box-shadow: 0 20px 50px rgba(15,22,29,.25); }
.cta-card h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: 16px; text-wrap: balance; }
.cta-card p { color: var(--muted); margin-bottom: 26px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(40px, 6vw, 88px); align-items: start; }
.contact-intro { margin-top: 18px; color: var(--muted); font-size: 1.1rem; max-width: 30em; }
.contact-details { list-style: none; margin: 32px 0 0; padding: 0; }
.contact-details li { padding: 18px 0; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.contact-details li:last-child { border-bottom: 1px solid var(--line); }
.contact-details .label { font-size: .88rem; color: var(--muted); font-weight: 500; }
.contact-details a, .contact-details li > span:not(.label) { font-size: 1.12rem; font-weight: 650; color: var(--slate); text-decoration: none; overflow-wrap: anywhere; }
.contact-details a:hover { text-decoration: underline; text-decoration-color: var(--sandstone); text-decoration-thickness: 2px; text-underline-offset: 5px; }

.form { background: var(--stone); padding: clamp(24px, 4vw, 44px); border-radius: var(--radius-lg); }
.form h3 { font-size: 1.5rem; margin-bottom: 6px; }
.form-sub { color: var(--muted); margin-bottom: 26px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field label { font-weight: 600; font-size: .95rem; color: var(--slate); }
.field label .opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--ink);
  padding: 13px 14px; border: 1.5px solid #CFCAC0; border-radius: var(--radius-sm); background: var(--white); width: 100%;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--slate); box-shadow: 0 0 0 3px rgba(224,179,84,.45); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #A4321F; }
.form-error { color: #A4321F; font-size: .9rem; font-weight: 600; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; opacity: 0; }
.form-status { margin-top: 14px; font-weight: 600; min-height: 1.6em; }
.form-status.ok { color: #2E6B3F; }
.form-status.err { color: #A4321F; }

/* Footer */
.site-footer { display: grid; grid-template-columns: 1fr 1.6fr; }
.footer-brand { background: var(--slate-deep); color: rgba(255,255,255,.7); padding: clamp(40px, 6vw, 72px) clamp(24px, 5vw, 64px); }
.footer-brand p { margin-top: 18px; max-width: 26em; font-size: .97rem; }
.logo-footer .logo-mark { width: 40px; height: 40px; }
.footer-links { background: #ECEBE7; padding: clamp(40px, 6vw, 72px) clamp(24px, 5vw, 64px); display: grid; grid-template-columns: auto 1fr; gap: 24px 64px; align-content: center; }
.footer-links nav { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: var(--slate); text-decoration: none; font-weight: 600; }
.footer-links a:hover { text-decoration: underline; text-decoration-color: var(--sandstone); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.footer-links address { color: var(--muted); line-height: 1.9; }
.copyright { grid-column: 1 / -1; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); padding-top: 20px; }

/* ============ Responsive ============ */
@media (max-width: 1040px) {
  .site-header .logo { position: static; transform: none; }
  .menu-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; top: calc(100% - 6px); left: var(--gutter); right: var(--gutter);
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--slate-deep); border-radius: var(--radius-md); padding: 10px;
    box-shadow: 0 18px 40px rgba(0,0,0,.35);
  }
  .nav.open { display: flex; }
  .nav-group { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav a:not(.btn) { padding: 13px 14px; border-radius: var(--radius-sm); }
  .nav a:not(.btn):hover { background: rgba(255,255,255,.06); text-decoration: none; }
  .nav .btn { margin-top: 6px; }
  .services-panel { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .hero-content { grid-template-columns: 1fr; padding-top: 130px; }
  .about-card { grid-template-columns: 1fr; }
  .about-photo { min-height: 300px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .section-head { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr; }
  .slides { aspect-ratio: 4 / 3; }
}
@media (max-width: 600px) {
  .header-inner { height: 76px; }
  .logo-text strong { font-size: 1.15rem; }
  .hero-frame { min-height: 88vh; }
  .hero-actions .btn { flex: 1 1 100%; }
  .services-grid { grid-template-columns: 1fr; }
  .checks { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .slides { aspect-ratio: 4 / 5; }
  .slider-arrow { width: 44px; height: 44px; margin-top: -22px; }
  .slider-arrow.prev { left: 10px; }
  .slider-arrow.next { right: 10px; }
  .thumbs { gap: 6px; }
  .footer-links { grid-template-columns: 1fr; }
  .about-actions .btn, .cta-actions .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .slide img, .slide.is-active img { transform: none; }
  /* Keep the slideshow timer working if someone presses Play */
  .slider-progress span.run { animation: fill 6s linear forwards !important; }
}
