/* styles.css — KGF Renovations (full file)
   Includes:
   - Base theme + layout
   - Hero / sections / services / gallery / modal
   - Fix for svc-img “bottom lift” (image fills perfectly)
   - Email fallback overlay styles
*/

:root {
  --text: #eaf0ff;
  --muted: #a7b4cc;
  --line: rgba(255, 255, 255, .12);
  --radius: 18px;
  --shadow: 0 14px 40px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  background-color: #001e1d;
  color: var(--text);
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

/* Floating back-to-top button */
.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  display: none;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .10);
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
  backdrop-filter: blur(10px);
}
.to-top.show { display: inline-flex; align-items: center; gap: 8px; }
.to-top:hover { background: rgba(255, 255, 255, .14); }

/* Topbar */
.topbar {
  background: rgba(255, 255, 255, .06);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  flex-wrap: wrap;
}
.chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
}
.toplink {
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  opacity: .9;
}
.toplink:hover { opacity: 1; text-decoration: underline; }
.dot { opacity: .5; padding: 0 6px; }

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 15, 20, .8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 14px;
}
.brand{
  display:flex;
  align-items:center;
  gap:14px;
  text-decoration:none;
}

/* Ensure logo is exactly 100px tall */
.brand-logo{
  height:100px;
  width:auto;
  display:block;
}

/* Stack name + sub neatly */
.brand-text{
  display:flex;
  flex-direction:column;
  justify-content:center;
  line-height:1;
}

/* Make the name visually the same “height” as the logo area */
.brand-name{
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.5px;

  /* Key part: big type + tight line-height */
  font-size:44px;     /* adjust 40–52 depending on your logo proportions */
  line-height:1;
  margin:0;
  padding:0;
}

/* Sub line smaller and readable */
.brand-sub{
  margin-top:6px;
  font-size:14px;
  line-height:1.2;
  opacity:.85;
}

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  opacity: .9;
}
.nav a:hover { opacity: 1; }

.burger {
  display: none;
  width: 46px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .06);
  cursor: pointer;
}
.burger span {
  display: block;
  height: 2px;
  margin: 7px 11px;
  background: rgba(255, 255, 255, .85);
  border-radius: 2px;
}

/* Mobile menu */
.mobile { display: none; padding: 0 0 14px 0; }
.mobile.is-open { display: block; }
.mobile-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .05);
  padding: 10px;
  box-shadow: var(--shadow);
}
.m-link {
  display: block;
  padding: 12px 12px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  opacity: .95;
}
.m-link:hover { background: rgba(255, 255, 255, .06); }
.m-cta { border: 1px solid rgba(255, 255, 255, .18); }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(800px 500px at 20% 30%, rgba(74, 163, 255, .32), transparent 55%),
    radial-gradient(700px 520px at 70% 60%, rgba(124, 247, 199, .18), transparent 55%),
    linear-gradient(180deg, rgba(11, 15, 20, .35), rgba(11, 15, 20, .92));
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.25fr .85fr;
  gap: 22px;
  padding: 46px 0;
}
.hero h1 {
  font-size: clamp(32px, 4vw, 54px);
  margin: 0 0 10px 0;
  letter-spacing: -.6px;
}
.lead {
  margin: 0 0 22px 0;
  color: rgba(234, 240, 255, .88);
  font-size: 16px;
  line-height: 1.6;
  max-width: 56ch;
}
.hero-copy { padding: 10vh 0; }

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.hero-badges { display: flex; gap: 10px; flex-wrap: wrap; }
.badge {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .06);
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
}

/* Sections */
.section { padding: 58px 0; }
.section-alt {
  background: rgba(255, 255, 255, .03);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 22px;
}
.section-title h2 {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 34px);
}
.section-title p {
  margin: 0;
  color: var(--muted);
  max-width: 60ch;
  line-height: 1.6;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

/* UPDATED CARD BACKGROUND */
.card,
.hero-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(0, 30, 30, .50);
  padding: 18px;
  box-shadow: var(--shadow);
}
.card h3,
.hero-card h3 { margin: 0 0 8px 0; }

.muted { color: var(--muted); }
.small { font-size: 12px; }

.note {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

/* Forms */
.form { margin-top: 12px; }
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .28);
  color: var(--text);
  outline: none;
}
input:focus,
textarea:focus,
select:focus {
  border-color: rgba(74, 163, 255, .7);
  box-shadow: 0 0 0 4px rgba(74, 163, 255, .18);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;

  border: 1px solid rgb(9 121 0 / 55%);
  background: linear-gradient(180deg, rgb(0 73 26 / 95%), rgb(0 47 10 / 72%));

  color: #999a9b;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition: transform .12s ease, filter .12s ease, opacity .12s ease, box-shadow .12s ease;
}
.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 10px 30px rgba(74, 163, 255, .18);
}
.btn:active { transform: translateY(0); opacity: .95; }

.btn-ghost {
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 800;
}
.btn-ghost:hover { background: rgba(255, 255, 255, .08); }

.btn-small { padding: 10px 14px; }
.btn-full { width: 100%; }

.cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* Services */
.services-grid2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.svc-card {
  display: flex;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .04);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* ✅ FIX: image fills perfectly (no bottom “lift”) */
.svc-img{
  width: 160px;
  min-width: 160px;
  background: rgba(255,255,255,.03);
  border-right: 1px solid var(--line);
  overflow: hidden;

  /* make the image container stretch and remove baseline issues */
  display: flex;
  align-self: stretch;
}
.svc-img img{
  display: block;      /* removes inline baseline gap */
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.svc-body {
  padding: 14px 14px 14px 0;
  flex: 1;
  min-width: 0;
}

/* PERFECT ALIGNMENT FOR TITLE + BUTTON */
.svc-top {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 10px;
  margin-bottom: 8px;
}
.svc-top h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
  min-width: 0;
  word-break: break-word;
}
.svc-top .btn {
  white-space: nowrap;
  align-self: start;
  justify-self: end;
}

.svc-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}
.svc-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.svc-tags span {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .05);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.service-note {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  color: var(--muted);
}

/* Projects */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.g {
  appearance: none;
  border: none;
  padding: 0;
  margin: 0;
  width: 100%;
  text-align: left;
  cursor: pointer;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  min-height: 220px;
  box-shadow: var(--shadow);
}
.g img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}
.g span {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .45);
  border: 1px solid rgba(255, 255, 255, .18);
  font-weight: 700;
  font-size: 12px;
  color: var(--text);
}
.g:focus {
  outline: 3px solid rgba(74, 163, 255, .55);
  outline-offset: 2px;
}

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

/* Footer */
.footer { padding: 26px 0; border-top: 1px solid var(--line); }
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 99999;
}
.modal.is-open { display: block; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .65);
  backdrop-filter: blur(4px);
}
.modal-panel {
  position: relative;
  width: min(980px, calc(100% - 26px));
  margin: 4vh auto;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  background: rgba(15, 23, 34, .95);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
  overflow: hidden;
  max-height: 92vh;
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .06);
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
  z-index: 5;
}
.modal-body {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 0;
  max-height: 92vh;
}
.modal-media {
  position: relative;
  background: rgba(0, 0, 0, .25);
  min-height: 520px;
}
.modal-media img {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
  display: block;
}
.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .35);
  color: var(--text);
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-nav.prev { left: 12px; }
.modal-nav.next { right: 12px; }

.modal-info {
  padding: 18px;
  border-left: 1px solid var(--line);
  overflow: auto;
}
.modal-info h3 { margin: 0 0 8px 0; font-size: 20px; }

.modal-thumbs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.modal-thumb {
  width: 84px;
  height: 64px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  padding: 0;
  cursor: pointer;
}
.modal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.modal-thumb.is-active {
  outline: 3px solid rgba(74, 163, 255, .55);
  border-color: rgba(74, 163, 255, .55);
}
.modal-actions { margin-top: 16px; }

/* Responsive */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .nav { display: none; }
  .burger { display: block; }
  .cards { grid-template-columns: 1fr; }
  .services-grid2 { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .svc-img { width: 140px; min-width: 140px; }

  /* Stack section titles sooner */
  .section-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .section-title p { max-width: 70ch; }
}

@media (max-width: 900px) {
  .modal-body { grid-template-columns: 1fr; }
  .modal-info { border-left: none; border-top: 1px solid var(--line); }
  .modal-media,
  .modal-media img { min-height: 320px; }
  .modal-media img { max-height: 46vh; min-height: 320px; }
  .modal-info { max-height: 46vh; }
}

@media (max-width: 520px) {
  .svc-card { flex-direction: column; }
  .svc-img {
    width: 100%;
    min-width: 0;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .svc-body { padding: 14px; }

  /* keep button alignment neat on very small screens */
  .svc-top { grid-template-columns: 1fr; gap: 10px; }
  .svc-top .btn { justify-self: start; width: fit-content; }

  .brand-logo{ height:72px; }
  .brand-name{ font-size:30px; }
  .brand-sub{ font-size:12px; }
}


/* Mobile Section Title Fix + hide topbar */
@media (max-width: 768px) {
  .section-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .section-title h2 { width: 100%; }
  .section-title p { width: 100%; font-size: 14px; line-height: 1.6; }
  .topbar { display: none; }
}

/* Desktop hero spacing */
@media (min-width: 981px) {
  .hero-copy { padding: 24px 0; }
}

/* =========================
   Email fallback overlay
   ========================= */
#emailFallback{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(4px);
  display:none;
  z-index:999999;
  padding:18px;
}
#emailFallback.show{
  display:flex;
  align-items:center;
  justify-content:center;
}
.email-fallback-card{
  width:min(560px, 100%);
  border:1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  background: rgba(15,23,34,.96);
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
  padding:16px;
}
.email-fallback-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.email-fallback-x{
  width:42px;
  height:42px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-size:24px;
  cursor:pointer;
}
.email-fallback-actions{
  display:flex;
  flex-direction:column;
  gap:12px;
}
