/* =========================================================
   Kosta's Tile & Flooring — styles.css
   Old-World Craftsmanship. Hoosier Reliability.
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  --blue:        #009fdf;
  --blue-light:  #40b9e8;
  --blue-deep:   #0b6f9c;
  --stone:       #635e5c;   /* body text */
  --stone-warm:  #7d7774;
  --ink:         #2b2b2b;   /* headings */
  --gold:        #b08d57;   /* primary CTA / accents */
  --gold-deep:   #957243;
  --marble:      #f7f5f1;   /* page bg */
  --marble-2:    #efeae2;   /* alt section bg */
  --white:       #ffffff;
  --line:        #e3ddd3;   /* hairlines */

  --maxw: 1140px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 10px rgba(43,43,43,.06);
  --shadow-md: 0 14px 40px rgba(43,43,43,.10);
  --shadow-lg: 0 24px 60px rgba(11,58,77,.16);
  --ease: cubic-bezier(.22,.61,.36,1);

  --font-display: "Cinzel", "Times New Roman", serif;
  --font-serif:   "Cormorant Garamond", Georgia, serif;
  --font-body:    "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--stone);
  background: var(--marble);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--blue-deep); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--blue); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.15; margin: 0 0 .5em; }
p { margin: 0 0 1rem; }

.container { width: min(100% - 40px, var(--maxw)); margin-inline: auto; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--gold);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-body); font-weight: 600; font-size: .95rem;
  letter-spacing: .02em; line-height: 1;
  padding: .85rem 1.5rem; border-radius: 50px; border: 2px solid transparent;
  cursor: pointer; transition: transform .15s var(--ease), box-shadow .2s var(--ease),
              background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
  white-space: nowrap;
}
.btn-lg { padding: 1rem 1.9rem; font-size: 1rem; }
.btn-primary { background: var(--gold); color: #fff; box-shadow: 0 8px 20px rgba(176,141,87,.28); }
.btn-primary:hover { background: var(--gold-deep); color:#fff; transform: translateY(-2px); box-shadow: 0 12px 26px rgba(176,141,87,.36); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn-ghost:hover { background: rgba(255,255,255,.12); color:#fff; border-color:#fff; transform: translateY(-2px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s var(--ease), background .3s var(--ease);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 1rem; }
.brand-logo { height: 40px; width: auto; }

.main-nav { display: flex; align-items: center; }
.nav-menu { list-style: none; display: flex; align-items: center; gap: 1.6rem; margin: 0; padding: 0; }
.nav-menu a {
  color: var(--ink); font-weight: 600; font-size: .95rem; letter-spacing: .01em;
  position: relative; padding: .25rem 0;
}
.nav-menu a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--gold); transition: width .25s var(--ease);
}
.nav-menu a:not(.btn):hover { color: var(--blue-deep); }
.nav-menu a:not(.btn):hover::after { width: 100%; }
.nav-cta { color: #fff !important; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0;
  cursor: pointer; padding: 8px; margin: -8px;
}
.nav-toggle span { width: 26px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s var(--ease), opacity .2s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background:
    linear-gradient(120deg, rgba(11,58,77,.92), rgba(11,58,77,.62)),
    radial-gradient(circle at 80% 20%, rgba(64,185,232,.35), transparent 55%),
    url("../assets/mosaic.webp") center/cover no-repeat,
    #0b3a4d;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(8,40,53,.85));
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; padding: clamp(4rem, 10vw, 8rem) 0 clamp(5rem, 9vw, 7rem); max-width: 760px; }
.eyebrow {
  font-family: var(--font-body); text-transform: uppercase; letter-spacing: .22em;
  font-size: .78rem; font-weight: 600; color: var(--blue-light); margin-bottom: 1.1rem;
}
.hero-title {
  font-family: var(--font-display); font-weight: 700; color: #fff;
  font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.08; margin-bottom: 1.2rem;
  text-shadow: 0 2px 30px rgba(0,0,0,.35);
}
.hero-title .accent { color: var(--gold); }
.hero-lead {
  font-family: var(--font-serif); font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  line-height: 1.45; color: #f3eee6; max-width: 620px; margin-bottom: 1rem;
}
.hero-tag { font-weight: 600; letter-spacing: .02em; color: #cfe9f6; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ---------- Greek key divider ---------- */
.greek-key {
  position: absolute; left: 0; right: 0; bottom: 0; height: 14px; z-index: 3;
  background-color: var(--gold);
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 22px, transparent 22px 28px);
          mask: repeating-linear-gradient(90deg, #000 0 22px, transparent 22px 28px);
  opacity: .9;
}

/* ---------- Estimate banner ---------- */
.banner { background: linear-gradient(120deg, var(--blue-deep), var(--blue)); color: #fff; }
.banner-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 2.4rem 0; flex-wrap: wrap;
}
.banner-text h2 { color: #fff; font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: .3rem; }
.banner-text p { color: #e8f6fd; margin: 0; max-width: 620px; }

/* ---------- Section scaffolding ---------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section:nth-of-type(even) { background: var(--marble-2); }
.about { background: var(--white); }
.services { background: var(--marble); }
.process { background: var(--white); }
.trust { background: var(--marble-2); }
.work { background: var(--white); }
.contact { background: var(--marble); }

.section-eyebrow {
  text-transform: uppercase; letter-spacing: .2em; font-size: .78rem; font-weight: 700;
  color: var(--gold-deep); margin-bottom: .6rem;
}
.section-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.8rem, 4vw, 2.7rem); margin-bottom: 1rem; }
.section-head.center { text-align: center; max-width: 720px; margin: 0 auto 3rem; }
.section-intro { font-family: var(--font-serif); font-size: 1.2rem; color: var(--stone); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.mosaic-frame {
  position: relative; border-radius: 50%; overflow: hidden; aspect-ratio: 1;
  box-shadow: var(--shadow-lg); border: 10px solid #fff; outline: 1px solid var(--line);
  max-width: 420px; margin-inline: auto;
}
.mosaic-frame img { width: 100%; height: 100%; object-fit: cover; }
.about-copy p:last-child { margin-bottom: 0; }

/* ---------- Services ---------- */
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 2rem 1.6rem; box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--gold); }
.card-icon {
  width: 54px; height: 54px; display: grid; place-items: center; border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--blue-light)); color: #fff;
  font-size: 1.5rem; margin-bottom: 1.1rem;
}
.card h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.card p { margin: 0; font-size: .96rem; }

