/* ==========================================================================
   Your Design Tutor - styles
   Dependency-free, system fonts, dark text on light surfaces.
   Sections: tokens, base, utilities, header, hero, sections, components,
   footer, responsive, motion preferences.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Color */
  --color-ink: #14202c;
  --color-muted: #44586c;
  --color-accent: #0b6e50;
  --color-accent-strong: #084f39;
  --color-accent-tint: #e8f3ed;
  --color-bg: #ffffff;
  --color-surface: #f3f7f4;
  --color-line: #d7e1da;
  --color-focus: #b35c00;
  --color-on-accent: #ffffff;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;

  /* Type scale */
  --text-sm: 0.95rem;
  --text-base: 1rem;
  --text-lede: clamp(1.08rem, 1.4vw + 0.9rem, 1.22rem);
  --text-h3: 1.12rem;
  --text-h2: clamp(1.55rem, 2.4vw + 1rem, 1.85rem);
  --text-h1: clamp(2.15rem, 4.6vw + 1.2rem, 3.2rem);

  /* Shape and depth */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(20, 32, 44, 0.06);
  --shadow-card: 0 2px 6px rgba(20, 32, 44, 0.05), 0 14px 28px -18px rgba(20, 32, 44, 0.22);
  --shadow-card-hover: 0 4px 10px rgba(20, 32, 44, 0.06), 0 22px 38px -18px rgba(8, 79, 57, 0.35);

  /* Layout */
  --wrap: 1080px;
  --header-height: 68px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
  --duration: 160ms;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--color-accent-tint);
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0;
}

h1 {
  font-size: var(--text-h1);
  line-height: 1.1;
  letter-spacing: -0.025em;
  max-width: 22ch;
}

h2 {
  font-size: var(--text-h2);
  margin-bottom: var(--space-6);
}

h3 {
  font-size: var(--text-h3);
}

p {
  margin: 0;
}

a {
  color: var(--color-accent-strong);
}

a:focus-visible,
.btn:focus-visible,
.skip-link:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

section[id] {
  scroll-margin-top: calc(var(--header-height) + var(--space-4));
}

/* ---------- Layout utility ---------- */
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: clamp(20px, 4vw, 32px);
  padding-right: clamp(20px, 4vw, 32px);
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -60px;
  z-index: 20;
  padding: var(--space-2) var(--space-4);
  background: var(--color-ink);
  color: #ffffff;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 0;
  color: #ffffff;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-line);
}

.header-row {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 44px;
  color: var(--color-ink);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand-logo {
  flex: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-line);
  border-radius: 50%;
  background: #ffffff;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-2);
}

.site-header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-pill);
  color: var(--color-muted);
  font-size: var(--text-sm);
  font-weight: 550;
  text-decoration: none;
  transition: color var(--duration) var(--ease), background-color var(--duration) var(--ease);
}

.site-header nav a:hover {
  color: var(--color-ink);
  background: var(--color-surface);
}

/* ---------- Eyebrow (section kicker) ---------- */
.eyebrow {
  margin: 0 0 var(--space-3);
  color: var(--color-accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 9vw, 96px) 0 clamp(48px, 7vw, 72px);
  background:
    radial-gradient(560px 300px at 88% -60px, rgba(11, 110, 80, 0.12), rgba(11, 110, 80, 0) 70%),
    linear-gradient(180deg, #f2f8f4 0%, #ffffff 78%);
  border-bottom: 1px solid var(--color-line);
}

/* Faint dot texture, kept quiet on purpose. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(11, 110, 80, 0.14) 1px, transparent 1.4px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(105deg, transparent 55%, #000 100%);
  mask-image: linear-gradient(105deg, transparent 55%, #000 100%);
  pointer-events: none;
}

.hero .wrap {
  position: relative;
}

.hero h1 {
  margin-bottom: var(--space-5);
}

.lede {
  max-width: 62ch;
  margin-bottom: var(--space-6);
  color: var(--color-muted);
  font-size: var(--text-lede);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: var(--space-3) var(--space-5);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius);
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  transition: background-color var(--duration) var(--ease), border-color var(--duration) var(--ease),
    color var(--duration) var(--ease), transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-on-accent);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--color-accent-strong);
  border-color: var(--color-accent-strong);
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.7);
  color: var(--color-accent-strong);
}

.btn-ghost:hover {
  background: var(--color-accent-tint);
  transform: translateY(-1px);
}

.btn-light {
  background: #ffffff;
  border-color: #ffffff;
  color: var(--color-accent-strong);
  box-shadow: var(--shadow-sm);
}

.btn-light:hover {
  background: var(--color-accent-tint);
  transform: translateY(-1px);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-7);
}

/* ---------- Proof stats ---------- */
.proof {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-7);
  margin: 0;
  padding: var(--space-5) 0 0;
  border-top: 1px solid var(--color-line);
  list-style: none;
  color: var(--color-muted);
  font-size: var(--text-sm);
}

