/* ============================================================
   The Magic Touch Beta — styles.css
   1. Design tokens & reset      6. Testimonials
   2. Base & typography          7. Location
   3. Buttons & utilities        8. FAQ
   4. Header & navigation        9. Contact / CTA
   5. Hero, about & services    10. Footer, back-to-top, motion
   ============================================================ */

/* ---------- 1. Design tokens & reset ---------- */
:root {
  --forest:       #1F3323;
  --forest-deep:  #152219;
  --sage:         #7C9A7E;
  --sage-light:   #AABF9E;
  --sand:         #F1E9DC;
  --sand-light:   #F8F4EC;
  --ochre:        #B5804A;
  --ochre-dark:   #9c6b3c;
  --ink:          #1B241C;
  --cream-text:   #F7F2E9;
  --body:         #3E483F;
  --muted:        #5c665d;
  --line:         rgba(27, 36, 28, 0.12);
  --line-light:   rgba(247, 242, 233, 0.14);
  --font-serif:   'Newsreader', Georgia, serif;
  --font-sans:    'Karla', system-ui, sans-serif;
  --header-h:     72px;
  --radius:       2px;
  --shadow-soft:  0 12px 40px rgba(21, 34, 25, 0.12);
  --transition:   0.25s ease;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--sand-light);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

/* ---------- 2. Base & typography ---------- */
h1, h2, h3, .serif {
  font-family: var(--font-serif);
  font-weight: 500;
  margin: 0;
  line-height: 1.15;
}

.wrap       { max-width: 1120px; margin: 0 auto; padding: 0 28px; }
.wrap-wide  { max-width: 1120px; margin: 0 auto; padding: 0 28px; }

section { padding: 96px 0; scroll-margin-top: var(--header-h); }

.label {
  color: var(--ochre);
  font-size: 0.95rem;
  font-style: italic;
  font-family: var(--font-serif);
  margin: 0 0 10px;
}

.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); color: var(--forest-deep); }
.section-head p  { margin: 16px 0 0; color: var(--muted); font-size: 1.05rem; }

:focus-visible {
  outline: 2px solid var(--ochre);
  outline-offset: 3px;
  border-radius: var(--radius);
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 200;
  background: var(--ochre);
  color: var(--cream-text);
  padding: 10px 18px;
  border-radius: var(--radius);
  transition: top var(--transition);
}
.skip-link:focus { top: 12px; }

/* ---------- 3. Buttons & utilities ---------- */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--ochre);
  color: var(--cream-text);
}
.btn-primary:hover { background: var(--ochre-dark); }

.btn-ghost {
  border-color: rgba(247, 242, 233, 0.5);
  color: var(--cream-text);
}
.btn-ghost:hover { border-color: var(--cream-text); }

.btn-full { width: 100%; }

/* ---------- 4. Header & navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(31, 51, 35, 0.94);
  backdrop-filter: blur(6px);
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: 0 6px 24px rgba(21, 34, 25, 0.35); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}

.brand {
  color: var(--cream-text);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.brand span { color: var(--sage-light); font-style: normal; }

.nav-links { display: flex; gap: 28px; }
.nav-links a {
  color: var(--sand);
  font-size: 0.95rem;
  padding: 6px 2px;
  position: relative;
  transition: color var(--transition);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 1px;
  background: var(--ochre);
  transition: right var(--transition);
}
.nav-links a:hover { color: var(--ochre); }
.nav-links a:hover::after,
.nav-links a.active::after { right: 0; }
.nav-links a.active { color: var(--sand); }

.btn-nav { padding: 9px 20px; font-size: 0.9rem; }

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 10px;
}
.menu-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--sand);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 90;
  background: var(--forest-deep);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 40px 32px;
}
.mobile-menu a {
  color: var(--sand);
  font-family: var(--font-serif);
  font-size: 1.6rem;
  padding: 10px 0;
}
.mobile-menu a:hover { color: var(--ochre); }
.mobile-menu .btn {
  margin-top: 20px;
  font-family: var(--font-sans);
  font-size: 1rem;
}
.mobile-menu[hidden] { display: none; }

/* ---------- 5a. Hero ---------- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: flex-end;
  background: var(--forest);
  overflow: hidden;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(21, 34, 25, 0.15) 0%,
    rgba(21, 34, 25, 0.55) 55%,
    rgba(21, 34, 25, 0.92) 100%);
}
.hero-content { position: relative; z-index: 2; padding-bottom: 72px; }

.hero-eyebrow { color: var(--sage-light); font-size: 0.95rem; margin: 0 0 18px; }

.hero h1 {
  color: var(--cream-text);
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1.05;
  max-width: 14ch;
}
.hero h1 em { font-style: italic; color: var(--sage-light); }

.hero > .hero-content > p:not(.hero-eyebrow) {
  color: var(--sand);
  max-width: 44ch;
  margin: 22px 0 0;
  font-size: 1.08rem;
}

.hero-actions { display: flex; gap: 16px; margin-top: 34px; flex-wrap: wrap; }

.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 26px;
  height: 42px;
  border: 1px solid rgba(247, 242, 233, 0.5);
  border-radius: 14px;
  display: flex;
  justify-content: center;
}
.scroll-hint span {
  width: 3px;
  height: 8px;
  background: var(--sand);
  border-radius: 2px;
  margin-top: 8px;
  animation: scrollHint 1.8s ease-in-out infinite;
}
@keyframes scrollHint {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50%      { transform: translateY(10px); opacity: 0.3; }
}

/* ---------- 5b. About ---------- */
.about { background: var(--sand-light); }