/* ---------- Process ---------- */
.process-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.note-box {
  margin-top: 1.6rem; background: var(--marble-2); border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 1.2rem 1.4rem;
}
.note-box strong { display: block; color: var(--ink); margin-bottom: .25rem; font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; }
.note-box p { margin: 0 0 .4rem; font-weight: 600; color: var(--ink); }
.note-box .note-fine { font-weight: 400; font-size: .9rem; color: var(--stone-warm); margin: 0; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.steps li { display: flex; gap: 1rem; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.3rem; box-shadow: var(--shadow-sm); }
.step-num {
  flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; color: #fff; font-size: 1.05rem;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
}
.steps h3 { font-size: 1.05rem; margin: 0 0 .2rem; }
.steps p { margin: 0; font-size: .95rem; }

/* ---------- Trust ---------- */
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.trust-tile { text-align: center; padding: 1.5rem 1rem; }
.trust-icon {
  width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center;
  font-size: 1.7rem; color: var(--blue-deep); background: #fff; border: 2px solid var(--gold);
  box-shadow: var(--shadow-sm);
}
.trust-tile h3 { font-size: 1.1rem; margin-bottom: .4rem; }
.trust-tile p { font-size: .95rem; margin: 0; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.4fr .8fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.contact-form { margin-top: 1.6rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { margin-bottom: 1rem; display: flex; flex-direction: column; }
.field label { font-weight: 600; font-size: .9rem; color: var(--ink); margin-bottom: .4rem; }
.req { color: #c0392b; }
.optional { color: var(--stone-warm); font-weight: 400; }
.field input, .field textarea {
  font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  padding: .8rem .95rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--marble); transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--blue); background: #fff;
  box-shadow: 0 0 0 3px rgba(0,159,223,.15);
}
.field textarea { resize: vertical; }
.field.invalid input, .field.invalid textarea { border-color: #c0392b; box-shadow: 0 0 0 3px rgba(192,57,43,.12); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-submit { margin-top: .5rem; }
.form-status { margin: 1rem 0 0; font-weight: 600; min-height: 1.2em; }
.form-status.success { color: #2e7d32; }
.form-status.error { color: #c0392b; }
.form-submit.loading { opacity: .7; pointer-events: none; }

.contact-side { display: grid; gap: 1.2rem; }
.info-card { background: var(--marble); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem; }
.info-card h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gold-deep); margin-bottom: .5rem; }
.info-card p { margin: 0; }
.info-link { font-weight: 600; word-break: break-word; }

/* Our Work gallery */
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.work-item {
  position: relative; margin: 0; overflow: hidden; border-radius: var(--radius-lg);
  aspect-ratio: 4 / 3; box-shadow: var(--shadow-sm); border: 1px solid var(--line);
}
.work-item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .55s var(--ease);
}
.work-item:hover img, .work-item:focus-within img { transform: scale(1.07); }
.work-item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 1.6rem .9rem .85rem;
  color: #fff; font-weight: 600; letter-spacing: .01em; font-size: 1rem;
  background: linear-gradient(transparent, rgba(8,40,53,.88));
}
.work-note {
  margin: 1.8rem 0 0; text-align: center; font-size: .9rem; color: var(--stone-warm);
  font-style: italic;
}

/* ---------- Footer ---------- */
.site-footer { background: #20262b; color: #c9cdd1; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 2rem; padding: 3.2rem 0 2.4rem; }
.footer-logo-plaque { background: #fff; border-radius: var(--radius); padding: 1.2rem; display: inline-block; box-shadow: var(--shadow-md); }
.footer-logo-plaque img { height: 130px; width: auto; }
.footer-col h4 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: .8rem; }
.footer-col p { margin: 0 0 .6rem; font-size: .95rem; }
.footer-col a { color: var(--blue-light); }
.footer-col a:hover { color: #fff; }
.footer-col .fine { color: #8b9197; font-size: .85rem; }
.footer-bar { border-top: 1px solid rgba(255,255,255,.08); }
.footer-bar-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.2rem 0; flex-wrap: wrap; }
.footer-bar p { margin: 0; font-size: .85rem; color: #8b9197; }
.back-to-top { color: var(--blue-light); font-weight: 600; font-size: .9rem; }
.back-to-top:hover { color: #fff; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .about-grid, .process-grid, .contact-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .mosaic-frame { max-width: 340px; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 72px; }
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch;
    gap: 0; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
    padding: .5rem 20px 1.2rem; transform: translateY(-130%); transition: transform .3s var(--ease);
    max-height: calc(100vh - 72px); overflow-y: auto;
  }
  .nav-menu.open { transform: translateY(0); }
  .nav-menu li { width: 100%; }
  .nav-menu a:not(.btn) { display: block; padding: .9rem .25rem; border-bottom: 1px solid var(--line); }
  .nav-menu a:not(.btn)::after { display: none; }
  .nav-cta { margin-top: .8rem; width: 100%; }
  .banner-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 540px) {
  .form-row { grid-template-columns: 1fr; }
  .card-grid, .trust-grid, .work-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .footer-bar-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
