/* ============================================================
   tesda — styles.css
   Palette: warm amber / charcoal / cream — friendly, trusted, hands-on.
   ============================================================ */

:root {
  /* Color system */
  --color-bg: #faf7f2;
  --color-surface: #ffffff;
  --color-tint: #f3ecdf;
  --color-ink: #24201a;
  --color-ink-soft: #5c554b;
  --color-ink-faint: #857c6f;
  --color-accent: #b4691e;
  --color-accent-deep: #8f4f0f;
  --color-accent-soft: #f5e3cd;
  --color-line: #e4dccb;
  --color-focus: #2f6f8f;

  /* Typography */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.563rem;
  --step-3: 2rem;
  --step-4: clamp(2.25rem, 5vw + 1rem, 3.4rem);

  /* Spacing scale */
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-s: 0.75rem;
  --space-m: 1rem;
  --space-l: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  /* Layout */
  --container: 1100px;
  --radius: 14px;
  --radius-sm: 8px;
  --header-height: 68px;
  --shadow-1: 0 2px 8px rgba(36, 32, 26, 0.07);
  --shadow-2: 0 10px 30px rgba(36, 32, 26, 0.12);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset / base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + var(--space-m));
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 var(--space-m);
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 var(--space-m);
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--color-accent-deep);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

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

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

.section-inner {
  width: min(var(--container), calc(100% - 2 * var(--space-xl)));
  margin-inline: auto;
}

.section-title {
  font-size: var(--step-3);
  color: var(--color-ink);
}

.section-intro {
  font-size: var(--step-1);
  color: var(--color-ink-soft);
  max-width: 56ch;
  margin-bottom: var(--space-2xl);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-line);
}

.header-inner {
  width: min(var(--container), calc(100% - 2 * var(--space-xl)));
  margin-inline: auto;
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-l);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-s);
  color: var(--color-ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-1);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
  color: var(--color-accent-deep);
}

.brand-mark {
  width: 30px;
  height: 30px;
  color: var(--color-accent);
  transition: transform 0.3s var(--ease);
}

.brand:hover .brand-mark {
  transform: rotate(-6deg);
}

.nav-list {
  display: flex;
  gap: var(--space-l);
}

.nav-link {
  color: var(--color-ink-soft);
  font-weight: 500;
  font-size: var(--step--1);
  text-decoration: none;
  padding: var(--space-xs) 0;
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 2px;
  background: var(--color-accent);
  transition: right 0.25s var(--ease);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--color-ink);
  text-decoration: none;
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  right: 0;
}

.nav-toggle {
  display: none;
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding: var(--space-3xl) 0;
  background:
    radial-gradient(circle at 12% 8%, var(--color-accent-soft) 0%, transparent 42%),
    radial-gradient(circle at 88% 0%, #e9eddf 0%, transparent 38%),
    linear-gradient(175deg, var(--color-tint) 0%, var(--color-bg) 70%);
}

/* subtle dot pattern overlay */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(180, 105, 30, 0.16) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom left, rgba(0,0,0,0.9), transparent 65%);
  -webkit-mask-image: linear-gradient(to bottom left, rgba(0,0,0,0.9), transparent 65%);
  pointer-events: none;
}

/* soft bottom edge */
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 48px;
  background: var(--color-bg);
  clip-path: ellipse(58% 100% at 50% 100%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(var(--container), calc(100% - 2 * var(--space-xl)));
  margin-inline: auto;
  max-width: 720px;
}

.hero-eyebrow {
  display: inline-block;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-deep);
  background: var(--color-accent-soft);
  border-radius: 999px;
  padding: var(--space-2xs) var(--space-m);
  margin-bottom: var(--space-l);
}

.hero-title {
  font-size: var(--step-4);
  font-weight: 700;
  margin-bottom: var(--space-l);
}

.hero-tagline {
  font-size: var(--step-1);
  color: var(--color-ink-soft);
  max-width: 52ch;
  margin-bottom: var(--space-xl);
}

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

.button {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--step-0);
  padding: var(--space-s) var(--space-2xl);
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease),
    background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.button-primary {
  background: var(--color-accent);
  color: #ffffff;
  box-shadow: var(--shadow-1);
}

.button-primary:hover {
  background: var(--color-accent-deep);
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
  text-decoration: none;
}

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

.about {
  padding: var(--space-2xl) 0;
}

.about-grid {
  display: grid;
  gap: var(--space-xl);
}

.about-copy p {
  color: var(--color-ink-soft);
  max-width: 62ch;
}

.services {
  padding: var(--space-2xl) 0;
  background: var(--color-tint);
}

.why-choose-us {
  padding: var(--space-2xl) 0;
}

.contact {
  padding: var(--space-2xl) 0;
  background: var(--color-tint);
}

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-l);
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: var(--space-xl);
  box-shadow: var(--shadow-1);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2);
}

