/* ============================================================
   Qwandery Autos — Architecture D: Case Study-Led
   Mobile-first, hamburger-only navigation
   Palette: Forest Green / Sand / Burnt Orange
   ============================================================ */

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green-900: #1B3A16;
  --green-800: #234B1D;
  --green-700: #2D5A27;
  --green-600: #3A7D34;
  --green-500: #4A9E42;
  --green-400: #6BBF62;
  --green-200: #B8E4B2;

  --sand-900: #5C4A32;
  --sand-700: #8B7355;
  --sand-500: #B8956A;
  --sand-300: #C4A46C;
  --sand-200: #D4C4A8;
  --sand-100: #E8DCCE;
  --sand-50:  #F5F0E8;

  --orange-900: #7A3500;
  --orange-700: #A84500;
  --orange-600: #CC5500;
  --orange-500: #E06000;
  --orange-400: #FF7520;
  --orange-200: #FFB380;

  --text: #1B1B1B;
  --text-light: #F5F0E8;
  --radius: 6px;
  --radius-lg: 12px;
  --shadow: 0 2px 12px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.16);
  --transition: 0.25s ease;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  color: var(--text);
  background: var(--sand-50);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange-600); text-decoration: none; transition: color var(--transition); }
a:hover, a:focus { color: var(--orange-500); }
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; color: var(--green-900); }

/* --- SKIP LINK --- */
.skip-link {
  position: absolute; top: -100px; left: 8px; background: var(--orange-600);
  color: #fff; padding: 8px 16px; z-index: 10000; border-radius: var(--radius);
  font-weight: 600; transition: top 0.2s;
}
.skip-link:focus { top: 8px; }

/* --- HAMBURGER-ONLY HEADER --- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9000;
  background: var(--green-900);
  box-shadow: var(--shadow);
  height: 60px;
}

.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex; align-items: center; gap: 10px;
  color: var(--sand-100); font-size: 1.25rem; font-weight: 800;
  letter-spacing: -0.5px; text-transform: uppercase;
}
.logo:hover, .logo:focus { color: var(--sand-200); }
.logo-icon {
  width: 36px; height: 36px; background: var(--orange-600); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: #fff; font-weight: 900;
}

/* — hamburger button — */
.hamburger {
  display: flex; flex-direction: column; justify-content: space-between;
  width: 28px; height: 20px; background: none; border: none;
  cursor: pointer; padding: 0; z-index: 9100; position: relative;
}
.hamburger span {
  display: block; width: 100%; height: 3px; background: var(--sand-100);
  border-radius: 2px; transition: transform var(--transition), opacity var(--transition);
}

/* active state: X */
.hamburger.open span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

/* — slide-out nav panel — */
.site-nav {
  position: fixed; top: 0; right: -320px; width: 300px; height: 100vh;
  background: var(--green-800); z-index: 9050;
  padding: 80px 32px 32px;
  transition: right 0.35s ease;
  box-shadow: -4px 0 20px rgba(0,0,0,0.3);
  overflow-y: auto;
}
.site-nav.open { right: 0; }

.site-nav ul { list-style: none; }
.site-nav li { margin-bottom: 8px; }
.site-nav a {
  display: block; padding: 12px 16px; color: var(--sand-100);
  font-size: 1.1rem; font-weight: 600; border-radius: var(--radius);
  transition: background var(--transition), padding-left var(--transition);
}
.site-nav a:hover, .site-nav a:focus, .site-nav a.active {
  background: var(--orange-600); color: #fff; padding-left: 24px;
}
.site-nav .nav-cta {
  margin-top: 24px; border: 2px solid var(--orange-500); border-radius: var(--radius);
}
.site-nav .nav-cta:hover, .site-nav .nav-cta:focus {
  background: var(--orange-500); border-color: var(--orange-500);
}

/* — overlay — */
.nav-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 9040; opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease;
}
.nav-overlay.open { opacity: 1; pointer-events: auto; }

/* --- MAIN CONTENT --- */
main { flex: 1; margin-top: 60px; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.section { padding: 60px 0; }
.section-narrow { padding: 40px 0; }

/* --- HERO (home) --- */
.hero {
  background: linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 100%);
  color: var(--sand-100); text-align: center; padding: 80px 20px 64px;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); color: #fff; margin-bottom: 16px; line-height: 1.15; }
