/* ==========================================================================
   TWS Woodcrafts — base styles
   Palette: warm & rustic (wood tones)
   ========================================================================== */

:root {
  --color-bg: #faf5ec;
  --color-bg-alt: #f1e6d3;
  --color-surface: #ffffff;
  --color-text: #2e2013;
  --color-text-muted: #6b5847;
  --color-wood-dark: #3f2a1a;
  --color-wood: #6b4226;
  --color-wood-light: #9c6b3e;
  --color-accent: #c2703d;
  --color-accent-dark: #a45a2c;
  --color-border: #e2d3ba;

  --font-heading: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius: 10px;
  --shadow: 0 10px 30px rgba(63, 42, 26, 0.12);
  --max-width: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-wood-dark);
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 600; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; }

p { margin: 0 0 1em; }
a { color: var(--color-accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--color-wood-dark);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 1000;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

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

.btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }

.btn-primary {
  background:
    linear-gradient(rgba(194, 112, 61, 0.86), rgba(194, 112, 61, 0.86)),
    url("../images/wood-texture.webp");
  background-size: cover;
  background-position: center;
  color: #fff;
}
.btn-primary:hover {
  background:
    linear-gradient(rgba(164, 90, 44, 0.9), rgba(164, 90, 44, 0.9)),
    url("../images/wood-texture.webp");
  background-size: cover;
  background-position: center;
}

.btn-ghost {
  background: transparent;
  border-color: rgba(255,255,255,0.7);
  color: #fff;
}
.btn-ghost:hover { background: rgba(255,255,255,0.12); }

.btn-full { width: 100%; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 245, 236, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-mark {
  flex-shrink: 0;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(63, 42, 26, 0.25);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--color-wood-dark);
}
.brand-tag {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.primary-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
}

.primary-nav a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
}
.primary-nav a:hover { color: var(--color-accent-dark); }

.nav-cta {
  background:
    linear-gradient(rgba(194, 112, 61, 0.86), rgba(194, 112, 61, 0.86)),
    url("../images/wood-texture.webp");
  background-size: cover;
  background-position: center;
  color: #fff !important;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
}
.nav-cta:hover {
  background:
    linear-gradient(rgba(164, 90, 44, 0.9), rgba(164, 90, 44, 0.9)),
    url("../images/wood-texture.webp");
  background-size: cover;
  background-position: center;
  text-decoration: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-wood-dark);
  margin: 0 auto;
}

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

.hero {
  background:
    linear-gradient(160deg, rgba(63,42,26,0.82), rgba(107,66,38,0.72)),
    url("../images/hero.webp");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 7rem 0 5.5rem;
}

.hero-inner { max-width: 720px; margin: 0 auto; text-align: center; }

.hero-logo {
  display: block;
  margin: 0 auto 1.5rem;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-accent);
}
.hero .eyebrow { color: #e8b48a; }
.eyebrow.center { text-align: center; display: block; }

.hero h1 { color: #fff; margin-top: 0.4em; }

.hero-lead {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.88);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.5rem;
}

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

.section { padding: 5rem 0; }
.section-alt { background: var(--color-bg-alt); }

.center { text-align: center; }
.section-lead {
  color: var(--color-text-muted);
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

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

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: center;
}

.about-points {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 0.6rem;
}
.about-points li {
  padding-left: 1.6rem;
  position: relative;
  color: var(--color-text-muted);
}
.about-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
}

/* Placeholder photo blocks ----------------------------------------------- */

.photo-placeholder {
  background: var(--color-bg-alt);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  text-align: center;
  font-size: 0.85rem;
  padding: 2rem 1rem;
}

.about-image .photo-placeholder { aspect-ratio: 4/3; }

.about-photo {
  width: 100%;
  aspect-ratio: 450 / 601;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Services --------------------------------------------------------------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.service-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.service-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background:
    linear-gradient(rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12)),
    url("../images/wood-texture.webp");
  background-size: cover;
  background-position: center;
  color: var(--color-wood-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  box-shadow: inset 0 0 0 1px rgba(63, 42, 26, 0.15);
}

.service-card p { color: var(--color-text-muted); margin-bottom: 0; }

/* Gallery ------------------------------------------------------------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 3rem;
}

.gallery-item {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Testimonials --------------------------------------------------------- */

.testimonial-band {
  position: relative;
  margin-top: 3rem;
  padding: 4.5rem 0 5rem;
  color: #fff;
  background:
    linear-gradient(160deg, rgba(47, 31, 19, 0.93), rgba(90, 56, 32, 0.88)),
    url("../images/wood-texture.webp");
  background-repeat: no-repeat, repeat;
  background-size: cover, 480px 140px;
}

.testimonial-quote-icon {
  display: block;
  margin: 0 auto 0.75rem;
  color: var(--color-accent);
}

.testimonial-carousel {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.testimonial-slide {
  display: none;
  margin: 0 0 2.25rem;
}
.testimonial-slide.is-active {
  display: block;
  animation: testimonialFade 0.6s ease;
}

@keyframes testimonialFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.testimonial-slide p {
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  line-height: 1.55;
  color: #fff;
  margin: 0 0 1.5rem;
}

.testimonial-attribution { font-style: normal; }
.testimonial-client {
  display: block;
  font-style: normal;
  font-weight: 600;
  font-size: 0.95rem;
}
.testimonial-company {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.testimonial-dots {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
}
.testimonial-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}
.testimonial-dots button:hover { background: rgba(255, 255, 255, 0.6); }
.testimonial-dots button.is-active {
  background: var(--color-accent);
  transform: scale(1.3);
}

/* Areas ------------------------------------------------------------------ */

.areas-inner { max-width: 760px; }

.areas-list {
  list-style: none;
  padding: 0;
  margin: 2.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}
.areas-list li {
  background:
    linear-gradient(rgba(63, 42, 26, 0.66), rgba(63, 42, 26, 0.66)),
    url("../images/wood-texture.webp");
  background-size: cover;
  background-position: center;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  color: #fff;
  font-weight: 500;
}

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

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 3rem;
  align-items: start;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 1.75rem 0 0;
  display: grid;
  gap: 1rem;
}
.contact-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-text-muted);
}
.contact-list svg { color: var(--color-accent-dark); flex-shrink: 0; }

