/* ============================================================
   Smoke Studio — Main Stylesheet
   Design system tokens → components → layout → responsive
   ============================================================ */

/* ---------------------------------------------------------- */
/* 1. CSS Custom Properties (Design Tokens)                   */
/* ---------------------------------------------------------- */

:root {
  /* Colors */
  --color-bg:           #F8F6F3;
  --color-surface:      #FFFFFF;
  --color-text:         #1A1916;
  --color-text-muted:   #6B6760;
  --color-accent:       #8B6F47;
  --color-accent-hover: #7A5F3A;
  --color-accent-active:#6A5030;
  --color-border:       #E2DDD7;
  --color-dark:         #1A1916;
  --color-dark-surface: #242220;
  --color-hero-bg:      #2C2B28;
  --color-error:        #C0392B;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
               Arial, "Noto Sans", sans-serif;
  --font-serif: Georgia, "Times New Roman", Times, serif;

  --text-xs:   0.75rem;   /* 12px */
  --text-sm:   0.875rem;  /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-md:   1.125rem;  /* 18px */
  --text-lg:   1.375rem;  /* 22px */
  --text-xl:   1.75rem;   /* 28px */
  --text-2xl:  2.25rem;   /* 36px */
  --text-3xl:  3rem;      /* 48px */
  --text-4xl:  4rem;      /* 64px */

  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;
  --space-8: 96px;

  /* Container */
  --container-max:              1200px;
  --container-padding:          20px;

  /* Radii */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-btn: 2px;

  /* Shadows */
  --shadow-card:       0 2px 12px rgba(26, 25, 22, 0.07);
  --shadow-card-hover: 0 6px 24px rgba(26, 25, 22, 0.12);

  /* Borders */
  --border: 1px solid var(--color-border);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.4s ease;

  /* Section padding (mobile default) */
  --section-padding: 64px;
}

/* ---------------------------------------------------------- */
/* 2. Reset & Base                                            */
/* ---------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

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

ul,
ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Screen-reader only utility */
.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;
}

/* ---------------------------------------------------------- */
/* 3. Focus Styles                                            */
/* ---------------------------------------------------------- */

:focus:not(:focus-visible) {
  outline: none;
}

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

/* ---------------------------------------------------------- */
/* 4. Container                                               */
/* ---------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

/* ---------------------------------------------------------- */
/* 5. Buttons                                                 */
/* ---------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-btn);
  border: none;
  cursor: pointer;
  transition: background var(--transition-base),
              box-shadow var(--transition-base),
              transform var(--transition-fast);
  min-height: 44px;
  padding: 14px 32px;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-accent);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: var(--color-accent-hover);
}

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

.btn-primary:disabled {
  background: var(--color-border);
  color: var(--color-text-muted);
  cursor: not-allowed;
}

.btn-ghost {
  background: transparent;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
}

.btn-ghost:hover {
  background: rgba(139, 111, 71, 0.06);
}

/* ---------------------------------------------------------- */
/* 6. Header & Navigation                                     */
/* ---------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 56px;
  background: rgba(248, 246, 243, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo */
.logo {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  font-weight: var(--weight-regular);
  letter-spacing: 0.08em;
  color: var(--color-text);
  text-decoration: none;
  flex-shrink: 0;
}

.logo:hover {
  color: var(--color-accent);
}

/* Desktop nav */
.main-nav {
  display: none;
  align-items: center;
  gap: var(--space-5);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.nav-link {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text);
  transition: color var(--transition-base);
  text-decoration: none;
}

.nav-link:hover {
  color: var(--color-accent);
}

.nav-link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.nav-cta {
  padding: 10px 24px;
  min-height: 40px;
}

/* Burger button */
.burger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--color-text);
  border-radius: var(--radius-sm);
  transition: color var(--transition-base);
  flex-shrink: 0;
}

.burger:hover {
  color: var(--color-accent);
}

.burger:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-btn);
}

/* Burger lines transition */
.burger-line {
  transition: transform var(--transition-base), opacity var(--transition-base);
  transform-origin: center;
}

.burger[aria-expanded="true"] .burger-line-1 {
  transform: rotate(45deg) translate(3px, 3px);
}

.burger[aria-expanded="true"] .burger-line-2 {
  opacity: 0;
}

.burger[aria-expanded="true"] .burger-line-3 {
  transform: rotate(-45deg) translate(3px, -3px);
}

