/* ============================================================
   The Tile Network — shared styles
   ============================================================ */

:root {
  --navy: #0e2338;
  --navy-2: #163654;
  --navy-soft: #142c46;
  --orange: #f2a93d;
  --orange-dark: #dc9328;
  --bg: #fbfbfd;
  --bg-alt: #f5f5f7;
  --ink: #1d1d1f;
  --gray: #6e6e73;
  --gray-light: #86868b;
  --line: #d2d2d7;
  --white: #ffffff;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-soft: 0 20px 40px -20px rgba(14, 35, 56, 0.25);
  --shadow-card: 0 2px 20px rgba(0, 0, 0, 0.06);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 64px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Typography ---------- */

h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; font-weight: 600; }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange-dark);
  margin-bottom: 14px;
}

.display {
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
  font-weight: 650;
  letter-spacing: -0.03em;
  color: var(--navy);
}

.display-sm {
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.08;
  font-weight: 650;
  letter-spacing: -0.025em;
  color: var(--navy);
}

.lede {
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.5;
  color: var(--gray);
  font-weight: 400;
  max-width: 620px;
}

.lede.center { margin: 16px auto 0; text-align: center; }

p { color: var(--gray); line-height: 1.65; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.35s var(--ease), background 0.25s ease, box-shadow 0.25s ease, border-color .25s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--orange);
  color: var(--navy);
  box-shadow: 0 8px 24px -10px rgba(242, 169, 61, 0.65);
}
.btn-primary:hover { background: var(--orange-dark); }

.btn-dark {
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 8px 24px -10px rgba(14, 35, 56, 0.5);
}
.btn-dark:hover { background: var(--navy-2); }

.btn-outline {
  background: transparent;
  border-color: var(--line);
  color: var(--navy);
}
.btn-outline:hover { border-color: var(--navy); }

.btn-outline-light {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.4);
  color: var(--white);
}
.btn-outline-light:hover { background: rgba(255,255,255,0.16); }

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 500;
  display: flex;
  align-items: center;
  background: rgba(251, 251, 253, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: background .3s ease;
}

.nav-inner {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  color: var(--navy);
}
.brand img { height: 34px; width: auto; border-radius: 6px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  opacity: 0.82;
  transition: opacity .2s ease;
  position: relative;
}
.nav-links a:hover { opacity: 1; }
.nav-links a.active { opacity: 1; font-weight: 600; }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -19px;
  height: 2px;
  background: var(--orange);
  border-radius: 2px;
}

.nav-cta { display: flex; align-items: center; gap: 16px; }
.nav-cta .btn { padding: 9px 20px; font-size: 13px; }

