/* ===================================================
   CSS RESET & NORMALIZE (Mobile-first)
   =================================================== */
html,
body,
div,span,applet,object,iframe,
h1,h2,h3,h4,h5,h6,p,blockquote,pre,
a,abbr,acronym,address,big,cite,code,
del,dfn,em,img,ins,kbd,q,s,samp,
small,strike,strong,sub,sup,tt,var,
b,u,i,center,
dl,dt,dd,ol,ul,li,
fieldset,form,label,legend,
table,caption,tbody,tfoot,thead,tr,th,td,
article,aside,canvas,details,embed,
figure,figcaption,footer,header,hgroup,
menu,nav,output,ruby,section,summary,
time,mark,audio,video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
  box-sizing: border-box;
}
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  line-height: 1.6;
}
article,aside,details,figcaption,figure,
footer,header,hgroup,menu,nav,section { display: block; }
ol,ul { list-style: none; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; border: 0; }
table { border-collapse: collapse; border-spacing: 0; }
button, input, select, textarea { font: inherit; }

/* =======================================
   VINTAGE RETRO BRAND VARIABLES
   ======================================= */
:root {
  --primary: #23272A;
  --secondary: #888981;
  --accent: #F5CA64;
  --cream-bg: #FFF8EA;
  --paper-bg: #F3E7D3;
  --brown: #7B5B35;
  --green: #4F7346;
  --deep-red: #A93121;

  --font-display: 'Montserrat', 'Futura PT', 'Lora', Georgia, serif;
  --font-body: 'Roboto', 'Source Sans Pro', Arial, sans-serif;

  --radius-lg: 20px;
  --radius-md: 10px;
  --radius-sm: 5px;
  --shadow-md: 0 4px 16px rgba(60,48,36,0.13);
  --shadow-sm: 0 2px 6px rgba(34,21,0,0.07);
  --pattern-light: repeating-linear-gradient(135deg, #f9eedc 0 10px, #f7e3bf 10px 20px);
}

@media (min-width: 600px) {
  :root {
    --radius-lg: 28px;
    --radius-md: 14px;
    --radius-sm: 7px;
  }
}

/* ===========================
   BODY, TYPOGRAPHY
   =========================== */
body {
  font-family: var(--font-body);
  background: var(--pattern-light), var(--cream-bg);
  color: var(--primary);
  font-size: 16px;
  font-weight: 400;
}

h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-display);
  font-weight: bold;
  letter-spacing: 0.01em;
  color: var(--brown);
}
h1 {
  font-size: 2.4rem;
  line-height: 1.13;
  margin-bottom: 16px;
  text-shadow: 1px 2px 0 #f2e7cb;
}
h2 {
  font-size: 2rem;
  margin-bottom: 15px;
}
h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}
h4 { font-size: 1rem; }
p,ul,ol,li {
  font-size: 1rem;
  margin-bottom: 10px;
  color: var(--primary);
}
p:last-child,li:last-child { margin-bottom: 0; }
strong,b { font-weight: 700; color: var(--deep-red); }

/* =============================
   LAYOUT: CONTAINER SYSTEM
   ============================= */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* SECTIONS */
section {
  background: var(--paper-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: 60px;
  padding: 40px 20px;
}

@media (max-width: 600px) {
  section {
    padding: 26px 8px;
    margin-bottom: 40px;
    border-radius: var(--radius-md);
  }
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* FLEXBOX SPACING PATTERNS */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  position: relative;
  padding: 20px;
}
.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}
.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  margin-bottom: 20px;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: 0 1px 8px 0 rgba(40,20,0,0.08);
  border-left: 8px solid var(--accent);
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  background: #fffaf0;
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
}

.feature-grid {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-top: 10px;
}
.feature-grid > div {
  background: #fffaf0;
  padding: 20px 18px 16px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  flex: 1 1 230px;
  max-width: 330px;
  min-width: 215px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}
.feature-grid img {
  width: 46px;
  height: 46px;
  margin-bottom: 6px;
  filter: grayscale(0.1) sepia(0.35) contrast(1.05);
}

@media (max-width: 900px) {
  .feature-grid, .card-container, .content-grid {
    flex-direction: column;
    gap: 18px;
    align-items: stretch;
  }
  .feature-grid > div, .card {
    max-width: 100%;
    min-width: unset;
  }
}

@media (max-width: 600px) {
  .testimonial-card, .feature-grid > div, .card {
    padding: 15px 10px;
  }
}

/* =============================
   HEADER & NAVIGATION
   ============================= */