.placeholder-tag {
  font-size: 0.72rem;
  background: #fde8d3;
  color: var(--color-accent-dark);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.contact-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.form-row { margin-bottom: 1.1rem; }
.form-row label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--color-wood-dark);
}
.form-row input,
.form-row textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--color-bg);
  color: var(--color-text);
}
.form-row input:focus,
.form-row textarea:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}

.form-note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 1rem 0 0;
  text-align: center;
}

/* Honeypot field — kept in the tab order out of reach and hidden from
   screen readers, but never display:none, so simple bots that check for
   that specifically still fall for it. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-alert {
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
}
.form-alert-success {
  background: #e6f4ea;
  color: #1e6b3a;
  border: 1px solid #b7dfc4;
}
.form-alert-error {
  background: #fbe9e7;
  color: #a13a2c;
  border: 1px solid #f0bdb4;
}

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

.site-footer {
  background:
    linear-gradient(rgba(47, 31, 19, 0.88), rgba(47, 31, 19, 0.88)),
    url("../images/wood-texture.webp");
  background-repeat: no-repeat, repeat;
  background-size: cover, 480px 140px;
  color: rgba(255,255,255,0.75);
  padding: 2rem 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.85rem;
}
.footer-inner p { margin: 0; }

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.footer-mark {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.footer-credit {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.15rem;
}
.footer-credit a {
  color: rgba(255, 255, 255, 0.75);
}
.footer-credit a:hover {
  color: #fff;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.footer-links a,
.footer-link-btn {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
}
.footer-links a:hover,
.footer-link-btn:hover {
  color: #fff;
}
.footer-link-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Cookie consent banner ------------------------------------------------- */

#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -10px 30px rgba(63, 42, 26, 0.18);
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--color-text);
}

.cc-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
}

.cc-text p {
  margin: 0 0 0.75rem;
  color: var(--color-text-muted);
}

.cc-text a {
  color: var(--color-wood-dark);
  text-decoration: underline;
}

.cc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.25rem;
}

.cc-btn {
  padding: 0.6rem 1.25rem;
  border: 1.5px solid var(--color-wood-dark);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 999px;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
  background: none;
}
.cc-btn:hover { transform: translateY(-2px); }

.cc-btn-accept {
  background:
    linear-gradient(rgba(194, 112, 61, 0.86), rgba(194, 112, 61, 0.86)),
    url("../images/wood-texture.webp");
  background-size: cover;
  background-position: center;
  color: #fff;
  border-color: var(--color-accent);
}

.cc-btn-reject {
  background: var(--color-bg);
  color: var(--color-wood-dark);
}
.cc-btn-reject:hover { background: var(--color-bg-alt); }

.cc-btn-settings {
  background: transparent;
  color: var(--color-text-muted);
  border-color: var(--color-border);
}
.cc-btn-settings:hover {
  border-color: var(--color-wood-dark);
  color: var(--color-wood-dark);
}

.cc-details {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.cc-category {
  margin-bottom: 0.75rem;
}

.cc-category-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--color-wood-dark);
}

.cc-category-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-accent);
}

.cc-category-label input[type="checkbox"]:disabled {
  cursor: not-allowed;
}

.cc-category-desc {
  margin: 0.25rem 0 0 1.5rem;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

@media (max-width: 600px) {
  .cc-actions {
    flex-direction: column;
  }
  .cc-btn {
    width: 100%;
    text-align: center;
  }
}

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

@media (max-width: 860px) {
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .primary-nav.open { max-height: 400px; }

  .primary-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem 1.5rem 1.5rem;
  }
  .primary-nav li { width: 100%; padding: 0.6rem 0; border-bottom: 1px solid var(--color-border); }
  .nav-cta { display: inline-block; margin-top: 0.75rem; }

  .hero { padding: 5rem 0 3.5rem; }
  .hero-logo { width: 92px; height: 92px; }
  .section { padding: 3.5rem 0; }
}

/* Legal / policy pages --------------------------------------------------- */

.page-header {
  background: var(--color-wood-dark);
  color: #fff;
  padding: 3.5rem 0 3rem;
  text-align: center;
}
.page-header h1 { color: #fff; margin: 0.3em 0 0; }
.page-header .eyebrow { color: var(--color-accent); }

.legal-content {
  max-width: 760px;
  margin: 0 auto;
}
.legal-content h2 {
  margin-top: 2.5rem;
  font-size: 1.4rem;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 {
  margin-top: 1.75rem;
  font-size: 1.05rem;
}
.legal-content p,
.legal-content li {
  color: var(--color-text-muted);
}
.legal-content ul,
.legal-content ol {
  padding-left: 1.3rem;
  display: grid;
  gap: 0.5rem;
}
.legal-content hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2rem 0;
}
.legal-content a { color: var(--color-accent-dark); }

.legal-table-wrap { overflow-x: auto; margin: 1.25rem 0; }
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.legal-table th,
.legal-table td {
  text-align: left;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--color-border);
}
.legal-table th {
  background: var(--color-bg-alt);
  color: var(--color-wood-dark);
}
.legal-table td { color: var(--color-text-muted); }
.legal-table code {
  background: var(--color-bg-alt);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85em;
}