.card-icon {
  width: 34px;
  height: 34px;
  color: var(--color-accent);
  margin-bottom: var(--space-m);
}

.card-title {
  font-size: var(--step-1);
  margin-bottom: var(--space-xs);
}

.card-text {
  color: var(--color-ink-soft);
  font-size: var(--step-0);
  margin: 0;
}

/* ---------- Why choose us ---------- */

.reason-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-l);
  counter-reset: reasons;
}

.reason {
  position: relative;
  border-left: 3px solid var(--color-accent);
  padding: var(--space-2xs) 0 var(--space-2xs) var(--space-l);
}

.reason-title {
  font-size: var(--step-1);
  margin-bottom: var(--space-2xs);
}

.reason-text {
  color: var(--color-ink-soft);
  margin: 0;
}

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

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
}

.contact-location {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  color: var(--color-ink-soft);
  margin-bottom: var(--space-xl);
}

.inline-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--color-accent);
}

.social-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
}

.social-link {
  display: inline-block;
  font-size: var(--step--1);
  font-weight: 500;
  padding: var(--space-2xs) var(--space-m);
  border: 1px solid var(--color-line);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-ink-soft);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.social-link:hover,
.social-link:focus-visible {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #ffffff;
  text-decoration: none;
}

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

.form-field {
  margin-bottom: var(--space-l);
}

.form-field label {
  display: block;
  font-weight: 600;
  font-size: var(--step--1);
  margin-bottom: var(--space-2xs);
  color: var(--color-ink);
}

.form-field input,
.form-field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--step-0);
  color: var(--color-ink);
  padding: var(--space-s) var(--space-m);
  border: 1.5px solid var(--color-line);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.form-field textarea {
  resize: vertical;
  min-height: 120px;
}

.form-field input:hover,
.form-field textarea:hover {
  border-color: var(--color-ink-faint);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.contact-form .button {
  width: 100%;
}

.form-note {
  margin: var(--space-m) 0 0;
  font-size: var(--step--1);
  color: var(--color-ink-soft);
  min-height: 1.4em;
}

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

.site-footer {
  background: var(--color-ink);
  color: #e8e2d7;
  padding: var(--space-2xl) 0 var(--space-xl);
}

.footer-inner {
  width: min(var(--container), calc(100% - 2 * var(--space-xl)));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.footer-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-2);
  margin: 0 0 var(--space-2xs);
  color: #ffffff;
}

.footer-tagline {
  color: #b9b1a3;
  margin: 0;
}

.footer-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-l);
}

.footer-nav-list a {
  color: #d6cfc1;
  font-size: var(--step--1);
  font-weight: 500;
}

.footer-nav-list a:hover,
.footer-nav-list a:focus-visible {
  color: #ffffff;
}

.footer-legal {
  font-size: var(--step--1);
  color: #b9b1a3;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: var(--space-l);
  margin: 0;
}

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-revealed {
  opacity: 1;
  transform: none;
}

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

@media (min-width: 640px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer-legal {
    grid-column: 1 / -1;
  }
}

@media (min-width: 900px) {
  .hero {
    padding: var(--space-3xl) 0;
  }

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

  .about {
    padding: var(--space-3xl) 0;
  }

  .services,
  .why-choose-us,
  .contact {
    padding: var(--space-3xl) 0;
  }

  .about-grid {
    grid-template-columns: 5fr 7fr;
    align-items: start;
    gap: var(--space-2xl);
  }

  .card-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-l);
  }

  .reason-list {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
  }

  .contact-grid {
    grid-template-columns: 5fr 7fr;
    align-items: start;
  }
}

/* ---------- Mobile nav ---------- */

@media (max-width: 767px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: 1.5px solid var(--color-line);
    border-radius: var(--radius-sm);
    color: var(--color-ink);
    cursor: pointer;
    transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
  }

  .nav-toggle:hover {
    background: var(--color-accent-soft);
    border-color: var(--color-accent);
  }

  .nav-toggle .icon-open,
  .nav-toggle .icon-close {
    width: 22px;
    height: 22px;
  }

  .nav-toggle .icon-close {
    display: none;
  }

  #site-header.nav-open .nav-toggle .icon-open {
    display: none;
  }

  #site-header.nav-open .nav-toggle .icon-close {
    display: block;
  }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-line);
    box-shadow: var(--shadow-2);
    display: none;
  }

  #site-header.nav-open .primary-nav {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
    padding: var(--space-s) var(--space-l) var(--space-l);
  }

  .nav-list li + li {
    border-top: 1px solid var(--color-line);
  }

  .nav-link {
    display: block;
    padding: var(--space-m) var(--space-xs);
    font-size: var(--step-0);
  }

  .nav-link::after {
    display: none;
  }

  .nav-link:hover,
  .nav-link:focus-visible {
    color: var(--color-accent-deep);
    background: var(--color-bg);
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}