/* ============================================
   KONA CONSTRUCTIONS — STYLESHEET
   Clean, bold, minimal, premium.
   ============================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --black: #000;
  --white: #fff;
  --off-white: #f7f7f7;
  --gray-100: #f0f0f0;
  --gray-200: #e0e0e0;
  --gray-300: #ccc;
  --gray-400: #999;
  --gray-500: #666;
  --gray-600: #444;
  --gray-700: #333;
  --gray-800: #1a1a1a;
  --gray-900: #111;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;

  --nav-height: 80px;
  --container-max: 1200px;
  --container-pad: 24px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul { list-style: none; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}


/* ---------- Typography ---------- */
.section__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 12px;
}

.section__title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.1;
  color: var(--black);
  margin-bottom: 20px;
}

.section__desc {
  font-size: 1.1rem;
  color: var(--gray-500);
  max-width: 560px;
  line-height: 1.7;
}

.section__header {
  margin-bottom: 60px;
}

.section {
  padding: 100px 0;
}

@media (min-width: 768px) {
  .section { padding: 140px 0; }
  .section__header { margin-bottom: 80px; }
}


/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 16px 36px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.35s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.btn--primary:hover {
  background: var(--gray-800);
  border-color: var(--gray-800);
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn--outline:hover {
  background: var(--white);
  color: var(--black);
  transform: translateY(-2px);
}

.btn--full {
  width: 100%;
}


/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

.nav--scrolled {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}

.nav__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo img {
  height: 55px;
  width: auto;
  transition: filter 0.3s ease;
}

/* Logo invert: white on dark hero, black when scrolled */
.nav:not(.nav--scrolled) .nav__logo img {
  filter: brightness(0) invert(1);
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav__link {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  position: relative;
  transition: color 0.3s ease;
}

.nav--scrolled .nav__link {
  color: var(--gray-700);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: currentColor;
  transition: width 0.35s var(--ease-out);
}

.nav__link:hover::after,
.nav__link--active::after {
  width: 100%;
}

.nav__link--cta {
  padding: 10px 24px;
  border: 1.5px solid currentColor;
  transition: all 0.3s ease;
}

.nav__link--cta::after { display: none; }

.nav__link--cta:hover {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.nav--scrolled .nav__link--cta:hover {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

/* Mobile toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: all 0.3s ease;
  transform-origin: center;
}

.nav--scrolled .nav__toggle span {
  background: var(--black);
}

.nav__toggle--active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav__toggle--active span:nth-child(2) {
  opacity: 0;
}

.nav__toggle--active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 768px) {
  .nav__toggle { display: flex; }

  .nav__menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100dvh;
    background: var(--black);
    flex-direction: column;
    justify-content: center;
    gap: 32px;
    transform: translateX(100%);
    transition: transform 0.5s var(--ease-out);
  }

  .nav__menu--open {
    transform: translateX(0);
  }

  .nav__menu--open .nav__link {
    color: var(--white);
  }

  .nav__link {
    font-size: 1.2rem;
    letter-spacing: 0.15em;
  }

  .nav__link--cta {
    border-color: var(--white);
    color: var(--white);
  }
}


/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-900);
  overflow: hidden;
}

/* Geometric background pattern */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  /* TODO: Replace with a hero background image:
     background: url('../assets/hero.jpg') center/cover no-repeat;
     Use a dramatic construction/build photo — scaffolding, framing, finished deck, etc.
  */
  background:
    linear-gradient(135deg, rgba(0,0,0,0.03) 25%, transparent 25%),
    linear-gradient(225deg, rgba(0,0,0,0.03) 25%, transparent 25%),
    linear-gradient(315deg, rgba(0,0,0,0.03) 25%, transparent 25%),
    linear-gradient(45deg, rgba(0,0,0,0.03) 25%, transparent 25%);
  background-size: 60px 60px;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.6) 50%,
    rgba(0, 0, 0, 0.85) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 var(--container-pad);
  max-width: 800px;
}

.hero__label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 24px;
}

.hero__title {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  line-height: 1;
  color: var(--white);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 300;
  color: var(--gray-300);
  max-width: 520px;
  margin: 0 auto 48px;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Scroll indicator */
.hero__scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--gray-400);
  z-index: 2;
}

.hero__scroll span {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero__scroll-line {
  width: 1px;
  height: 48px;
  background: var(--gray-600);
  position: relative;
  overflow: hidden;
}

.hero__scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--white);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0% { top: -100%; }
  50% { top: 100%; }
  100% { top: 100%; }
}


/* ---------- Services ---------- */
.services {
  background: var(--off-white);
}

.services__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--gray-200);
  border: 1px solid var(--gray-200);
}

@media (min-width: 640px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .services__grid { grid-template-columns: repeat(3, 1fr); }
}

.service-card {
  background: var(--white);
  padding: 48px 36px;
  transition: all 0.4s var(--ease-out);
  position: relative;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--black);
  transition: width 0.5s var(--ease-out);
}

.service-card:hover::before {
  width: 100%;
}

.service-card:hover {
  background: var(--gray-900);
  color: var(--white);
}

.service-card__number {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-300);
  margin-bottom: 24px;
  letter-spacing: 0.05em;
  transition: color 0.4s ease;
}

.service-card:hover .service-card__number {
  color: var(--gray-500);
}