.nav-toggle {
  display: none;
  width: 36px; height: 36px;
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  z-index: 600;
}
.nav-toggle span {
  display: block;
  position: absolute;
  left: 7px; right: 7px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease, top .3s ease;
}
.nav-toggle span:nth-child(1) { top: 13px; }
.nav-toggle span:nth-child(2) { top: 22px; }
.nav-toggle.open span:nth-child(1) { top: 17px; transform: rotate(45deg); }
.nav-toggle.open span:nth-child(2) { top: 17px; transform: rotate(-45deg); }

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    flex-direction: column;
    background: rgba(251,251,253,0.98);
    backdrop-filter: blur(20px);
    padding: 18px 24px 28px;
    gap: 20px;
    align-items: flex-start;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
  }
  .nav-links.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav-links a.active::after { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: block; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: calc(var(--nav-h) + 120px) 0 100px;
  overflow: hidden;
  background: linear-gradient(180deg, #eef2f6 0%, var(--bg) 65%);
}

.hero-content { position: relative; z-index: 2; text-align: center; margin: 0 auto; }
.hero-content .lede { margin: 20px auto 34px; }
.hero .btn-row { justify-content: center; margin-top: 6px; }

.hero-media {
  margin-top: 64px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.hero-media img { width: 100%; height: auto; display: block; }

.page-hero {
  padding: calc(var(--nav-h) + 84px) 0 64px;
  background: linear-gradient(180deg, #eef2f6 0%, var(--bg) 100%);
  text-align: center;
}

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

section { position: relative; }
.section { padding: 100px 0; }
.section-tight { padding: 70px 0; }
.section-alt { background: var(--bg-alt); }
.section-navy {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
  color: var(--white);
}
.section-navy .eyebrow { color: var(--orange); }
.section-navy h2, .section-navy .display-sm { color: var(--white); }
.section-navy p { color: rgba(255,255,255,0.72); }

.section-head { text-align: center; max-width: 700px; margin: 0 auto 56px; }
.section-head.left { margin: 0 0 48px; text-align: left; }

/* ---------- Reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-1 { transition-delay: .08s; }
.reveal-2 { transition-delay: .16s; }
.reveal-3 { transition-delay: .24s; }
.reveal-4 { transition-delay: .32s; }
.reveal-5 { transition-delay: .40s; }

/* ---------- Feature grid (value props) ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .feature-grid { grid-template-columns: 1fr; } }

.feature-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 30px 26px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(0,0,0,0.04);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.feature-card:hover { transform: translateY(-6px); box-shadow: 0 16px 34px -18px rgba(14,35,56,0.28); }

.feature-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: rgba(242, 169, 61, 0.14);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  color: var(--orange-dark);
}
.feature-icon svg { width: 22px; height: 22px; }

.feature-card h3 { font-size: 17px; color: var(--navy); margin-bottom: 8px; }
.feature-card p { font-size: 14.5px; margin: 0; }

/* ---------- Category / product cards ---------- */

.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .cat-grid { grid-template-columns: 1fr; } }

.cat-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/5;
  box-shadow: var(--shadow-card);
  display: block;
}
.cat-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .7s var(--ease);
}
.cat-card:hover img { transform: scale(1.06); }
.cat-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14,35,56,0) 35%, rgba(10,26,42,0.88) 100%);
}
.cat-card-label {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 28px 26px;
  z-index: 2;
  color: var(--white);
}
.cat-card-label .tag {
  font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--orange);
  display: block; margin-bottom: 6px;
}
.cat-card-label h3 { font-size: 22px; color: var(--white); margin-bottom: 4px; }
.cat-card-label span.arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 500; opacity: 0.88; margin-top: 8px;
}
.cat-card:hover .cat-card-label span.arrow { gap: 10px; }
.cat-card-label span.arrow { transition: gap .3s var(--ease); }

/* ---------- Product section blocks (on products.html) ---------- */

.product-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.product-block.reverse { direction: rtl; }
.product-block.reverse > * { direction: ltr; }
@media (max-width: 900px) {
  .product-block, .product-block.reverse { grid-template-columns: 1fr; direction: ltr; gap: 32px; }
}

.product-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.product-gallery img {
  width: 100%; height: 180px; object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  cursor: zoom-in;
  transition: transform .4s var(--ease);
}
.product-gallery img:hover { transform: scale(1.03); }
.product-gallery img:first-child {
  grid-column: 1 / -1;
  height: 260px;
}

.product-copy .eyebrow { color: var(--orange-dark); }
.product-copy h2 { margin-bottom: 16px; }
.product-copy p { margin-bottom: 20px; }
.product-copy ul { margin: 22px 0; display: flex; flex-direction: column; gap: 12px; }
.product-copy ul li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 15px; color: var(--ink);
}
.product-copy ul li svg { flex: none; margin-top: 2px; color: var(--orange-dark); }

/* ---------- Gallery grid + lightbox ---------- */

.gallery-grid {
  columns: 3 260px;
  column-gap: 18px;
}
@media (max-width: 700px) { .gallery-grid { columns: 2 160px; } }

.gallery-item {
  break-inside: avoid;
  margin-bottom: 18px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  cursor: zoom-in;
  position: relative;
}
.gallery-item img {
  width: 100%; height: auto; display: block;
  transition: transform .6s var(--ease);
}
.gallery-item:hover img { transform: scale(1.05); }

.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(9, 18, 28, 0.92);
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: 100%; max-height: 85vh;
  border-radius: 12px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}