.proof strong {
  display: block;
  color: var(--color-ink);
  font-size: 1.5rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

/* ---------- Sections ---------- */
.section {
  padding: clamp(48px, 8vw, 80px) 0;
}

.section-alt {
  background: var(--color-surface);
}

.section .eyebrow + h2 {
  margin-top: 0;
}

.note {
  max-width: 68ch;
  color: var(--color-muted);
}

/* ---------- Service cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: var(--space-5);
}

.card {
  padding: var(--space-6);
  background: var(--color-bg);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease),
    border-color var(--duration) var(--ease);
}

.card:hover {
  transform: translateY(-3px);
  border-color: #bcd4c6;
  box-shadow: var(--shadow-card-hover);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: var(--space-4);
  border-radius: var(--radius);
  background: var(--color-accent-tint);
  color: var(--color-accent-strong);
}

.card h3 {
  margin-bottom: var(--space-2);
}

.card p {
  color: var(--color-muted);
}

/* ---------- Work gallery ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: var(--space-5);
}

.work-card {
  margin: 0;
  overflow: hidden;
  background: var(--color-bg);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease),
    border-color var(--duration) var(--ease);
}

.work-card:hover {
  transform: translateY(-3px);
  border-color: #bcd4c6;
  box-shadow: var(--shadow-card-hover);
}

.work-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 680 / 453;
  object-fit: cover;
  background: #3a3a3a;
}

.work-card figcaption {
  padding: var(--space-4) var(--space-5);
  color: var(--color-ink);
  font-weight: 600;
  line-height: 1.45;
}

/* ---------- Steps ---------- */
.steps {
  max-width: 720px;
  margin: 0 0 var(--space-6);
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  position: relative;
  margin-bottom: var(--space-5);
  padding-left: 52px;
}

.steps li:last-child {
  margin-bottom: 0;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-weight: 700;
  font-size: 0.98rem;
  box-shadow: var(--shadow-sm);
}

.steps strong {
  color: var(--color-ink);
}

/* ---------- FAQ ---------- */
.faq {
  max-width: 760px;
}

.faq-item {
  padding: var(--space-5) 0;
  border-top: 1px solid var(--color-line);
}

.faq-item:first-child {
  padding-top: var(--space-1);
  border-top: none;
}

.faq-item h3 {
  margin-bottom: var(--space-2);
}

.faq-item p {
  max-width: 68ch;
  color: var(--color-muted);
}

/* ---------- Contact CTA band ---------- */
.cta-band {
  padding: clamp(28px, 5vw, 48px);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #0b6e50 0%, #084f39 100%);
  color: #ffffff;
  box-shadow: var(--shadow-card);
}

.cta-band h2 {
  margin-bottom: var(--space-3);
  color: #ffffff;
}

.cta-band .note {
  margin-bottom: var(--space-5);
  color: #dcefe5;
}

.cta-band p {
  margin: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: var(--space-6) 0 var(--space-7);
  border-top: 1px solid var(--color-line);
  color: var(--color-muted);
  font-size: var(--text-sm);
}

.footer-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
}

.footer-brand {
  color: var(--color-ink);
  font-weight: 600;
}

.footer-contact a {
  font-weight: 600;
}

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  .header-row {
    align-items: flex-start;
    flex-direction: column;
    gap: var(--space-1);
    padding-top: var(--space-3);
    padding-bottom: var(--space-3);
  }

  .site-header nav {
    margin-left: calc(var(--space-3) * -1);
  }

  .hero {
    padding-top: 44px;
  }

  .cta-row .btn {
    flex: 1 1 100%;
  }

  .proof {
    gap: var(--space-3) var(--space-6);
  }

  .card {
    padding: var(--space-5);
  }

  .cta-band {
    padding: var(--space-6) var(--space-5);
  }
}

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

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

  .card:hover,
  .work-card:hover,
  .btn:hover {
    transform: none;
  }
}
