/* ==========================================================================
   Page-specific styling for index.html (KE Property investment site).
   Shared rules (reset, variables, nav shell, buttons, hero skeleton,
   section headers, etc.) live in style.css.
   ========================================================================== */

/* Stats bar */
.stats-bar {
  background: var(--white);
  border-bottom: 1px solid rgba(184, 173, 152, 0.2);
  padding: 4rem 2rem;
}

.stats-grid {
  max-width: var(--content-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: left;
}

.stat-item .stat-number {
  font-family: "Cormorant Garamond", serif;
  font-size: 3.2rem;
  font-weight: 600;
  color: var(--primary-dark);
  line-height: 1;
}

.stat-item .stat-label {
  margin-top: 0.75rem;
  color: var(--soft-gray);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
}

.section-header .eyebrow {
  color: var(--primary-dark);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.feature-card {
  border: 1px solid transparent;
}

.feature-card:hover {
  border-color: var(--primary);
}

/* About section */
.about {
  padding: 8rem 2rem;
  background: var(--cream);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image {
  order: 2;
  aspect-ratio: 4/5;
  border-radius: 16px;
  overflow: hidden;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-text .eyebrow {
  color: var(--primary-dark);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.about-text h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: 2.3rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
  color: var(--charcoal);
}

.about-text p {
  color: var(--soft-gray);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
  line-height: 1.9;
}

.about-text .signature {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.6rem;
  font-style: italic;
  color: var(--charcoal);
  margin-top: 2rem;
}

.about-text .signature small {
  display: block;
  font-family: "Outfit", sans-serif;
  font-style: normal;
  font-size: 0.85rem;
  color: var(--soft-gray);
  letter-spacing: 0.05em;
  margin-top: 0.4rem;
}

/* Landing page: investment / holiday lets sections */
.split-section {
  padding: 8rem 2rem;
  background: var(--white);
}

.split-section.alt {
  background: var(--cream);
}

.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.split-grid.reverse .split-image {
  order: 2;
}

.split-image {
  aspect-ratio: 1/1;
  border-radius: 16px;
  overflow: hidden;
}

.split-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.split-text .eyebrow {
  color: var(--primary-dark);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.split-text h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: 2.3rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
  color: var(--charcoal);
}

.split-text p {
  color: var(--soft-gray);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
  line-height: 1.9;
}

.split-list {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
}

.split-list li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.6rem;
  color: var(--charcoal);
}

.split-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 1em;
  height: 1em;
  background: var(--primary-dark);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Process Section — timeline with nodes */
.process {
  padding: 8rem 2rem;
  background: var(--cream);
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
  margin-top: 4rem;
}

.process-step {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.75rem 0.5rem;
  text-align: center;
  padding: 1.75rem 1rem 0;
  position: relative;
}

.process-step .step-number,
.process-step h3,
.process-step p {
  margin: 0;
}

/* little hollow node, centered on the connecting line */
.process-step::before {
  content: "";
  position: absolute;
  top: 0.4rem;
  left: 50%;
  width: 0.625rem;
  height: 0.625rem;
  box-sizing: border-box;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--primary);
  transform: translate(-50%, -50%);
  z-index: 1;
}

/* connecting line: runs from this node's edge, across the gap,
   to the next node's edge */
.process-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 0.4rem;
  left: calc(50% + 0.3125rem);
  width: calc(100% + 2.5rem - 0.625rem);
  height: 1.5px;
  background: var(--primary-light);
  transform: translateY(-50%);
  z-index: 0;
}

.process-step .step-number {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--primary);
}

.process-step h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.5rem;
  color: var(--charcoal);
}