header {
  background: var(--primary);
  box-shadow: 0 2px 10px rgba(50,40,10,0.05);
  position: sticky;
  top: 0;
  z-index: 50;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  padding-bottom: 10px;
}
header img[alt="Impersquil Barberatelier"] {
  height: 42px;
  width: auto;
  margin-right: 18px;
  filter: drop-shadow(1px 2px 0 #baa35c);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.main-nav a {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 1.5px;
  padding: 8px 2px;
  border-radius: var(--radius-sm);
  position: relative;
  transition: background 0.2s, color 0.2s;
}
.main-nav a:hover,
.main-nav a:focus {
  background: rgba(245,202,100,0.16);
  color: var(--brown);
}
.main-nav .btn-primary {
  background: var(--accent);
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 1px;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  margin-left: 10px;
  transition: background 0.2s, color 0.2s;
  box-shadow: 0 1px 8px 0 rgba(80,48,0,0.07);
  border: none;
  outline: none;
  cursor: pointer;
  text-shadow: 0 1px 0 #f2e2ad;
}
.main-nav .btn-primary:hover,
.main-nav .btn-primary:focus {
  background: var(--brown);
  color: #fffaf0;
}

/* ========== MOBILE MENU ========== */
.mobile-menu-toggle {
  display: none;
  background: var(--accent);
  color: var(--primary);
  border: none;
  border-radius: var(--radius-md);
  padding: 9px 15px;
  font-size: 2rem;
  margin-left: 16px;
  cursor: pointer;
  box-shadow: 0 2px 8px 0 rgba(90, 80, 35, 0.08);
  z-index: 60;
  transition: background 0.16s, color 0.16s;
}
.mobile-menu-toggle:focus,
.mobile-menu-toggle:hover {
  background: var(--brown);
  color: var(--accent);
}

@media (max-width: 900px) {
  .main-nav { display: none; }
  .mobile-menu-toggle { display: block; }
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--primary);
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  transform: translateX(-100%);
  transition: transform 0.36s cubic-bezier(.86,0,.07,1);
  box-shadow: 0 0 80px 10px rgba(60,48,32,0.22);
}
.mobile-menu.active {
  transform: translateX(0);
}
.mobile-menu-close {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 2.2rem;
  padding: 18px 18px 4px 16px;
  margin-top: 8px;
  margin-left: 6px;
  cursor: pointer;
  align-self: flex-end;
  transition: color 0.17s;
}
.mobile-menu-close:focus,
.mobile-menu-close:hover {
  color: var(--brown);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 36px;
  align-items: flex-start;
  width: 100%;
}
.mobile-nav a {
  color: var(--accent);
  font-size: 1.35rem;
  font-family: var(--font-display);
  padding: 10px 24px;
  transition: background 0.18s, color 0.18s;
  border-radius: var(--radius-md);
  width: 100%;
  display: block;
}
.mobile-nav a:focus,
.mobile-nav a:hover {
  background: rgba(245,202,100,0.11);
  color: var(--brown);
}

/* ===================
   HERO SECTION
   =================== */
.hero {
  background: var(--accent);
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="320" height="320"><rect x="0" y="0" width="320" height="320" fill="none"/><circle cx="40" cy="40" r="3" fill="%23baa35c" /><circle cx="200" cy="80" r="6" fill="%23f3e7d3" /></svg>');
  background-blend-mode: multiply;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: 60px;
}
.hero .container { min-height: 250px; }
.hero .content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  padding: 30px 0;
}
.hero h1 {
  color: var(--primary);
  letter-spacing: 1.5px;
  text-shadow: 0 2px 0 #ffe481;
}
.hero p {
  font-size: 1.25rem;
  font-family: var(--font-body);
  color: var(--primary);
  opacity: 0.95;
  margin-bottom: 14px;
}
.hero .btn-primary {
  background: var(--primary);
  color: var(--accent);
  box-shadow: 0 3px 14px 0 rgba(30,24,14,0.13);
}
.hero .btn-primary:hover {
  background: var(--brown);
  color: #fffaf0;
}

@media (max-width: 800px) {
  .hero .container, .hero .content-wrapper {
    padding: 16px 0;
    min-height: 160px;
  }
  .hero {
    margin-bottom: 36px;
  }
}

/* ============================
   BUTTONS & INTERACTIONS
   ============================ */
.btn-primary,
.button,
button,
input[type="submit"] {
  background: var(--accent);
  color: var(--primary);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
  padding: 11px 29px;
  margin-top: 6px;
  box-shadow: 0 1px 8px 0 rgba(128,80,18,0.09);
  cursor: pointer;
  outline: none;
  transition: background 0.17s, color 0.17s, transform 0.12s;
  position: relative;
}
.btn-primary:hover,
.button:hover,
button:hover,
input[type="submit"]:hover,
.btn-primary:focus,
.button:focus,
button:focus,
input[type="submit"]:focus {
  background: var(--brown);
  color: #fffef8;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 24px 0 rgba(100,60,18,0.08);
}