.hero p { font-size: 1.15rem; max-width: 650px; margin: 0 auto 32px; color: var(--sand-200); }
.hero-stats { display: flex; gap: 32px; justify-content: center; flex-wrap: wrap; margin-top: 40px; }
.hero-stat { text-align: center; }
.hero-stat-num { font-size: 2.4rem; font-weight: 800; color: var(--orange-400); }
.hero-stat-label { font-size: 0.85rem; color: var(--sand-200); text-transform: uppercase; letter-spacing: 1px; }

/* --- BUTTONS --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius); font-weight: 700;
  font-size: 0.95rem; cursor: pointer; transition: all var(--transition);
  border: 2px solid transparent; text-transform: uppercase; letter-spacing: 0.5px;
}
.btn-primary { background: var(--orange-600); color: #fff; border-color: var(--orange-600); }
.btn-primary:hover, .btn-primary:focus { background: var(--orange-500); border-color: var(--orange-500); color: #fff; }
.btn-outline { background: transparent; color: var(--orange-500); border-color: var(--orange-500); }
.btn-outline:hover, .btn-outline:focus { background: var(--orange-500); color: #fff; }
.btn-ghost { background: transparent; color: var(--sand-100); border-color: var(--sand-100); }
.btn-ghost:hover, .btn-ghost:focus { background: var(--sand-100); color: var(--green-900); }

/* --- SECTION HEADINGS --- */
.section-label {
  text-transform: uppercase; letter-spacing: 2px; font-size: 0.8rem;
  color: var(--orange-600); font-weight: 700; margin-bottom: 8px; display: block;
}
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 12px; color: var(--green-900);
}
.section-subtitle { font-size: 1.05rem; color: var(--sand-900); max-width: 600px; margin-bottom: 40px; }

/* --- CASE STUDY CARDS (Architecture D primary unit) --- */
.case-studies-grid {
  display: grid; grid-template-columns: 1fr; gap: 32px;
}

.case-card {
  background: #fff; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow); transition: box-shadow var(--transition), transform var(--transition);
}
.case-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.case-card-img {
  width: 100%; height: 220px; object-fit: cover;
  background: var(--green-200);
}
.case-card-body { padding: 24px; }
.case-card-tag {
  display: inline-block; background: var(--sand-200); color: var(--green-900);
  padding: 4px 12px; border-radius: 20px; font-size: 0.75rem;
  font-weight: 700; text-transform: uppercase; margin-bottom: 12px;
}
.case-card h3 { font-size: 1.25rem; margin-bottom: 8px; color: var(--green-800); }
.case-card p { font-size: 0.92rem; color: var(--sand-900); margin-bottom: 16px; }
.case-card-meta {
  display: flex; gap: 20px; font-size: 0.8rem; color: var(--sand-700);
  border-top: 1px solid var(--sand-200); padding-top: 12px;
}
.case-card-meta span { display: flex; align-items: center; gap: 4px; font-weight: 600; }

.case-card-with-result {
  background: #fff; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.case-card-with-result .case-card-body { flex: 1; }
.case-result {
  background: var(--green-800); color: var(--sand-100); padding: 20px 24px;
}
.case-result-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1.5px; opacity: 0.8; }
.case-result-value { font-size: 1.5rem; font-weight: 800; color: var(--orange-400); }

