/* Jose Tile — site styles */

:root {
  --paper: #fbf8f3;
  --plaster: #f2ece2;
  --stone: #e5dccf;
  --line: #d8cebf;
  --ink: #1c1f22;
  --ink-2: #4a5056;
  --ink-3: #777c81;
  --clay: #b0502a;
  --clay-deep: #8b3d1e;
  --sage: #5d6d60;
  --night: #1e2830;
  --night-2: #2a3640;
  --radius: 6px;
  --wrap: 1180px;
  --header-h: 68px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; }
a:hover { color: var(--clay); }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 0.45em;
  font-variation-settings: "opsz" 96;
}
h1 { font-size: clamp(2.5rem, 5.6vw, 4.5rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.32rem; font-variation-settings: "opsz" 24; }
p { margin: 0 0 1em; }
em { font-style: italic; color: var(--clay); }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.eyebrow {
  display: flex; align-items: center; gap: 0.6em;
  font: 700 0.75rem/1.2 var(--sans);
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--clay); margin: 0 0 1.1rem;
}
.eyebrow::before {
  content: ""; width: 10px; height: 10px; flex: none;
  background: currentColor; box-shadow: 13px 0 0 var(--line);
  margin-right: 13px;
}
.lede { font-size: 1.16rem; color: var(--ink-2); max-width: 36em; }
.muted { color: var(--ink-3); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  padding: 0.85em 1.4em; border-radius: var(--radius);
  background: var(--clay); color: #fff; border: 1px solid var(--clay);
  font: 700 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--clay-deep); border-color: var(--clay-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-light:hover { background: transparent; color: var(--paper); border-color: var(--paper); }
.btn-small { padding: 0.55em 0.95em; font-size: 0.92rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.8rem; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 248, 243, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 1.35rem/1 var(--serif); letter-spacing: -0.01em; }
.brand:hover { color: inherit; }
.brand-mark { width: 30px; height: 30px; }
.brand-mark rect { fill: var(--ink); }
.brand-mark .a { fill: var(--clay); }
.brand-mark .b { fill: var(--stone); }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a:not(.btn) { text-decoration: none; font-weight: 600; font-size: 0.97rem; color: var(--ink-2); padding: 6px 0; border-bottom: 2px solid transparent; }
.site-nav a:not(.btn):hover, .site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--clay); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px 12px; font: 700 0.9rem var(--sans); color: var(--ink); cursor: pointer;
}

@media (max-width: 880px) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 16px 18px;
  }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: 13px 0; border-bottom: 1px solid var(--line); }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--line); color: var(--clay); }
  .site-nav .btn { margin-top: 14px; }
}

/* ---------- Sections ---------- */