/* Mobile menu overlay */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--color-bg);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.mobile-menu.is-open {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}

.mobile-nav-link {
  font-size: var(--text-xl);
  font-weight: var(--weight-regular);
  color: var(--color-text);
  letter-spacing: 0.02em;
  transition: color var(--transition-base);
  text-decoration: none;
}

.mobile-nav-link:hover {
  color: var(--color-accent);
}

.mobile-nav-link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.mobile-nav-cta {
  padding: 14px 40px;
}

/* ---------------------------------------------------------- */
/* 7. Hero Section                                            */
/* ---------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100svh;
  min-height: 100vh; /* fallback */
  background-color: var(--color-hero-bg);
  /* Uncomment when image is available:
  background-image: url('../images/hero.webp');
  background-size: cover;
  background-position: center;
  */
  display: flex;
  align-items: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 25, 22, 0.45);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-block: var(--space-8);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  font-weight: var(--weight-regular);
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: #F8F6F3;
  margin-bottom: var(--space-3);
}

.hero-descriptor {
  font-size: var(--text-md);
  line-height: 1.5;
  color: rgba(248, 246, 243, 0.75);
  max-width: 480px;
  margin-bottom: var(--space-6);
}

.hero-cta {
  width: 100%;
  max-width: 320px;
}

/* ---------------------------------------------------------- */
/* 8. Section Common Styles                                   */
/* ---------------------------------------------------------- */

.section {
  padding-block: var(--section-padding);
}

.section-title {
  font-family: var(--font-sans);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  line-height: 1.3;
  color: var(--color-text);
  margin-bottom: var(--space-6);
}

/* Scroll reveal — progressive enhancement (requires .js on <html>) */
.js .section {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.js .section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero is always visible */
.hero {
  opacity: 1;
  transform: none;
  transition: none;
}

/* ---------------------------------------------------------- */
/* 9. Services Section                                        */
/* ---------------------------------------------------------- */

.section-services {
  background: var(--color-bg);
}

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

.service-card {
  padding: 32px 28px;
  border: var(--border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  transition: box-shadow var(--transition-base),
              border-color var(--transition-base);
}

.service-card:hover {
  box-shadow: var(--shadow-card);
  border-color: var(--color-accent);
}

.service-icon {
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

.service-name {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
  line-height: 1.3;
  margin-bottom: var(--space-2);
}

.service-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.65;
}

/* ---------------------------------------------------------- */
/* 10. Portfolio Section                                      */
/* ---------------------------------------------------------- */

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

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.portfolio-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

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

/* Placeholder div (replaces img until photos are uploaded) */
.portfolio-img {
  aspect-ratio: 4 / 3;
  width: 100%;
  background-color: var(--color-border);
}

/* Real image (uncomment in HTML when photos available) */
.portfolio-img-real {
  aspect-ratio: 4 / 3;
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.portfolio-info {
  padding: 20px 24px;
}

.portfolio-name {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
  line-height: 1.3;
  margin-bottom: var(--space-1);
}

.portfolio-type {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ---------------------------------------------------------- */
/* 11. Process Section                                        */
/* ---------------------------------------------------------- */

.section-process {
  background: var(--color-bg);
}

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

.process-step {
  /* no border — open layout */
}

.step-number {
  display: block;
  font-family: var(--font-serif);
  font-size: 56px;
  line-height: 1;
  color: var(--color-border);
  margin-bottom: 12px;
}

.step-title {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
  line-height: 1.3;
  margin-bottom: var(--space-2);
}

.step-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ---------------------------------------------------------- */
/* 12. Review Section                                         */
/* ---------------------------------------------------------- */

.section-review {
  background: var(--color-dark);
}

.review-inner {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}

.review-quote-mark {
  color: rgba(248, 246, 243, 0.15);
  margin-bottom: var(--space-4);
  display: flex;
  justify-content: center;
}

.review-blockquote {
  font-style: normal;
}

.review-blockquote p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--text-xl);
  line-height: 1.4;
  color: #F8F6F3;
}

.review-cite {
  display: block;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(248, 246, 243, 0.55);
  margin-top: var(--space-4);
  font-style: normal;
}

/* ---------------------------------------------------------- */
/* 13. Contacts Section                                       */
/* ---------------------------------------------------------- */

.section-contacts {
  background: var(--color-bg);
}

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

.contacts-info .section-title {
  margin-bottom: var(--space-3);
}

.contacts-desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.65;
  margin-bottom: var(--space-5);
}

.contacts-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.contacts-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-accent);
  font-size: var(--text-base);
  text-decoration: none;
  transition: color var(--transition-base);
}