/* ===========================
   CARDS & TESTIMONIALS
   =========================== */
.testimonial-card {
  color: #3e2b19;
  background: #fff;
  border-left: 8px solid var(--accent);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(130,115,80,0.07);
  font-style: italic;
  font-size: 1.10rem;
  margin-bottom: 20px;
  transition: box-shadow 0.13s;
  min-width: 0;
  max-width: 670px;
}
.testimonial-card:hover {
  box-shadow: 0 6px 24px rgba(180,150,102,0.14);
}
.testimonial-card p {
  color: #3e2b19;
  font-style: italic;
  font-size: 1rem;
}
.testimonial-card span {
  font-style: normal;
  color: var(--brown);
  opacity: 0.85;
  font-size: 0.97rem;
}

/* ===========================
   LISTS, TABLES, ICONIC-LISTS
   =========================== */
ul, ol {
  padding-left: 24px;
}
ul li, ol li {
  margin-bottom: 10px;
  position: relative;
  padding-left: 0;
  color: var(--primary);
}
ul li img, ol li img {
  vertical-align: middle;
  height: 22px;
  margin-right: 9px;
  display: inline-block;
}

/* Stylize the price/service tables */
table {
  width: 100%;
  background: #f8f3ea;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
td, th {
  padding: 13px 9px;
  text-align: left;
  border-bottom: 1px dotted #e0c897;
  color: var(--primary);
}
tr:last-child td { border-bottom: none; }
th {
  background: var(--accent);
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 1.11rem;
}
td strong {
  color: var(--brown);
}

@media (max-width: 600px) {
  table, thead, tbody, th, td, tr {
    display: block;
    width: 100%;
  }
  th, td {
    padding: 11px 4px;
  }
  thead {
    display: none;
  }
  tr {
    border-bottom: 2px solid #f9e3a1;
    padding-bottom: 7px;
    margin-bottom: 13px;
  }
}

/* ===========================
   LINKS & MICRO-INTERACTIONS
   =========================== */
a {
  color: var(--deep-red);
  transition: color 0.2s, text-shadow 0.1s;
  text-decoration: underline dotted #f5ca64 1.5px;
}
a:hover, a:focus {
  color: var(--green);
  text-shadow: 0 1px 0 #ffe481, 0 0.5px 0 #fff;
  text-decoration: underline solid var(--deep-red) 2px;
}

/* Override link styles for nav/footer */
footer nav a, .main-nav a, .mobile-nav a {
  text-decoration: none;
}

/* ===========================
   FOOTER
   =========================== */
footer {
  background: var(--primary);
  color: var(--accent);
  font-size: 0.98rem;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  margin-top: 70px;
}
.footer-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 32px;
  padding: 38px 0 16px 0;
  justify-content: space-between;
}
.footer-wrapper > div {
  min-width: 180px;
  flex: 1 1 200px;
  margin-bottom: 18px;
}
footer img {
  height: 38px;
  width: auto;
  margin-bottom: 10px;
}
footer nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
footer nav a {
  color: var(--accent);
  font-size: 1.01rem;
  opacity: 0.94;
}
footer nav a:hover,footer nav a:focus {
  color: #fffce7;
}
footer p, footer a {
  margin-bottom: 8px;
  color: var(--accent);
}