/* --- TESTIMONIALS --- */
.testimonial {
  background: #fff; border-left: 5px solid var(--orange-500);
  padding: 24px 28px; border-radius: var(--radius); box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.testimonial blockquote { font-style: italic; color: var(--green-900); margin-bottom: 12px; font-size: 1.02rem; }
.testimonial cite { font-weight: 700; color: var(--sand-700); font-style: normal; }

/* --- SERVICE LIST (services page) --- */
.service-item {
  background: #fff; border-radius: var(--radius-lg); padding: 28px;
  margin-bottom: 24px; box-shadow: var(--shadow);
}
.service-item h3 { color: var(--green-800); margin-bottom: 8px; font-size: 1.2rem; }
.service-item p { color: var(--sand-900); margin-bottom: 12px; }
.service-item .btn { margin-top: 8px; }

/* --- ABOUT PAGE --- */
.about-intro { text-align: center; max-width: 700px; margin: 0 auto; }
.about-intro p { font-size: 1.08rem; color: var(--sand-900); }

.values-grid {
  display: grid; grid-template-columns: 1fr; gap: 24px; margin-top: 48px;
}
.value-card {
  background: #fff; padding: 28px; border-radius: var(--radius-lg);
  box-shadow: var(--shadow); text-align: center;
}
.value-icon {
  width: 56px; height: 56px; background: var(--orange-600); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px; font-size: 1.5rem; font-weight: 900;
}
.value-card h3 { margin-bottom: 8px; font-size: 1.05rem; }

/* --- CONTACT PAGE --- */
.contact-form {
  background: #fff; padding: 32px; border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; font-weight: 700; margin-bottom: 6px; color: var(--green-900); font-size: 0.9rem;
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 16px; border: 2px solid var(--sand-200);
  border-radius: var(--radius); font-size: 1rem; font-family: inherit;
  transition: border-color var(--transition); background: var(--sand-50);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--orange-500);
}
.form-group textarea { resize: vertical; min-height: 140px; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 20px; }

.contact-info { margin-top: 40px; }
.contact-info-item {
  display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px;
}
.contact-info-icon {
  width: 36px; height: 36px; background: var(--green-700); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 0.9rem; font-weight: 700;
}

/* --- PAGE HERO (inner pages) --- */
.page-hero {
  background: var(--green-800); color: var(--sand-100);
  text-align: center; padding: 64px 20px 48px;
}
.page-hero h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 8px; }
.page-hero p { color: var(--sand-200); max-width: 600px; margin: 0 auto; font-size: 1.05rem; }

/* --- CONTENT BLOCK (privacy/terms) --- */
.content-block { max-width: 800px; margin: 0 auto; }
.content-block h2 { font-size: 1.35rem; margin: 32px 0 12px; color: var(--green-800); }
.content-block h3 { font-size: 1.1rem; margin: 24px 0 8px; color: var(--green-800); }
.content-block p, .content-block li { color: var(--sand-900); margin-bottom: 12px; }
.content-block ul { padding-left: 24px; margin-bottom: 16px; }

/* --- DIVIDER --- */
.divider {
  width: 60px; height: 4px; background: var(--orange-500);
  margin: 0 auto 32px; border: none; border-radius: 2px;
}
.divider-left { margin-left: 0; }

/* --- CTA STRIP --- */
.cta-strip {
  background: linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 100%);
  text-align: center; padding: 60px 20px; color: var(--sand-100);
}
.cta-strip h2 { color: #fff; margin-bottom: 12px; }
.cta-strip p { color: var(--sand-200); margin-bottom: 28px; max-width: 500px; margin-left: auto; margin-right: auto; }

/* --- FOOTER --- */
.site-footer {
  background: var(--green-900); color: var(--sand-200); padding: 48px 20px 24px;
}
.footer-grid {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr; gap: 32px; margin-bottom: 32px;
}
.footer-col h4 { color: #fff; margin-bottom: 12px; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 1px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 6px; }
.footer-col a { color: var(--sand-200); font-size: 0.9rem; }
.footer-col a:hover, .footer-col a:focus { color: var(--orange-400); }
.footer-bottom {
  max-width: 1100px; margin: 0 auto; text-align: center;
  border-top: 1px solid var(--green-700); padding-top: 20px;
  font-size: 0.85rem; color: var(--sand-300);
}
.footer-bottom a { color: var(--sand-300); }

/* --- VISUALLY HIDDEN (for skip link/sr) --- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* — hamburger keyboard focus indicator — */
.hamburger:focus-visible { outline: 2px solid var(--orange-400); outline-offset: 2px; border-radius: 3px; }

/* ============================================================
   TABLET: 600px+
   ============================================================ */
@media (min-width: 600px) {
  .case-studies-grid { grid-template-columns: repeat(2, 1fr); }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   DESKTOP: 900px+
   ============================================================ */
@media (min-width: 900px) {
  .case-studies-grid { grid-template-columns: repeat(3, 1fr); }
  .values-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: start; }
  .contact-info { margin-top: 0; }
  .case-card-with-result:nth-child(1) { display: grid; grid-template-columns: 1fr; }
  .hero { padding: 100px 20px 80px; }
  .section { padding: 80px 0; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