.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  align-items: center;
}

.about-img { position: relative; }
.about-img img {
  border-radius: var(--radius);
  height: 460px;
  width: 100%;
  object-fit: cover;
}
.about-img .frame {
  position: absolute;
  top: 24px; left: -24px;
  width: 100%; height: 100%;
  border: 1px solid var(--sage);
  border-radius: var(--radius);
  z-index: -1;
}

.about-text h2 {
  font-size: clamp(1.9rem, 3vw, 2.2rem);
  color: var(--forest-deep);
  margin-bottom: 20px;
}
.about-text p { color: var(--body); font-size: 1.05rem; margin: 0 0 18px; }

.about-points {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
}
.about-points li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
  color: var(--body);
}
.about-points li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 12px; height: 2px;
  background: var(--ochre);
}

.stat-row {
  display: flex;
  gap: 44px;
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.stat-num { font-family: var(--font-serif); font-size: 2.1rem; color: var(--forest); }
.stat-lbl { font-size: 0.88rem; color: var(--muted); margin-top: 4px; }

/* ---------- 5c. Services ---------- */
.services { background: var(--forest); }
.services .section-head h2 { color: var(--cream-text); }
.services .section-head p  { color: var(--sage-light); }
.services .label { color: var(--sage-light); }

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line-light);
  border: 1px solid var(--line-light);
}

.service-card {
  background: var(--forest);
  padding: 38px 32px;
  display: flex;
  flex-direction: column;
  transition: background var(--transition);
}
.service-card:hover { background: #243a29; }

.service-card .num {
  color: var(--ochre);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  margin: 0;
}
.service-card h3 { color: var(--cream-text); font-size: 1.3rem; margin-top: 14px; }
.service-card > p { color: #C8D3C6; font-size: 0.96rem; margin: 12px 0 0; }

.price {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line-light);
  color: var(--sage-light);
  font-size: 0.92rem;
}
.service-card .price { margin-top: 22px; }

.services-note {
  margin: 28px 0 0;
  color: var(--sage-light);
  font-size: 0.9rem;
  font-style: italic;
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 64px;
  padding: 0;
}
.gallery figure { margin: 0; overflow: hidden; }
.gallery img {
  height: 200px;
  width: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery figure:hover img { transform: scale(1.05); }

/* ---------- 6. Testimonials ---------- */
.testimonials { background: var(--sand-light); }

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.testimonial-card {
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
}
.testimonial-card p {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-style: italic;
  color: var(--body);
}
.testimonial-card footer {
  margin-top: auto;
  padding-top: 18px;
  color: var(--ochre);
  font-size: 0.9rem;
  font-weight: 600;
}

/* ---------- 7. Location ---------- */
.location { background: var(--sand); }

.loc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  background: #fff;
}

.loc-info { padding: 56px; }
.loc-info h2 { font-size: 2rem; color: var(--forest-deep); }

.addr {
  font-style: normal;
  font-size: 1.05rem;
  color: var(--ink);
  margin: 18px 0 0;
}
.addr strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.hours { margin-top: 32px; padding: 28px 0 0; border-top: 1px solid var(--line); }
.hours-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.98rem;
  padding: 4px 0;
  color: var(--body);
}
.hours-row span:last-child { color: var(--forest); font-weight: 600; }

.loc-info .btn { margin-top: 32px; }

.map-embed { position: relative; min-height: 320px; }
.map-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(0.15) contrast(1.05);
}

/* ---------- 8. FAQ ---------- */
.faq { background: var(--sand-light); }

.faq-wrap { max-width: 760px; }

.faq-list { border-top: 1px solid var(--line); }

