/* Design Tokens */
:root {
  --max-width: 1120px;

  --radius-sm: 12px;
  --radius-lg: 16px;

  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 72px;

  --text: #0a0a0a;
  --muted: #404040;
  --border: #d4d4d4;
  --bg: #ffffff;
  --card: #fff;
  --red: #E95055;
  --red-dark: #D13E44;

  --accent: #E95055;

  --font-body: "Inter", Arial, sans-serif;
  --font-head: "Inter", Arial, sans-serif;
}

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 {
  font-size: 44px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h2 {
  font-size: 28px;
  line-height: 1.2;
  font-weight: 600;
}

h3 {
  font-size: 18px;
  line-height: 1.3;
  font-weight: 600;
}

p {
  margin-bottom: var(--space-3);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 150ms ease-out;
}

a:hover {
  opacity: 0.8;
}

a.portfolio-link:hover,
a.portfolio-link:hover img {
  opacity: 1;
}

a:focus {
  outline: 3px solid var(--red);
  outline-offset: 2px;
  border-radius: 2px;
}

.muted {
  color: var(--muted);
  display: block;
}

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-6);
  }
}

/* Header */
.header {
  position: sticky;
  top: 0;
  background-color: var(--card);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  height: 86px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 86px;
  min-height: 86px;
}

.logo {
  display: flex;
  align-items: center;
  padding: var(--space-2) 0;
}

.logo:focus {
  outline: none;
}

.logo-img {
  height: 48px;
  width: auto;
}

@media (min-width: 768px) {
  .logo-img {
    height: 56px;
  }
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  z-index: 101;
}

.nav-toggle-line {
  width: 24px;
  height: 2px;
  background-color: var(--text);
  transition: transform 150ms ease-out, opacity 150ms ease-out;
}

.header[data-nav-open] .nav-toggle-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.header[data-nav-open] .nav-toggle-line:nth-child(2) {
  opacity: 0;
}

.header[data-nav-open] .nav-toggle-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.nav {
  position: fixed;
  top: 86px;
  left: 0;
  right: 0;
  background-color: var(--card);
  border-bottom: 1px solid var(--border);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 200ms ease-out, opacity 200ms ease-out;
}

.header[data-nav-open] .nav {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.nav-link {
  color: var(--text);
  padding: var(--space-2) 0;
  font-size: 16px;
}

.nav-link-button {
  display: inline-block;
  background-color: var(--red);
  color: var(--card);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  margin-top: var(--space-2);
  font-weight: 600;
  border: 2px solid var(--red);
  transition: transform 150ms ease-out, box-shadow 150ms ease-out, opacity 150ms ease-out, background-color 150ms ease-out, border-color 150ms ease-out;
}

.nav-link-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
  opacity: 1;
  background-color: var(--red-dark);
  border-color: var(--red-dark);
}

.nav-link-button:focus {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .nav {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: calc(var(--space-5) - 12px);
    padding: 0;
    border: none;
    transform: none;
    opacity: 1;
    pointer-events: all;
  }

  .nav-link {
    padding: 0 6px;
  }

  .nav-link-button {
    margin-top: 0;
  }
}

/* Sections */
.section {
  padding: var(--space-6) 0;
}

.section-alt {
  background-color: var(--red);
  color: var(--card);
}

.section-alt .section-title,
.section-alt h2,
.section-alt h3 {
  color: var(--card);
}

.section-alt p,
.section-alt .muted {
  color: rgba(255, 255, 255, 0.9);
}

.section-alt .card {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--card);
}

.section-alt .card-title,
.section-alt .step-title,
.section-alt .faq-question {
  color: var(--card);
}

.section-alt .card-text,
.section-alt .step-text,
.section-alt .faq-answer {
  color: rgba(255, 255, 255, 0.85);
}

.section-alt .service-item {
  border-color: rgba(255, 255, 255, 0.2);
}

.section-alt .service-item strong {
  color: var(--card);
}

.section-alt .faq-item {
  border-color: rgba(255, 255, 255, 0.2);
}

.section-alt .portfolio-item {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.section-alt .portfolio-image-wrapper:hover,
.section-alt .portfolio-link:hover {
  background-color: transparent;
}

.section-alt .form-input {
  background-color: var(--card);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.3);
}

.section-alt .form-label {
  color: var(--card);
}

.section-alt .optional {
  color: rgba(255, 255, 255, 0.7);
}

@media (min-width: 768px) {
  .section {
    padding: var(--space-7) 0;
  }
}

.section-title {
  margin-bottom: var(--space-4);
  text-align: center;
}

.section-intro {
  text-align: center;
  font-size: 18px;
  margin-bottom: var(--space-5);
  color: var(--muted);
}

/* Hero */
.hero {
  padding: 0;
  text-align: center;
  background-color: var(--bg);
}

.hero-image-section {
  background-color: var(--red);
  padding: var(--space-6) 0;
}

.hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
}

.hero-image-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.hero-image {
  max-width: 100%;
  height: auto;
  max-height: 400px;
  width: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
  opacity: 0.9;
}

