/* Root colors */
:root {
  --cream: #F8F5F0;
  --beige: #E3D6C7;
  --warm-gray: #A29584;
  --charcoal: #1C1C1C;
  --ink: #222222;
  --muted: #6B6256;
  --border: #e7dfd4;
}

* {
  box-sizing: border-box;
}

/* Removed fixed 100% heights to prevent layout collapse on some mobiles */
html {
  margin: 0;
  overflow-x: hidden;
  width: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: #55320c;
  background: var(--cream);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

.container {
  width: 100%;
  margin: 0px auto;
  padding: 0 190px;
}

.site-header .container {
  padding-left: 40px;
  padding-right: 40px;
}

.section {
  padding: 80px 0;
}

.section-light {
  background: #fff;
}

.display {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.1;
  margin: 0 0 12px;
  color: #5a4a31;
  text-transform: capitalize;
  text-shadow: 1px -1px #a48d73;
}

.h2 {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  color: #5a4a31;
  text-transform: capitalize;
  text-shadow: 1px -1px #a48d73;
}

.lead {
  font-size: 19px;
  color: #917d66;
  margin: 0 0 24px;
  font-weight: bold;
}

.small {
  font-size: 14px;
  color: #917d66;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(8px);
  background: color-mix(in srgb, var(--cream) 85%, transparent);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-logo {
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(90, 74, 49, 0.07);
}

.brand {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  color: #5a4a30;
  text-decoration: none;
  font-size: 20px;
  text-transform: capitalize;
  text-shadow: 1px -1px #a48d73;
}

.nav {
  display: flex;
  gap: 16px;
  align-items: center;
}

.nav a {
  color: #55320c;
  text-decoration: none;
  font-weight: 500;
}

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 78vh;
  display: grid;
  align-items: center;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.hero-media .hero-bg,
.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: grayscale(12%) contrast(1.05) brightness(0.9);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(248, 245, 240, 0.92), rgba(248, 245, 240, 0.65));
  z-index: -1;
}

.hero-content {
  padding: 80px 0;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 12px 18px;
  border: 1px solid var(--charcoal);
  font-weight: 700;
  letter-spacing: 0.01em;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .08s ease, background .2s ease, color .2s ease, border-color .2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: #cba881;
  color: #382300 !important;
  border-color: #5a4a30;
}

.btn-dark {
  background: #cba981;
  color: #55320c;
  border-color: #5a4a30;
}

.btn-outline {
  background: #cba981;
  color: #382300;
  border-color: #5a4a30;
}

/* Improve legibility of the hero's outline button on image background */
.hero .btn-outline { background: rgb(249 241 231); color: #55320c; border-color: #c0b3a5; }
.hero .btn-outline:hover { background: #a17645; color: #fff; border-color: #392401;}
.btn.full {
  width: 100%;
}

/* Grids */
.grid {
  display: grid;
  gap: 28px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* About */
.about-media {
  max-height: 520px;
  overflow: hidden;
  border-radius: 12px;
}

.about-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #cba881;
}

#about .grid-2 {
  align-items: center;
  column-gap: 120px;
}

.key-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.card {
  background: #f9f1e7;
  border: 1px solid #c0b3a5;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card .k {
  color: #55320c;
  font-weight: 500;
}

.card .v {
  font-weight: 600;
  text-align: center;
  margin-left: 10%;
  color: #55320c7a;
}

/* Applications */
.apps .app {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
}

.apps .app img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

.apps .app h3 {
  margin: 12px 14px 4px;
  font-size: 18px;
}

.apps .app p {
  margin: 0 14px 14px;
  color: var(--muted);
}

/* Gallery */
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #c0b3a5;
  background: rgb(249 241 231);
  cursor: pointer;
  font-weight: 600;
  color: #55320c !important;
  font-size: 15px;
}

.filter.is-active {
  background: #a17645;
  color: #fff !important;
  border-color: #392401;
}

.gallery-grid {
  columns: 4 260px;
  column-gap: 12px;
}