.contacts-link:hover {
  color: var(--color-accent-hover);
}

.contacts-link-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Form */
.contacts-form-wrap {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: var(--shadow-card);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.form-label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text);
  line-height: 1.5;
}

.form-label-hint {
  font-weight: var(--weight-regular);
  color: var(--color-text-muted);
}

.required-mark {
  color: var(--color-accent);
  margin-left: 2px;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: var(--text-base);
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-base),
              box-shadow var(--transition-base);
  appearance: none;
  -webkit-appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-muted);
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--color-accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(139, 111, 71, 0.15);
}

.form-input.has-error,
.form-textarea.has-error {
  border-color: var(--color-error);
}

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

.form-error {
  font-size: var(--text-sm);
  color: var(--color-error);
  min-height: 1.2em;
  line-height: 1.4;
}

.form-submit {
  align-self: flex-start;
  margin-top: var(--space-1);
}

.form-success {
  font-size: var(--text-sm);
  color: var(--color-accent);
  line-height: 1.5;
  margin-top: var(--space-2);
}

.form-note {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: var(--border);
}

.form-note a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------------------------------------------------------- */
/* 14. Footer                                                 */
/* ---------------------------------------------------------- */

.site-footer {
  background: var(--color-dark);
  color: var(--color-bg);
  padding-block: var(--space-6);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-name {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  font-weight: var(--weight-regular);
  letter-spacing: 0.06em;
  color: var(--color-bg);
}

.footer-copy {
  font-size: var(--text-sm);
  color: rgba(248, 246, 243, 0.55);
}

.footer-contacts {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-link {
  font-size: var(--text-sm);
  color: var(--color-bg);
  text-decoration: none;
  border-bottom: 1px solid rgba(248, 246, 243, 0.3);
  padding-bottom: 1px;
  transition: border-bottom-color var(--transition-base);
  width: fit-content;
}

.footer-link:hover {
  border-bottom-color: var(--color-bg);
}

.footer-link:focus-visible {
  outline: 2px solid var(--color-bg);
  outline-offset: 3px;
  border-radius: 1px;
}

/* ---------------------------------------------------------- */
/* 15. Responsive — Tablet (≥768px)                          */
/* ---------------------------------------------------------- */

@media (min-width: 768px) {
  :root {
    --container-padding: 40px;
    --section-padding:   80px;
  }

  .site-header {
    height: 64px;
  }

  /* Hero */
  .hero-title {
    font-size: var(--text-3xl);
  }

  .hero-cta {
    width: auto;
  }

  /* Section titles */
  .section-title {
    font-size: var(--text-2xl);
  }

  /* Services grid: 2 cols */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  /* Portfolio grid: 2 cols */
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  /* Process grid: 2 cols */
  .process-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }

  /* Review text */
  .review-blockquote p {
    font-size: var(--text-xl);
  }

  /* Contacts: 2 cols 50/50 */
  .contacts-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
  }

  /* Footer: 2 cols */
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }

  .footer-contacts {
    align-items: flex-end;
  }
}

/* ---------------------------------------------------------- */
/* 16. Responsive — Desktop (≥1024px)                        */
/* ---------------------------------------------------------- */

@media (min-width: 1024px) {
  :root {
    --container-padding: 80px;
    --section-padding:   96px;
  }

  /* Show desktop nav, hide burger */
  .main-nav {
    display: flex;
  }

  .burger {
    display: none;
  }

  /* Hero */
  .hero-title {
    font-size: var(--text-4xl);
  }

  /* Services grid: 3 cols */
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
  }

  /* Portfolio grid: 3 cols */
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
  }

  /* Process grid: 4 cols */
  .process-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-5);
  }

  /* Review text */
  .review-blockquote p {
    font-size: var(--text-xl);
  }

  /* Contacts: 40% / 60% */
  .contacts-grid {
    grid-template-columns: 2fr 3fr;
    gap: var(--space-7);
    align-items: start;
  }
}

/* ---------------------------------------------------------- */
/* 17. Reduced Motion                                         */
/* ---------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  /* Sections always visible when motion is reduced */
  .js .section {
    opacity: 1;
    transform: none;
    transition: none;
  }

  /* Mobile menu — no animation */
  .mobile-menu {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