@media (max-width: 800px) {
  .footer-wrapper {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */
@media (max-width: 768px) {
  .section, section {
    margin-bottom: 38px;
    padding: 20px 8px;
  }
  .content-wrapper,
  .feature-grid, .card-container, .footer-wrapper {
    flex-direction: column;
    gap: 18px;
  }
  .text-image-section {
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
  }
}

/* ================================
   COOKIE CONSENT BANNER/MODAL
   ================================ */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  background: var(--brown);
  color: #fffef8;
  padding: 22px 18px 18px 18px;
  box-shadow: 0 -3px 20px 0 rgba(80,60,10,0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  z-index: 102;
  font-size: 1.09rem;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  animation: cookie-fadein 0.5s ease;
}
@keyframes cookie-fadein {
  0% { transform: translateY(80px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
.cookie-btns {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.cookie-banner button {
  background: var(--accent);
  color: var(--brown);
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  padding: 8px 18px;
  margin: 0 2px;
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s, color 0.16s;
}
.cookie-banner button:hover,
.cookie-banner button:focus {
  background: var(--deep-red);
  color: #fff;
}

/* Cookie Consent Modal */
.cookie-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(57, 43, 23, 0.6);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  animation: cookie-modaloverlay-in 0.34s ease;
}
.cookie-modal-overlay.active { display: flex; }
@keyframes cookie-modaloverlay-in {
  from { opacity: 0; } to { opacity: 1; }
}
.cookie-modal {
  background: var(--paper-bg);
  border-radius: var(--radius-lg);
  box-shadow: 0 6px 44px 0 rgba(92,52,8,0.22);
  padding: 38px 24px 22px 24px;
  max-width: 360px;
  color: var(--primary);
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  animation: modalpopin 0.44s cubic-bezier(.64,-0.01,.46,1.19);
}
@keyframes modalpopin {
  from { transform: scale(0.90) translateY(60px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; }
}
.cookie-modal h3 {
  font-size: 1.16rem;
  margin-bottom: 10px;
  color: var(--brown);
}
.cookie-modal .cookie-modal-close {
  position: absolute;
  top: 8px; right: 12px;
  font-size: 1.56rem;
  background: none;
  border: none;
  color: var(--deep-red);
  cursor: pointer;
  z-index: 1;
}
.cookie-options {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-top: 10px;
}
.cookie-category {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 0 4px 0;
  font-size: 1rem;
}
.cookie-category input[type="checkbox"] {
  accent-color: var(--accent);
  transform: scale(1.15);
  margin-right: 4px;
}
.cookie-category[aria-disabled="true"] {
  opacity: 0.6;
  pointer-events: none;
}
.cookie-category strong {
  min-width: 120px;
  color: var(--brown);
  font-weight: bold;
}
.cookie-modal-save {
  background: var(--accent);
  color: var(--primary);
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  box-shadow: 0 1px 8px 0 rgba(128,80,18,0.09);
  margin-top: 12px;
  cursor: pointer;
  transition: background 0.16s, color 0.16s;
}
.cookie-modal-save:hover,
.cookie-modal-save:focus {
  background: var(--brown);
  color: #fff;
}

/* ================================
   FORM ELEMENTS (CONTACT FORMS, ETC)
   ================================ */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea, select {
  border: 1.5px solid #c9b387;
  border-radius: var(--radius-sm);
  background: #fffaf3;
  padding: 11px 14px;
  font-size: 1rem;
  font-family: var(--font-body);
  margin-bottom: 12px;
  width: 100%;
  box-shadow: 0 0.5px 2.5px 0 rgba(90,70,28,0.05);
  color: var(--primary);
  transition: border 0.13s, background 0.13s;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus, select:focus {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  background: #fff;
}

label {
  display: block;
  color: var(--brown);
  font-size: 0.99rem;
  margin-bottom: 4px;
  font-weight: 600;
  font-family: var(--font-display);
}

/* ================================
   RETRO DECORATIVE ELEMENTS
   ================================ */
.decor-stripes {
  background: repeating-linear-gradient(45deg, #f9eedc 0 14px, #e5c468 14px 28px);
  height: 16px;
  width: 100%;
}

/* Retro border for cards */
.card,.testimonial-card,.feature-grid > div {
  border: 2.5px solid #dfc483;
  box-sizing: border-box;
}

/* Classic pattern overlay (optional, subtle) */
.section.retro-pattern {
  background: var(--paper-bg),  url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="35" cy="35" r="1.4" fill="%23baa35c"/><circle cx="80" cy="90" r="2.1" fill="%23f3e7d3"/></svg>');
  background-repeat: repeat;
}

/* ================================
   MISC / UTILS (SPACING, ETC)
   ================================ */
.mt-24 { margin-top: 24px!important; }
.mb-24 { margin-bottom: 24px!important; }
.mt-40 { margin-top: 40px!important; }
.mb-40 { margin-bottom: 40px!important; }
.pt-20 { padding-top: 20px!important; }
.pb-20 { padding-bottom: 20px!important; }
.pl-20 { padding-left: 20px!important; }
.pr-20 { padding-right: 20px!important; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-column { display: flex; flex-direction: column; }
.gap-20 { gap: 20px!important; }
.rounded {
  border-radius: var(--radius-md);
}
.shadow {
  box-shadow: var(--shadow-sm);
}

/* Hide visually (for screen readers) */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  border: 0 !important;
}

/* ================
   SCROLLBAR (retro-style subtle)
   ================= */
::-webkit-scrollbar {
  width: 11px;
  background: #f5edea;
}
::-webkit-scrollbar-thumb {
  background: #cfb863;
  border-radius: 8px;
  border: 3px solid #f5edea;
}

/* ================
   PRINT SUPPORT
   ================= */
@media print {
  header, footer, .mobile-menu, .cookie-banner, .cookie-modal-overlay { display: none!important; }
  section { box-shadow: none!important; background: #fff!important; }
}