.gallery-item {
  break-inside: avoid;
  display: block;
  margin-bottom: 12px;
}

.gallery-item img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
}

/* Specs */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
}

.specs-table th,
.specs-table td {
  text-align: left;
  padding: 14px;
}

.specs-table thead th {
  background: #cba881;
  font-weight: 700;
}

.specs-table tbody tr+tr td {
  border-top: 1px solid var(--border);
}

.downloads {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Finishes */
.finishes .finish-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 16px;
}

.finishes .sizes {
  color: var(--muted);
}

/* Contact */
.contact-grid {
  align-items: start;
}

.contact-form {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 16px;
}

.success-message {
  padding: 12px 16px;
  border-radius: 10px;
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
  font-weight: 500;
  margin-bottom: 1rem;
}

.danger-message {
  padding: 12px 16px;
  border-radius: 10px;
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  font-weight: 500;
  margin-bottom: 1rem;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.field.full {
  grid-column: 1 / -1;
}

label {
  font-weight: 600;
  font-size: 14px;
  color: #55320c;
}

input,
select,
textarea {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 12px;
  font: inherit;
  background: var(--cream);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--warm-gray);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--warm-gray) 20%, transparent);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: #fff;
  padding: 0 40px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
  padding: 28px 0;
}

.footer-links-wrapper {
  display: flex;
  gap: 100px;
  align-items: center;
  justify-content: center;
  margin-right: 100px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex-wrap: wrap;
  align-items: start;
  text-align: start;
}

.footer-links a {
  color: #55320c;
  text-decoration: none;
}


/* Back to Top */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid #5a4a30;
  background: #cba981;
  color: #382300;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, background .2s ease, color .2s ease;
}

.back-to-top:hover {
  background: rgb(249 241 231);
  color: #55320c;
  border-color: #c0b3a5;
}

.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.quick-actions{
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.quick-actions a{
  width: 40% !important;
}

/* Responsive */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-grid {
    columns: 2 240px;
  }

  .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero .container {
    padding-left: calc(32px + env(safe-area-inset-left));
    padding-right: calc(32px + env(safe-area-inset-right));
  }

  .header-inner {
    height: 62px;
  }

  .nav {
    gap: 12px;
    flex-wrap: wrap;
  }

  .nav a {
    font-size: 14px;
  }

  .display {
    font-size: 44px;
  }

  .lead {
    font-size: 17px;
    font-weight: bold;
  }

  .hero-content {
    padding: 64px 0;
  }

  .hero::after {
    background: linear-gradient(to top, rgba(248, 245, 240, 0.94), rgba(248, 245, 240, 0.7));
  }

  .site-footer {
    padding: 0 16px;
  }

  #about .grid-2 {
    align-items: center;
    column-gap: 20px;
  }
}

@media (max-width: 720px) {
  .header-inner {
    height: 60px;
  }

  .nav {
    display: none;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .grid-4 {
    grid-template-columns: 1fr;
  }

  .key-cards {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 56px 0;
  }

  .hero {
    min-height: 60vh;
  }

  .hero-content {
    padding: 40px 0;
  }

  .hero::after {
    background: linear-gradient(to top, rgba(248, 245, 240, 0.96), rgba(248, 245, 240, 0.78));
  }

  .hero-media .hero-bg,
  .hero-media video {
    filter: grayscale(12%) contrast(1.12) brightness(0.85);
  }

  .display {
    font-size: 32px;
    line-height: 1.15;
  }

  .lead {
    font-size: 16px;
  }

  .hero-ctas {
    flex-direction: column;
    gap: 10px;
  }

  .hero-ctas .btn {
    width: 100%;
  }

  .gallery-grid {
    columns: 1;
  }

  .apps .app img {
    aspect-ratio: 16 / 9;
  }

  .about-media {
    max-height: 360px;
    overflow: hidden;
  }

  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .site-footer {
    padding: 0 16px;
  }
}