.service-card__title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.3;
  transition: color 0.4s ease;
}

.service-card:hover .service-card__title {
  color: var(--white);
}

.service-card__desc {
  font-size: 0.9rem;
  color: var(--gray-500);
  line-height: 1.7;
  transition: color 0.4s ease;
}

.service-card:hover .service-card__desc {
  color: var(--gray-400);
}


/* ---------- About ---------- */
.about__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 60px;
  align-items: center;
}

@media (min-width: 768px) {
  .about__grid {
    grid-template-columns: 1fr 1fr;
    gap: 80px;
  }
}

.about__image-placeholder {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  border: 1px dashed var(--gray-300);
}

.about__text {
  font-size: 1.05rem;
  color: var(--gray-600);
  line-height: 1.8;
  margin-bottom: 20px;
}

.about__stats {
  display: flex;
  gap: 48px;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--gray-200);
}

.stat__number {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--black);
  display: block;
  line-height: 1;
}

.stat__suffix {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--black);
}

.stat__label {
  font-size: 0.8rem;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 8px;
  display: block;
}


/* ---------- Gallery ---------- */
.gallery {
  background: var(--gray-900);
}

.gallery .section__label { color: var(--gray-500); }
.gallery .section__title { color: var(--white); }
.gallery .section__desc { color: var(--gray-400); }

.gallery__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width: 640px) {
  .gallery__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .gallery__grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .gallery__item--wide {
    grid-column: span 2;
  }
}

.gallery__item {
  overflow: hidden;
  position: relative;
}

.gallery__placeholder {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--gray-800);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  border: 1px dashed var(--gray-700);
  transition: all 0.5s var(--ease-out);
}

.gallery__item:hover .gallery__placeholder {
  background: var(--gray-700);
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16 / 10;
  transition: transform 0.6s var(--ease-out);
}

.gallery__item:hover img {
  transform: scale(1.05);
}

.gallery__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
  color: var(--white);
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.4s var(--ease-out);
}

.gallery__item:hover .gallery__overlay {
  opacity: 1;
  transform: translateY(0);
}

.gallery__overlay h4 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.gallery__overlay p {
  font-size: 0.8rem;
  color: var(--gray-300);
  letter-spacing: 0.02em;
}


/* ---------- Contact ---------- */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 60px;
}

@media (min-width: 768px) {
  .contact__grid {
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
  }
}

.contact__text {
  font-size: 1.05rem;
  color: var(--gray-500);
  line-height: 1.8;
  margin-bottom: 40px;
}

.contact__details {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact__detail {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.95rem;
  color: var(--gray-600);
  transition: color 0.3s ease;
}

.contact__detail:hover {
  color: var(--black);
}

.contact__detail svg {
  flex-shrink: 0;
  color: var(--gray-400);
}

/* Form */
.form__group {
  position: relative;
  margin-bottom: 24px;
}

.form__input {
  width: 100%;
  padding: 18px 0 12px;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--gray-800);
  background: transparent;
  border: none;
  border-bottom: 1.5px solid var(--gray-200);
  outline: none;
  transition: border-color 0.3s ease;
}

.form__input:focus {
  border-color: var(--black);
}

.form__label {
  position: absolute;
  top: 18px;
  left: 0;
  font-size: 0.9rem;
  color: var(--gray-400);
  pointer-events: none;
  transition: all 0.3s ease;
}

.form__input:focus ~ .form__label,
.form__input:not(:placeholder-shown) ~ .form__label {
  top: 0;
  font-size: 0.7rem;
  color: var(--black);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
}

.form__input--textarea {
  resize: vertical;
  min-height: 120px;
}

.contact__form .btn {
  margin-top: 12px;
}


/* ---------- Footer ---------- */
.footer {
  background: var(--black);
  padding: 60px 0 40px;
  color: var(--gray-500);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  text-align: center;
}

.footer__logo {
  filter: brightness(0) invert(1);
  opacity: 0.6;
  height: 32px;
  width: auto;
}

.footer__tagline {
  font-size: 0.85rem;
  margin-top: 8px;
}

.footer__links {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer__links a {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-500);
  transition: color 0.3s ease;
}

.footer__links a:hover {
  color: var(--white);
}

.footer__copy {
  font-size: 0.75rem;
  color: var(--gray-600);
}


/* ---------- Reveal Animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children in grids */
.services__grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.services__grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.services__grid .reveal:nth-child(4) { transition-delay: 0.24s; }
.services__grid .reveal:nth-child(5) { transition-delay: 0.32s; }
.services__grid .reveal:nth-child(6) { transition-delay: 0.40s; }
.services__grid .reveal:nth-child(7) { transition-delay: 0.48s; }
.services__grid .reveal:nth-child(8) { transition-delay: 0.56s; }
.services__grid .reveal:nth-child(9) { transition-delay: 0.64s; }

.gallery__grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.gallery__grid .reveal:nth-child(3) { transition-delay: 0.2s; }
.gallery__grid .reveal:nth-child(4) { transition-delay: 0.3s; }
.gallery__grid .reveal:nth-child(5) { transition-delay: 0.4s; }
.gallery__grid .reveal:nth-child(6) { transition-delay: 0.5s; }


/* ---------- Utility ---------- */
@media (max-width: 768px) {
  .hero__scroll { display: none; }
}

/* Smooth page load */
body {
  animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