.section { padding: clamp(64px, 9vw, 116px) 0; }
.section-alt { background: var(--plaster); }
.section-dark { background: var(--night); color: #efe9df; }
.section-dark .lede, .section-dark .muted { color: #c5c0b6; }
.section-dark .eyebrow::before { box-shadow: 13px 0 0 var(--night-2); }
.section-head { max-width: 720px; margin-bottom: 48px; }

/* Hero */
.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(56px, 8vw, 104px); }
.hero-grid { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 { margin-bottom: 0.35em; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 2.2rem 0 0; padding: 0; list-style: none; font-size: 0.95rem; color: var(--ink-2); }
.hero-facts li { display: flex; align-items: center; gap: 8px; }
.hero-facts li::before { content: ""; width: 7px; height: 7px; background: var(--sage); }

.hero-photo { position: relative; margin: 0; aspect-ratio: 1; border-radius: 4px; overflow: hidden; background: var(--stone); box-shadow: 0 30px 60px -30px rgba(40, 30, 20, 0.45); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo figcaption .btn { white-space: nowrap; }
.hero-photo figcaption {
  position: absolute; left: 14px; right: 14px; bottom: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: rgba(251, 248, 243, 0.94); border-radius: var(--radius); padding: 10px 10px 10px 16px;
  font-size: 0.9rem; font-weight: 600;
}

/* Service cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 22px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: var(--stone); }
.card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.card-body p { color: var(--ink-2); font-size: 0.98rem; }
.card-body .more { margin-top: auto; font-weight: 700; text-decoration: none; color: var(--clay); }

/* Recent projects strip */
.recent-head { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; }
.recent-head h2 { margin: 0; }
.recent-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.recent-grid a { display: block; border-radius: 4px; overflow: hidden; background: var(--stone); }
.recent-grid img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; transition: transform 0.4s ease; }
.recent-grid a:hover img { transform: scale(1.03); }

/* Visualizer promo */
.promo { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.promo-shot { border-radius: 4px; overflow: hidden; aspect-ratio: 16 / 10; position: relative; background: var(--night-2); }
.promo-shot canvas { width: 100%; height: 100%; }
.promo-shot::after {
  content: "Tile visualizer"; position: absolute; top: 14px; left: 14px;
  background: var(--clay); color: #fff; font: 700 0.72rem var(--sans); letter-spacing: 0.12em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 3px;
}
.checks { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; gap: 10px; }
.checks li { padding-left: 28px; position: relative; }
.checks li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 12px; height: 12px; border: 2px solid var(--clay); }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: step; border-top: 1px solid var(--line); }
.steps li { counter-increment: step; padding: 28px 24px 8px 0; border-right: 1px solid var(--line); margin-right: 24px; }
.steps li:last-child { border-right: 0; margin-right: 0; }
.steps li::before { content: "0" counter(step); display: block; font: 500 2.4rem/1 var(--serif); color: var(--clay); margin-bottom: 16px; }
.steps h3 { margin-bottom: 0.35em; }
.steps p { color: var(--ink-2); font-size: 0.98rem; }

/* Craft points */
.craft { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--night-2); border: 1px solid var(--night-2); }
.craft div { background: var(--night); padding: 30px 30px 22px; }
.craft h3 { color: #fff; }
.craft p { color: #c5c0b6; font-size: 0.98rem; }

/* Service area */
.area { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
.towns { columns: 2; gap: 24px; list-style: none; padding: 0; margin: 0; }
.towns li { padding: 8px 0; border-bottom: 1px solid var(--line); break-inside: avoid; }

/* CTA band */
.cta-band { background: var(--clay); color: #fff; padding: clamp(48px, 7vw, 80px) 0; }
.cta-row { display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; }
.cta-row h2 { margin: 0; max-width: 14em; }
.cta-phone { font: 500 clamp(1.6rem, 3vw, 2.2rem)/1 var(--serif); color: #fff; text-decoration: none; display: block; margin-bottom: 14px; }
.cta-phone:hover { color: #fff; text-decoration: underline; }

/* Page header (inner pages) */
.page-head { padding: clamp(44px, 7vw, 88px) 0 clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); max-width: 16em; }

/* Services page */
.service { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(28px, 5vw, 64px); padding: clamp(44px, 6vw, 72px) 0; border-bottom: 1px solid var(--line); align-items: start; scroll-margin-top: calc(var(--header-h) + 16px); }
.service:last-child { border-bottom: 0; }
.service-photo { width: 100%; height: auto; max-height: 640px; object-fit: cover; border-radius: 4px; background: var(--stone); }
.service ul { padding-left: 1.1em; color: var(--ink-2); }
.service li { margin-bottom: 0.35em; }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.gallery-grid figure { margin: 0; }
.gallery-grid canvas { width: 100%; aspect-ratio: 1; border-radius: 4px; background: var(--stone); }
.gallery-grid figcaption { font-size: 0.9rem; color: var(--ink-2); padding-top: 10px; }
.notice { background: var(--plaster); border-left: 4px solid var(--clay); padding: 18px 22px; border-radius: 0 var(--radius) var(--radius) 0; margin-bottom: 40px; max-width: 760px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
.form-grid { display: grid; gap: 18px; }
.form-row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 6px; }
input, select, textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--clay); outline-offset: 0; border-color: var(--clay); }
textarea { min-height: 160px; resize: vertical; }
.optional { font-weight: 500; color: var(--ink-3); }
.hp { position: absolute; left: -9999px; }
.form-status { display: none; padding: 14px 18px; border-radius: var(--radius); margin-bottom: 18px; font-weight: 600; }
.form-status.is-visible { display: block; }
.form-status.ok { background: #e4ece3; color: #2f4a33; }
.form-status.err { background: #f6e1d8; color: #7a2f14; }
.info-card { background: var(--plaster); border-radius: var(--radius); padding: 30px; }
.info-card dl { margin: 0 0 24px; display: grid; gap: 18px; }
.info-card dt { font: 700 0.74rem var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.info-card dd { margin: 0; font-size: 1.05rem; }
.info-card .big { font: 500 1.7rem/1.1 var(--serif); text-decoration: none; }
.map { width: 100%; aspect-ratio: 4 / 3; border: 0; border-radius: var(--radius); margin-top: 8px; background: var(--stone); }

/* ---------- Visualizer ---------- */

.vz-page { padding: 28px 0 80px; }
.vz-intro { display: flex; justify-content: space-between; align-items: end; gap: 20px 40px; flex-wrap: wrap; margin-bottom: 22px; }
.vz-intro h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 0; }
.vz-intro p { margin: 0; max-width: 34em; color: var(--ink-2); }
.vz { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 28px; align-items: start; }
.vz-stage-wrap { position: sticky; top: calc(var(--header-h) + 16px); }
.vz-stage { position: relative; border-radius: 4px; overflow: hidden; background: var(--stone); box-shadow: 0 24px 50px -28px rgba(40, 30, 20, 0.5); }
.vz-stage canvas { width: 100%; height: auto; }
.vz-note a { color: inherit; }
.vz-busy {
  position: absolute; top: 12px; right: 12px; padding: 6px 12px; border-radius: 99px;
  background: rgba(28, 31, 34, 0.75); color: #fff; font-size: 0.8rem; font-weight: 700;
}
.vz-busy[hidden] { display: none; }
.vz-summary { display: grid; gap: 2px; margin: 14px 0 0; font-size: 0.92rem; color: var(--ink-2); }
.vz-note { font-size: 0.85rem; color: var(--ink-3); margin-top: 10px; }

.vz-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 22px 22px; }
.vz-group { padding: 18px 0; border-bottom: 1px solid var(--line); }
.vz-group:last-of-type { border-bottom: 0; }
.vz-group h2 { font: 700 0.74rem var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 12px; }
.vz-group h2 span { text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--ink); font-size: 0.85rem; margin-left: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: 600 0.9rem var(--sans); color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 99px; padding: 7px 14px; cursor: pointer;
}
.chip:hover:not(:disabled) { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip:disabled { opacity: 0.35; cursor: not-allowed; }
.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.swatch { display: flex; flex-direction: column; justify-content: flex-start; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; font: 600 0.72rem/1.25 var(--sans); color: var(--ink-2); }
.swatch canvas { width: 100%; aspect-ratio: 1; border-radius: 4px; outline: 1px solid var(--line); outline-offset: -1px; margin-bottom: 5px; }
.swatch[aria-pressed="true"] canvas { outline: 3px solid var(--clay); outline-offset: 2px; }
.swatch[aria-pressed="true"] { color: var(--ink); }
.dots { display: flex; flex-wrap: wrap; gap: 10px; }
.dot { width: 34px; height: 34px; border-radius: 50%; background: var(--dot); border: 1px solid rgba(0, 0, 0, 0.18); cursor: pointer; }
.dot[aria-pressed="true"] { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--clay); }
.vz-actions { display: grid; gap: 10px; padding-top: 18px; }

/* ---------- Footer ---------- */

.site-footer { background: var(--night); color: #c5c0b6; padding: 64px 0 28px; font-size: 0.96rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer .brand { color: #fff; margin-bottom: 14px; }
.site-footer .brand-mark rect { fill: #efe9df; }
.site-footer .brand-mark .a { fill: var(--clay); }
.site-footer .brand-mark .b { fill: var(--night-2); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer h3 { font: 700 0.74rem var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: #8d8a84; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer address { font-style: normal; margin-bottom: 10px; }
.footer-base { border-top: 1px solid var(--night-2); margin-top: 48px; padding-top: 22px; font-size: 0.86rem; color: #8d8a84; }

/* ---------- Responsive ---------- */

@media (max-width: 1020px) {
  .vz { grid-template-columns: 1fr; }
  .vz-stage-wrap { position: sticky; top: var(--header-h); z-index: 5; background: var(--paper); padding: 8px 0 10px; margin: 0 -16px; padding-inline: 16px; }
  .vz-summary, .vz-note { display: none; }
  .swatches { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
}
@media (max-width: 900px) {
  .hero-grid, .promo, .area, .contact-grid, .service { grid-template-columns: 1fr; }
  .hero-photo { aspect-ratio: 4 / 3; }
  .recent-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li:nth-child(2) { border-right: 0; margin-right: 0; }
  .craft { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .steps { grid-template-columns: 1fr; }
  .steps li { border-right: 0; margin-right: 0; border-bottom: 1px solid var(--line); padding-right: 0; }
  .form-row.two { grid-template-columns: 1fr; }
  .towns { columns: 1; }
  .footer-grid { grid-template-columns: 1fr; }
  .vz-stage-wrap { margin: 0 -16px; padding: 0 0 8px; }
  .vz-stage { border-radius: 0; }
  .hero-photo figcaption { font-size: 0.82rem; }
}

/* ---------- Project gallery ---------- */

.gallery-section { padding-top: 36px; }
.gallery-filters { margin-bottom: 28px; }
.photo-grid { columns: 3 300px; column-gap: 14px; }
.photo-grid figure { margin: 0 0 14px; break-inside: avoid; }
.photo-grid figure[hidden] { display: none; }
.photo-grid a { display: block; border-radius: 4px; overflow: hidden; background: var(--stone); }
.photo-grid img { width: 100%; height: auto; transition: transform 0.4s ease; }
.photo-grid a:hover img { transform: scale(1.03); }

.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100dvh; width: 100vw; height: 100dvh; }
.lightbox::backdrop { background: rgba(14, 17, 20, 0.92); }
.lightbox[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.lightbox img { max-width: calc(100vw - 32px); max-height: calc(100dvh - 110px); width: auto; height: auto; border-radius: 3px; }
.lightbox-caption { color: #e9e4da; margin: 0; padding: 0 60px; text-align: center; font-size: 0.95rem; }
.lb-btn {
  position: fixed; width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(251, 248, 243, 0.14); color: #fff; font: 400 2rem/1 var(--sans);
}
.lb-btn:hover { background: rgba(251, 248, 243, 0.28); }
.lb-close { top: calc(16px + env(safe-area-inset-top)); right: calc(16px + env(safe-area-inset-right)); }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
@media (max-width: 560px) {
  .photo-grid { columns: 2; column-gap: 8px; }
  .photo-grid figure { margin-bottom: 8px; }
  .lb-prev, .lb-next { top: auto; bottom: calc(16px + env(safe-area-inset-bottom)); transform: none; }
  .lightbox img { max-height: calc(100dvh - 160px); }
}

/* Touch screens: finger-sized controls (about 44px) */
@media (pointer: coarse) {
  .chip { min-height: 42px; padding: 9px 16px; }
  .dot { width: 42px; height: 42px; }
  .dots { gap: 12px; }
  .btn-small { min-height: 42px; }
  .site-footer li a, .site-footer address + a { display: inline-block; padding: 6px 0; }
}
@media (max-width: 400px) {
  .hero-photo figcaption { font-size: 0.78rem; padding-left: 12px; }
}