.lightbox-close {
  position: absolute; top: 24px; right: 28px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-close:hover { background: rgba(255,255,255,0.2); }

/* ---------- About page ---------- */

.about-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 900px) { .about-hero { grid-template-columns: 1fr; gap: 32px; } }
.about-hero img { border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); width: 100%; height: auto; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}
@media (max-width: 600px) { .stat-row { grid-template-columns: 1fr; } }
.stat-card {
  text-align: center;
  padding: 26px 16px;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-card);
}
.stat-num {
  font-size: 34px; font-weight: 700; color: var(--navy); letter-spacing: -0.02em;
}
.stat-label { font-size: 13.5px; color: var(--gray); margin-top: 4px; }

.owner-card {
  display: flex; align-items: center; gap: 20px;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-card);
  margin-top: 36px;
}
.owner-card img {
  width: 74px; height: 74px; border-radius: 50%; object-fit: cover; flex: none;
}
.owner-card h4 { font-size: 16px; color: var(--navy); margin-bottom: 2px; }
.owner-card span { font-size: 13.5px; color: var(--gray); }

/* ---------- Contact page ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: flex-start;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }

.info-list { display: flex; flex-direction: column; gap: 22px; margin-top: 30px; }
.info-item { display: flex; gap: 16px; align-items: flex-start; }
.info-icon {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  background: rgba(242,169,61,0.14);
  display: flex; align-items: center; justify-content: center;
  color: var(--orange-dark);
}
.info-icon svg { width: 20px; height: 20px; }
.info-item h4 { font-size: 15px; color: var(--navy); margin-bottom: 3px; }
.info-item p, .info-item a { font-size: 14.5px; margin: 0; color: var(--gray); }
.info-item a:hover { color: var(--navy); }

.map-embed {
  margin-top: 30px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--line);
}
.map-embed iframe { width: 100%; height: 260px; border: 0; display: block; }

.form-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(0,0,0,0.04);
}
@media (max-width: 520px) { .form-card { padding: 26px; } }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.field { margin-bottom: 20px; }
.field label {
  display: block; font-size: 13.5px; font-weight: 600; color: var(--navy);
  margin-bottom: 8px;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--bg-alt);
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  transition: border-color .2s ease, background .2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--orange);
  background: var(--white);
}
.field textarea { resize: vertical; min-height: 120px; }

.form-note { font-size: 12.5px; color: var(--gray-light); margin-top: 4px; }

.form-success, .form-error {
  display: none;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 14.5px;
  margin-bottom: 20px;
}
.form-success { background: rgba(52, 199, 89, 0.12); color: #1d7a3c; }
.form-error { background: rgba(255, 59, 48, 0.1); color: #c62b20; }
.form-success.show, .form-error.show { display: block; }

/* ---------- CTA band ---------- */

.cta-band {
  text-align: center;
  padding: 90px 0;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
  color: var(--white);
}
.cta-band h2 { color: var(--white); font-size: clamp(28px, 4vw, 40px); margin-bottom: 14px; }
.cta-band p { color: rgba(255,255,255,0.72); max-width: 520px; margin: 0 auto 32px; }
.cta-band .btn-row { justify-content: center; }

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

.footer {
  background: #0a1c2e;
  color: rgba(255,255,255,0.68);
  padding: 64px 0 28px;
  font-size: 13.5px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand img { height: 30px; border-radius: 6px; }
.footer-brand span { color: var(--white); font-weight: 700; font-size: 15px; }
.footer p { color: rgba(255,255,255,0.55); }
.footer h5 {
  color: var(--white); font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 16px;
}
.footer ul { display: flex; flex-direction: column; gap: 11px; }
.footer ul a { color: rgba(255,255,255,0.68); transition: color .2s ease; }
.footer ul a:hover { color: var(--orange); }

.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease;
}
.footer-social a:hover { background: var(--orange); color: var(--navy); }
.footer-social svg { width: 16px; height: 16px; }

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; flex-wrap: wrap; gap: 10px;
  color: rgba(255,255,255,0.42);
  font-size: 12.5px;
}

/* ---------- Utility ---------- */

.center { text-align: center; }
.mt-0 { margin-top: 0; }