.hero-content {
  flex: 1;
  text-align: center;
  color: var(--card);
}

.hero-content .hero-title,
.hero-content .hero-subtitle,
.hero-content .hero-description {
  color: var(--card);
}

.hero-content .hero-badge {
  color: rgba(255, 255, 255, 0.9);
}

.hero-content .hero-reassurance {
  color: rgba(255, 255, 255, 0.85);
}

.hero-content .btn-primary {
  border-color: var(--card);
}

.hero-content .btn-primary:hover {
  border-color: var(--card);
  background-color: var(--card);
  color: var(--red);
}

@media (min-width: 768px) {
  .hero-image-section {
    padding: var(--space-7) 0;
  }
  
  .hero-container {
    flex-direction: row;
    align-items: center;
    gap: var(--space-7);
  }
  
  .hero-image-wrapper {
    flex: 0 0 50%;
  }
  
  .hero-image {
    max-height: 500px;
    width: 100%;
  }
  
  .hero-content {
    flex: 0 0 50%;
    text-align: left;
    padding: 0;
  }
  
  .hero-cta {
    justify-content: flex-start;
  }
}

.hero-badge {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: var(--space-4);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-title {
  margin-bottom: var(--space-3);
}

.hero-subtitle {
  font-size: 20px;
  color: var(--muted);
  margin-bottom: var(--space-4);
}

.hero-description {
  margin: 0 0 var(--space-5);
  font-size: 18px;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: center;
  margin-bottom: var(--space-4);
}

@media (min-width: 480px) {
  .hero-cta {
    flex-direction: row;
    justify-content: center;
  }
}

.hero-reassurance {
  font-size: 14px;
  color: var(--muted);
}

@media (min-width: 768px) {
  h1 {
    font-size: 52px;
  }

  h2 {
    font-size: 32px;
  }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: transform 150ms ease-out, box-shadow 150ms ease-out;
}

.btn:focus {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

.btn-primary {
  background-color: var(--red);
  color: var(--card);
  border: 2px solid var(--red);
  font-weight: 600;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
  background-color: var(--red-dark);
  border-color: var(--red-dark);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  transform: translateY(-1px);
  border-color: var(--text);
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  margin-top: var(--space-5);
}

@media (min-width: 768px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

.card-title {
  margin-bottom: var(--space-2);
  font-size: 20px;
}

.card-text {
  margin-bottom: 0;
  color: var(--muted);
}

/* Work */
.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  margin: 0;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.portfolio-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  border: 2px solid var(--card);
  border-radius: var(--radius-lg);
  padding: 0 var(--space-4) 0 0;
  overflow: hidden;
}

@media (min-width: 768px) {
  .portfolio-item {
    flex-direction: row;
    align-items: stretch;
    gap: var(--space-5);
    padding: 0 var(--space-5) 0 0;
  }
}

.portfolio-image-wrapper {
  width: 400px;
  height: 400px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 0;
  position: relative;
  min-width: 400px;
  max-width: 400px;
}

.portfolio-link {
  display: block;
  width: 400px;
  height: 100%;
  opacity: 1;
  min-width: 400px;
  max-width: 400px;
}

.portfolio-link:hover {
  opacity: 1;
}

.portfolio-link:focus {
  outline: 3px solid var(--card);
  outline-offset: 2px;
  border-radius: 0;
}

.portfolio-image {
  width: 400px;
  height: auto;
  display: block;
  object-fit: none;
  object-position: top left;
  transform: translateY(0);
  transition: transform 8s ease-in-out;
  opacity: 1;
}

.portfolio-image:hover {
  opacity: 1;
}

.portfolio-content {
  flex: 1;
  padding: var(--space-4) 0;
  padding-left: var(--space-4);
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-decoration: none;
  color: inherit;
}

@media (min-width: 768px) {
  .portfolio-content {
    padding-left: 0;
  }
}

.portfolio-content:hover {
  opacity: 1;
}

.portfolio-title {
  font-size: 20px;
  margin-bottom: var(--space-2);
  color: var(--card);
}

.portfolio-description {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

/* Services */
.services-boxes {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

@media (min-width: 768px) {
  .services-boxes {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .services-boxes {
    grid-template-columns: repeat(5, 1fr);
  }
}

.service-box {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.service-box strong {
  display: flex;
  font-size: 18px;
  margin-bottom: var(--space-2);
  min-height: 54px;
  align-items: flex-start;
}

.service-box .muted {
  padding-top: var(--space-2);
  border-top: 1px solid var(--border);
}

.service-note {
  margin-top: var(--space-5);
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

/* Process */
.process-list {
  list-style: decimal;
  margin: 0 0 0 var(--space-5);
  padding: 0;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .process-list {
    margin-left: var(--space-4);
  }
}

.process-list li {
  margin-bottom: var(--space-3);
  line-height: 1.6;
  padding-left: var(--space-2);
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
  display: list-item;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.process-list li:last-child {
  margin-bottom: 0;
  border-bottom: none;
}

.process-item-content {
  flex: 1;
  font-weight: normal;
  line-height: 1.6;
  display: block;
}

.process-list strong {
  font-weight: 600;
  display: block;
  margin-bottom: 0;
  line-height: 1.4;
}

.process-item-content br {
  line-height: 1.6;
  margin-top: 0;
}

.process-item-content br ~ *,
.process-item-content {
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
}

.process-item-content strong {
  font-weight: 600;
  color: rgba(255, 255, 255, 1);
}

.process-item-content br {
  line-height: 1.6;
  margin-top: 0;
}

/* Pricing */
.pricing-content {
  margin: 0 auto;
  text-align: center;
}

.pricing-list {
  list-style: disc;
  text-align: left;
  max-width: 600px;
  margin: 0 auto var(--space-5);
  padding-left: var(--space-4);
}

.pricing-list li {
  margin-bottom: var(--space-2);
}

.pricing-reassurance {
  margin-top: var(--space-5);
  font-size: 14px;
  color: var(--muted);
}

/* FAQ */
.faq-list {
  margin: 0;
}

.faq-item {
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  margin-bottom: var(--space-2);
  font-size: 18px;
}

.faq-answer {
  margin-bottom: 0;
  color: var(--muted);
}

/* About */
.about-content {
  margin: 0 auto;
  text-align: left;
  max-width: 800px;
}

.about-signature {
  margin-top: var(--space-5);
  font-size: 14px;
  color: var(--muted);
}

/* Contact Form */
.contact-form {
  margin: 0 auto var(--space-5);
}

.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  margin-bottom: var(--space-1);
  font-weight: 500;
  color: var(--text);
}

.optional {
  font-weight: 400;
  color: var(--muted);
  font-size: 14px;
}

.form-input {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 16px;
  background-color: var(--card);
  color: var(--text);
  transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}

.form-input:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-alt {
  text-align: center;
  margin: 0 auto;
}

.contact-alt p {
  margin-bottom: var(--space-2);
}

.link {
  color: var(--red);
  text-decoration: underline;
}

a:not(.btn):not(.nav-link-button):not(.nav-link):not(.footer-link):not(.logo) {
  color: var(--red);
}

a.nav-link,
a.footer-link {
  color: var(--text);
}

a.nav-link:hover,
a.footer-link:hover {
  color: var(--red);
  opacity: 1;
}

/* Articles */
.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  margin-top: var(--space-5);
}

@media (min-width: 768px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.articles-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  margin-top: var(--space-5);
}

.article-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: transform 150ms ease-out, box-shadow 150ms ease-out;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.article-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
  .article-card {
    flex-direction: row;
    align-items: flex-start;
  }
}

.article-card-image {
  flex-shrink: 0;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .article-card-image {
    width: 300px;
    margin: 0;
  }
}

.article-card-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--radius-sm);
  display: block;
}

.article-card-content {
  flex: 1;
  min-width: 0;
}

.article-title {
  margin-bottom: var(--space-2);
  font-size: 20px;
}

.article-title a {
  color: var(--text);
  text-decoration: none;
}

.article-title a:hover {
  color: var(--red);
}

.article-date {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: var(--space-3);
}

.article-summary {
  margin-bottom: var(--space-4);
  color: var(--muted);
  line-height: 1.6;
}

.article-read-more {
  color: var(--red);
  font-weight: 500;
  text-decoration: none;
}

.article-read-more:hover {
  text-decoration: underline;
}

.articles-more {
  text-align: center;
  margin-top: var(--space-5);
}

/* Article Pages */
.article-page {
  padding: var(--space-6) 0;
}

.article-header {
  margin-bottom: var(--space-6);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.article-back {
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: var(--space-4);
  font-size: 14px;
}

.article-back:hover {
  color: var(--red);
}

.article-page-title {
  font-size: 44px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2);
  max-width: 900px;
}

.article-meta {
  font-size: 14px;
  color: var(--muted);
}

.article-content {
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
}

.article-content h2 {
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
  font-size: 28px;
}

.article-content h3 {
  margin-top: var(--space-5);
  margin-bottom: var(--space-2);
  font-size: 20px;
}

.article-content p {
  margin-bottom: var(--space-4);
}

.article-content ul,
.article-content ol {
  margin-bottom: var(--space-4);
  padding-left: var(--space-5);
}

.article-content li {
  margin-bottom: var(--space-2);
}

.article-footer {
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.article-back-link {
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.article-back-link:hover {
  color: var(--red);
}

@media (min-width: 768px) {
  .article-page {
    padding: var(--space-7) 0;
  }
  
  .article-page-title {
    font-size: 52px;
  }
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-5) 0;
  background-color: var(--card);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  text-align: center;
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
  }
}

.footer-nav {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
}

.footer-content > p {
  margin: 0;
  line-height: 1.5;
}

.footer-link {
  color: var(--muted);
  font-size: 14px;
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}