.process-step p {
  flex-basis: 100%;
  color: var(--soft-gray);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Investment Focus (amenities) override */
.amenity-check {
  font-size: 0.9rem;
}

/* Testimonials */
.testimonials {
  padding: 8rem 2rem;
  background: var(--white);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
  max-width: 950px;
  margin: 0 auto;
}

.testimonial-card {
  background: var(--cream);
  padding: 2.5rem;
  border-left: 3px solid var(--primary);
}

.testimonial-card p {
  color: var(--soft-gray);
  font-size: 1.02rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.testimonial-author {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.2rem;
  color: var(--charcoal);
}

.testimonial-author small {
  display: block;
  font-family: "Outfit", sans-serif;
  font-style: normal;
  font-size: 0.85rem;
  color: var(--primary-dark);
  letter-spacing: 0.05em;
  margin-top: 0.3rem;
}

.cta .book-btn {
  color: var(--primary-dark);
}

/* Contact Section */
.contact-section {
  padding: 8rem 2rem;
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  color: var(--white);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 5rem;
}

.contact-info h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: 2.3rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
  color: var(--charcoal);
}

.contact-info p {
  color: var(--soft-gray);
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.contact-detail .icon {
  width: 44px;
  height: 44px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  font-size: 1.15rem;
  line-height: 1;
}

.contact-detail h4 {
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: var(--charcoal);
  margin-bottom: 0.25rem;
}

.contact-detail p,
.contact-detail a {
  color: var(--soft-gray);
  text-decoration: none;
  font-size: 0.98rem;
}

.contact-detail a:hover {
  color: var(--primary-dark);
}

.contact-form {
  padding: 3rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--soft-gray);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.9rem 0;
  border: none;
  border-bottom: 1px solid rgba(184, 173, 152, 0.4);
  background: transparent;
  font-family: "Outfit", sans-serif;
  font-size: 1rem;
  color: var(--charcoal);
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-bottom-color: var(--primary);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.contact-form button {
  width: 100%;
  margin-top: 1rem;
  border: none;
}

.form-note {
  font-size: 0.85rem;
  color: var(--soft-gray);
  margin-top: 1rem;
  text-align: left;
}

.form-success {
  display: none;
  background: rgba(184, 173, 152, 0.15);
  border-left: 3px solid var(--primary);
  padding: 1.5rem;
  margin-top: 1.5rem;
  font-size: 0.95rem;
  color: var(--charcoal);
}

/* Footer */
.footer-bottom {
  padding-top: 1.5rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero h1 {
    font-size: 3rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .amenities-list {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem 2rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-image {
    order: 0;
    aspect-ratio: 16/9;
  }

  .split-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .split-grid.reverse .split-image {
    order: 0;
  }

  .split-image {
    aspect-ratio: 16/9;
  }

  .process-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 3rem;
  }

  .process-step {
    justify-content: flex-start;
    text-align: left;
    padding: 0 0 2.5rem 2rem;
  }

  .process-step:last-child {
    padding-bottom: 0;
  }

  /* centered on the heading text rather than the desktop top-offset */
  .process-step::before {
    top: 1.5rem;
    left: 0;
  }

  .process-step:not(:last-child)::after {
    top: 1.8125rem;
    left: 0;
    width: 1.5px;
    height: auto;
    bottom: -1.1875rem;
    transform: translateX(-50%);
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.6rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

  .about-image {
    aspect-ratio: 4/3;
  }

  .split-section {
    padding: 5rem 1.5rem;
  }

  .split-image {
    aspect-ratio: 4/3;
  }

  .split-text h2 {
    font-size: 2rem;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .cta h2 {
    font-size: 2rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Contact section sits on the primary gradient, so text/inputs are light */
.contact-info h2,
.contact-detail h4,
.contact-detail p,
.contact-detail a,
.contact-info p,
.form-group label,
.form-group input,
.form-group select,
.form-group textarea,
.form-note {
  color: var(--white);
}

.contact-info p,
.contact-detail p,
.contact-detail a,
.form-group label,
.form-note {
  opacity: 0.9;
}

.contact-detail a:hover {
  color: var(--white);
  opacity: 1;
}

.contact-detail .icon {
  background: rgba(255, 255, 255, 0.28);
}

.form-group input,
.form-group select,
.form-group textarea {
  border-bottom-color: rgba(255, 255, 255, 0.5);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-bottom-color: var(--white);
}

.form-group select option {
  color: var(--charcoal);
}

.contact-form button {
  background: var(--white);
  color: var(--primary-dark);
}

.contact-form button:hover {
  background: var(--cream);
}

/* Desktop: section photos bleed out to the window edge with a slanted inner edge */
@media (min-width: 1025px) {
  .split-section,
  .about {
    overflow-x: clip;
    --bleed: max(2rem, calc((100vw - var(--content-width)) / 2));
    --slant: 5rem;
  }

  .split-image,
  .about-image {
    aspect-ratio: auto;
    position: relative;
    height: max(32rem, calc(100vh - 4.5rem));
    border-radius: 0;
    overflow: visible;
    filter: drop-shadow(0 1.25rem 1.75rem rgba(40, 32, 20, 0.28))
      drop-shadow(0 0.25rem 0.5rem rgba(40, 32, 20, 0.18));
  }

  .split-image img,
  .about-image img {
    position: absolute;
    inset: 0;
  }

  /* Holiday Lets section fills the visible window (below the nav) */
  #holiday-lets {
    padding-top: 0;
    padding-bottom: 0;
  }

  /* image on the left: extend to the left, slant the right edge */
  .split-grid:not(.reverse) .split-image {
    margin-left: calc(var(--bleed) * -1);
  }

  .split-grid:not(.reverse) .split-image img {
    clip-path: polygon(0 0, 100% 0, calc(100% - var(--slant)) 100%, 0 100%);
  }

  /* image on the right: extend to the right, slant the left edge */
  .split-grid.reverse .split-image,
  .about-image {
    margin-right: calc(var(--bleed) * -1);
  }

  .split-grid.reverse .split-image img,
  .about-image img {
    clip-path: polygon(0 0, 100% 0, 100% 100%, var(--slant) 100%);
  }
}

/* Tablet / phone: photos stay above the text but keep the desktop styling -
   full-bleed to the window edges, a slanted edge and a floating shadow */
@media (max-width: 1024px) {
  .split-section,
  .about {
    overflow-x: clip;
    --slant: 3rem;
  }

  .split-image,
  .about-image {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    border-radius: 0;
    overflow: visible;
    filter: drop-shadow(0 1.25rem 1.75rem rgba(40, 32, 20, 0.28))
      drop-shadow(0 0.25rem 0.5rem rgba(40, 32, 20, 0.18));
  }

  /* slant the lower edge, alternating direction like the desktop sections */
  .split-image img,
  .about-image img {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - var(--slant)));
  }

  .split-grid.reverse .split-image img,
  .about-image img {
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--slant)), 0 100%);
  }
}

/* Home page: sections gently snap into place when scrolling */
html:has(#holiday-lets) {
  scroll-padding-top: 4.5rem;
}

html:has(#holiday-lets) .hero,
html:has(#holiday-lets) .split-image,
html:has(#holiday-lets) .about-image,
html:has(#holiday-lets) .contact-section {
  scroll-snap-align: start;
}

/* Snapping is desktop-only and strict: scrolling never rests between sections.
   Tablets and phones scroll normally. */
@media (min-width: 1025px) {
  html:has(#holiday-lets) {
    scroll-snap-type: y mandatory;
  }

  html:has(#holiday-lets) footer {
    scroll-snap-align: end;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:has(#holiday-lets) {
    scroll-snap-type: none;
  }
}

/* Blend the seams between sections: each section fades to a shared mid-tone
   at its top and bottom, so neighbouring sections meet without a hard line */
.split-section,
.about {
  --seam: color-mix(in srgb, var(--white) 50%, var(--cream));
  --seam-size: 6rem;
}

.split-section {
  background: linear-gradient(
    to bottom,
    var(--seam),
    var(--white) var(--seam-size),
    var(--white) calc(100% - var(--seam-size)),
    var(--seam)
  );
}

.split-section.alt {
  background: linear-gradient(
    to bottom,
    var(--seam),
    var(--cream) var(--seam-size),
    var(--cream) calc(100% - var(--seam-size)),
    var(--seam)
  );
}

.about {
  background: linear-gradient(to bottom, var(--seam), var(--cream) var(--seam-size));
}

/* Our Project: collage of photo tiles of different sizes */
.project {
  padding: 8rem 2rem;
  background: var(--white);
}

.project-collage {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 13rem;
  grid-auto-flow: dense;
  gap: 1rem;
  margin-top: 3rem;
}

.project-tile {
  margin: 0;
  overflow: hidden;
  border-radius: 12px;
  background: var(--cream);
}

.project-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.project-tile:hover img {
  transform: scale(1.05);
}

.project-wide {
  grid-column: span 2;
}

.project-tall {
  grid-row: span 2;
}

.project-full {
  grid-column: span 4;
  grid-row: span 2;
}

.project-big {
  grid-column: span 2;
  grid-row: span 2;
}

@media (max-width: 768px) {
  .project {
    padding: 5rem 1.5rem;
  }

  .project-collage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 10rem;
    gap: 0.75rem;
  }
}

/* Project collage: tiles open the photo lightbox */
.project-tile {
  position: relative;
  cursor: pointer;
}

.project-tile:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

.project-more-btn {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: rgba(20, 18, 16, 0.55);
  color: var(--white);
  font-family: "Cormorant Garamond", serif;
  font-size: 2.6rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.project-more-btn:hover {
  background: rgba(20, 18, 16, 0.7);
}

/* Photo lightbox (same look as the holiday let pages) */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 16, 0.92);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox-overlay.open {
  display: flex;
}

.lightbox-image {
  width: min(1100px, 90vw);
  height: min(750px, 80vh);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.lightbox-close {
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  font-size: 1.6rem;
  line-height: 1;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  font-size: 1.8rem;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-nav:hover {
  transform: translateY(-50%) scale(1.05);
}

.lightbox-prev {
  left: 1.5rem;
}

.lightbox-next {
  right: 1.5rem;
}

.lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  padding: 0.5rem 1.1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

@media (max-width: 1024px) {
  .lightbox-image {
    width: 95vw;
    height: 70vh;
  }

  .lightbox-nav {
    width: 44px;
    height: 44px;
    font-size: 1.4rem;
  }

  .lightbox-prev {
    left: 0.5rem;
  }

  .lightbox-next {
    right: 0.5rem;
  }

  .lightbox-close {
    top: 1rem;
    right: 1rem;
  }
}

/* Touch screens: no sticky hover effects (lift, icon spin, slide) after a tap */
@media (hover: none) {
  .feature-card:hover {
    transform: none;
    box-shadow: none;
  }

  .feature-card:hover .feature-icon {
    transform: none;
    background: var(--primary);
  }

  .amenity-item:hover {
    transform: none;
    background: rgba(184, 173, 152, 0.1);
  }
}

/* Small screens: slimmer icons so titles get more room, form lines up with text */
@media (max-width: 480px) {
  .feature-card {
    padding: 1.5rem;
    column-gap: 1rem;
  }

  .feature-icon {
    width: 40px;
    height: 40px;
  }

  .feature-icon svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 768px) {
  .contact-form {
    padding: 0;
  }
}