.faq-item { border-bottom: 1px solid var(--line); }

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  background: none;
  border: 0;
  text-align: left;
  padding: 22px 4px;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--forest-deep);
  cursor: pointer;
  transition: color var(--transition);
}
.faq-question:hover { color: var(--ochre); }

.faq-icon {
  position: relative;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
}
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  background: var(--ochre);
  transition: transform var(--transition);
}
.faq-icon::before { left: 0; top: 7px; width: 16px; height: 2px; }
.faq-icon::after  { left: 7px; top: 0; width: 2px; height: 16px; }
.faq-question[aria-expanded="true"] .faq-icon::after { transform: scaleY(0); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.faq-answer p {
  margin: 0;
  padding: 0 40px 22px 4px;
  color: var(--body);
}

/* ---------- 9. Contact / CTA ---------- */
.cta { background: var(--ochre); }

.cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.cta .label { color: rgba(247, 242, 233, 0.8); }

.cta h2 {
  color: var(--cream-text);
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
}
.cta-text > p { color: rgba(247, 242, 233, 0.9); margin: 16px 0 0; max-width: 40ch; }

.cta-contacts { display: flex; gap: 24px; margin-top: 28px; flex-wrap: wrap; }
.contact-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cream-text);
  font-weight: 600;
  border-bottom: 1px solid rgba(247, 242, 233, 0.4);
  padding-bottom: 4px;
  transition: border-color var(--transition);
}
.contact-line:hover { border-color: var(--cream-text); }

/* Form */
.contact-form {
  background: var(--sand-light);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: 0 20px 60px rgba(21, 34, 25, 0.25);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--forest-deep);
  margin-bottom: 6px;
}
.form-field label span { color: var(--ochre); }

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(124, 154, 126, 0.25);
}
.form-field textarea { resize: vertical; min-height: 96px; }

.form-field.invalid input,
.form-field.invalid select {
  border-color: #b4553c;
  box-shadow: 0 0 0 3px rgba(180, 85, 60, 0.15);
}

.field-error {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: #b4553c;
}
.field-error[hidden] { display: none; }

.form-success {
  margin-top: 20px;
  padding: 18px 20px;
  background: rgba(124, 154, 126, 0.15);
  border: 1px solid var(--sage);
  border-radius: var(--radius);
  color: var(--forest-deep);
}
.form-success p { margin: 6px 0 0; font-size: 0.95rem; }
.form-success[hidden] { display: none; }

/* ---------- 10. Footer, back-to-top, motion ---------- */
.site-footer {
  background: var(--forest-deep);
  color: var(--sand);
  padding: 56px 0 32px;
}

.foot-grid {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(247, 242, 233, 0.12);
}

.foot-brand {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--cream-text);
  margin: 0;
}
.foot-brand span { color: var(--sage-light); font-style: normal; }
.foot-tagline { margin: 8px 0 0; font-size: 0.92rem; color: #8a9689; }

.foot-links { display: flex; gap: 48px; flex-wrap: wrap; }
.foot-col h4 {
  font-size: 0.85rem;
  color: var(--sage-light);
  margin: 0 0 12px;
  letter-spacing: 0.02em;
  font-family: var(--font-sans);
  font-weight: 700;
}
.foot-col a {
  display: block;
  color: #C8D3C6;
  font-size: 0.92rem;
  margin-bottom: 8px;
  transition: color var(--transition);
}
.foot-col a:hover { color: var(--ochre); }

.foot-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 24px;
  font-size: 0.85rem;
  color: #8a9689;
}
.foot-top-link { color: #C8D3C6; }
.foot-top-link:hover { color: var(--ochre); }

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--forest);
  color: var(--cream-text);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--transition), transform var(--transition), background var(--transition);
}
.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: var(--ochre); }

/* Scroll-reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .testimonial-grid { grid-template-columns: 1fr; max-width: 560px; }
  .cta-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 860px) {
  :root { --header-h: 64px; }

  .nav-links, .btn-nav { display: none; }
  .menu-toggle { display: flex; }

  section { padding: 64px 0; }

  .about-grid { grid-template-columns: 1fr; gap: 44px; }
  .about-img .frame { display: none; }
  .about-img img { height: 340px; }

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

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

  .loc-grid { grid-template-columns: 1fr; }
  .loc-info { padding: 36px 28px; }
}

@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
  .contact-form { padding: 26px 20px; }
  .hero-content { padding-bottom: 88px; }
  .scroll-hint { display: none; }
  .stat-row { gap: 28px; }
  .service-grid { grid-template-columns: 1fr; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-hint span { animation: none; }
  .gallery img, .btn { transition: none; }
}