/*
   PEGGY LEE - Freelance Portfolio Stylesheet
   Design Philosophy: European editorial, minimalist, high contrast, clean typography.
   Colors: HSL-based, rich slate, deep charcoal, muted warm bronze, and stone.
*/

/* --- Design Tokens --- */
:root {
  /* VI 2026-07-09 — Peggy Lee Cross-Cultural Insights */
  --color-bg-primary: #F5F6F8;         /* Paper — main page base */
  --color-bg-secondary: #E7EAEF;       /* Mist — alt sections & cards */
  --color-bg-dark: #1F2E45;            /* footer Ink Navy */
  --color-text-dark: #1F2E45;          /* Ink Navy / 標題 */
  --color-text-muted: #4A5563;         /* Slate / 內文次要 */
  --color-text-light: #F5F6F8;
  --color-text-light-muted: #9DB0CC;
  --color-accent: #6E82A0;             /* Steel Blue — secondary (labels, lines, nav) */
  --color-accent-light: #E7EAEF;       /* pale accent wash */
  --color-cta: #B0794A;                /* Copper — CTA / highlight ONLY (~5%) */
  --color-cta-dark: #94623A;           /* Copper Deep — hover */
  --color-border: rgba(110, 130, 160, 0.35); /* 細線 — steel @35% */
  --color-border-dark: rgba(245, 246, 248, 0.12);

  --font-serif: 'Playfair Display', Georgia, Cambria, "Times New Roman", serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --transition-smooth: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-fast: all 0.2s ease-out;

  --container-max-width: 1140px;
  --header-height: 80px;
}

/* --- Self-hosted Fonts (no third-party font CDN requests) --- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('assets/fonts/inter-latin-300-normal.woff2') format('woff2'),
       url('assets/fonts/inter-latin-300-normal.woff') format('woff');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/inter-latin-400-normal.woff2') format('woff2'),
       url('assets/fonts/inter-latin-400-normal.woff') format('woff');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/inter-latin-500-normal.woff2') format('woff2'),
       url('assets/fonts/inter-latin-500-normal.woff') format('woff');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/inter-latin-600-normal.woff2') format('woff2'),
       url('assets/fonts/inter-latin-600-normal.woff') format('woff');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/playfair-display-latin-500-normal.woff2') format('woff2'),
       url('assets/fonts/playfair-display-latin-500-normal.woff') format('woff');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/playfair-display-latin-600-normal.woff2') format('woff2'),
       url('assets/fonts/playfair-display-latin-600-normal.woff') format('woff');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/playfair-display-latin-700-normal.woff2') format('woff2'),
       url('assets/fonts/playfair-display-latin-700-normal.woff') format('woff');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/playfair-display-latin-400-italic.woff2') format('woff2'),
       url('assets/fonts/playfair-display-latin-400-italic.woff') format('woff');
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg-primary);
  color: var(--color-text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-text-dark);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.75rem;
}

h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 2px;
  background-color: var(--color-accent);
}

h3 {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1.5rem;
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

.text-lead {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  line-height: 1.6;
  font-family: var(--font-sans);
  font-weight: 300;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

/* --- Layout Containers --- */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 7rem 0;
}

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

/* --- Header / Navigation --- */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: hsla(210, 25%, 97%, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  transition: var(--transition-fast);
}

header.scrolled {
  height: 70px;
  background-color: hsla(210, 25%, 97%, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

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

.logo {
  text-decoration: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
}

.logo-mark {
  display: flex;
  flex-shrink: 0;
}

.logo-mark svg {
  width: 46px;
  height: auto;
  display: block;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-name {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--color-text-dark);
}

.logo-sub {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-accent);
  margin-top: -2px;
}

nav {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-link {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-dark);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: var(--transition-fast);
  position: relative;
  padding: 0.5rem 0;
  white-space: nowrap;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: var(--color-accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

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

.nav-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.btn-contact-header {
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--color-text-dark);
  color: var(--color-text-dark);
  transition: var(--transition-fast);
}

.btn-contact-header:hover {
  background-color: var(--color-text-dark);
  color: var(--color-text-light);
}

/* Prevent specific CJK terms from splitting across a line break */
.nowrap-cjk {
  white-space: nowrap;
}

/* Language Switcher */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.lang-switch a {
  color: var(--color-text-dark);
  text-decoration: none;
  opacity: 0.5;
  transition: var(--transition-fast);
}

.lang-switch a:hover {
  opacity: 1;
  color: var(--color-accent);
}

.lang-switch a.active {
  opacity: 1;
  color: var(--color-cta);
  cursor: default;
}

.lang-switch .lang-sep {
  opacity: 0.3;
  color: var(--color-text-dark);
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-text-dark);
  margin: 5px 0;
  transition: var(--transition-fast);
}

/* --- Hero Section --- */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-height) + 2rem);
  background: radial-gradient(circle at 80% 20%, hsl(207, 32%, 94%) 0%, var(--color-bg-primary) 60%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  max-width: 680px;
}

.hero-tagline {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-accent);
  margin-bottom: 1.5rem;
  display: inline-block;
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: 4px;
}

.hero-content h1 {
  margin-bottom: 1.5rem;
}

.hero-cta-group {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
}

.btn {
  display: inline-block;
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 1rem 2rem;
  transition: var(--transition-smooth);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--color-cta);
  color: var(--color-text-light);
  border: 1px solid var(--color-cta);
}

.btn-primary:hover {
  background-color: var(--color-cta-dark);
  border-color: var(--color-cta-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(31, 46, 69, 0.12);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-text-dark);
  border: 1px solid var(--color-text-dark);
}

.btn-secondary:hover {
  background-color: var(--color-text-dark);
  color: var(--color-text-light);
  transform: translateY(-2px);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-svg-frame {
  width: 100%;
  max-width: 380px;
  height: auto;
  filter: drop-shadow(0 15px 30px rgba(0,0,0,0.06));
}

/* --- Section Headers --- */
.section-header {
  max-width: 650px;
  margin-bottom: 4.5rem;
}

.section-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-accent);
  font-weight: 600;
  display: block;
  margin-bottom: 0.75rem;
}

/* --- Target Audience Banner --- */
.target-audience {
  background-color: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 4rem 0;
}

.audience-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
}

.audience-card {
  padding: 1.5rem 0;
}

.audience-num {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
  opacity: 0.75;
}

.audience-card h4 {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text-dark);
}

.audience-card p {
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 0;
}

/* --- Services Accordion & Details --- */
.services-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
}

.services-nav-wrapper {
  min-width: 0;
}

.services-nav-dots {
  display: none;
}

.services-nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.service-tab-btn {
  background: none;
  border: none;
  text-align: left;
  padding: 2rem;
  cursor: pointer;
  border-left: 3px solid var(--color-border);
  transition: var(--transition-smooth);
}

.service-tab-btn h3 {
  margin-bottom: 0.5rem;
  transition: var(--transition-fast);
}

.service-tab-btn p {
  font-size: 0.95rem;
  margin-bottom: 0;
  transition: var(--transition-fast);
}

.service-tab-btn:hover {
  background-color: hsla(206, 20%, 44%, 0.04);
  border-left-color: var(--color-text-muted);
}

.service-tab-btn.active {
  background-color: var(--color-accent-light);
  border-left-color: var(--color-accent);
}

.service-tab-btn.active h3 {
  color: var(--color-accent);
}

.services-display {
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  padding: 3rem;
  position: relative;
  box-shadow: 0 10px 40px rgba(0,0,0,0.02);
}

.service-pane {
  display: none;
  animation: fadeIn 0.4s ease-out forwards;
}

.service-pane.active {
  display: block;
}

.service-pane h3 {
  font-size: 1.8rem;
  color: var(--color-text-dark);
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 1rem;
}

.service-pane p {
  margin-bottom: 1.5rem;
}

.service-feature-list {
  list-style: none;
  margin-bottom: 2rem;
}

.service-feature-list li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.service-feature-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: bold;
}

/* --- B2B Package Specific Details --- */
.package-details-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background-color: var(--color-bg-secondary);
  border-left: 3px solid var(--color-accent);
}

.package-detail {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}

.package-detail strong {
  color: var(--color-text-dark);
  margin-right: 0.35em;
}

/* --- Case Studies Grid --- */
.case-studies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
}

/* --- Methodology Section --- */
.methodology-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
}

.methodology-card {
  padding: 2.5rem;
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  transition: var(--transition-smooth);
}

.methodology-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.03);
  border-color: hsla(206, 20%, 44%, 0.35);
}

.methodology-icon {
  color: var(--color-text-dark);
  margin-bottom: 1.5rem;
  display: inline-flex;
}

.methodology-icon svg {
  width: 34px;
  height: 34px;
  display: block;
}

.methodology-card h3 {
  font-family: var(--font-sans);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.methodology-card p {
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* --- About & Profile --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 5rem;
  align-items: center;
}

.about-visual {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.about-img-placeholder {
  background-color: var(--color-accent-light);
  width: 100%;
  aspect-ratio: 4 / 5;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--color-accent);
  padding: 2rem;
  text-align: center;
}

.about-img-placeholder svg {
  margin-bottom: 1.5rem;
  opacity: 0.7;
}

.about-languages {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.lang-badge {
  background-color: var(--color-bg-secondary);
  color: var(--color-text-dark);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  border: 1px solid var(--color-border);
}

.lang-badge.highlight {
  background-color: var(--color-accent-light);
  color: var(--color-accent);
  border-color: hsla(206, 20%, 44%, 0.25);
}

.about-bullets {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.about-bullet-item h4 {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.about-bullet-item p {
  font-size: 0.88rem;
  margin-bottom: 0;
}

/* --- Contact Section --- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 5rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.contact-details {
  list-style: none;
  margin-top: 2rem;
}

.contact-details li {
  margin-bottom: 1.5rem;
  font-size: 1rem;
  color: var(--color-text-muted);
}

.contact-details strong {
  color: var(--color-text-dark);
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.25rem;
}

.contact-form {
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  padding: 3.5rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
}

.contact-email-card {
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  padding: 3.5rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.contact-email-card h3 {
  margin: 0.75rem 0 1rem;
}

.contact-email-card > p:first-of-type {
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

/* Let the message field grow so the form bottom aligns with the left column */
.contact-form .form-group:has(textarea) {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.contact-form .form-group:has(textarea) .form-label {
  flex: 0 0 auto;
}

.form-group {
  margin-bottom: 1.75rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-dark);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 0.85rem 1rem;
  background-color: var(--color-bg-secondary);
  border: 1px solid transparent;
  color: var(--color-text-dark);
  transition: var(--transition-fast);
}

.form-control:focus {
  outline: none;
  background-color: var(--color-bg-primary);
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px hsla(206, 20%, 44%, 0.18);
}

textarea.form-control {
  resize: vertical;
  min-height: 250px;
  flex: 1 1 auto;
}

.form-feedback {
  display: none;
  margin-top: 1.5rem;
  padding: 1rem;
  font-size: 0.9rem;
}

.form-feedback.success {
  display: block;
  background-color: hsl(120, 25%, 95%);
  color: hsl(120, 40%, 25%);
  border: 1px solid hsl(120, 25%, 85%);
}

.form-feedback.error {
  display: block;
  background-color: hsl(0, 40%, 97%);
  color: hsl(0, 60%, 35%);
  border: 1px solid hsl(0, 40%, 90%);
}

/* --- Footer --- */
footer {
  background-color: var(--color-bg-dark);
  color: var(--color-text-light-muted);
  padding: 4.5rem 0 2rem;
  border-top: 1px solid var(--color-border-dark);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  margin-bottom: 3.5rem;
}

.footer-brand h3 {
  color: var(--color-text-light);
  font-family: var(--font-serif);
  margin-bottom: 0.5rem;
  font-size: 1.4rem;
}

.footer-brand p {
  color: var(--color-text-light-muted);
  max-width: 320px;
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
}

.footer-links-row {
  display: flex;
  gap: 2rem;
}

.footer-link {
  text-decoration: none;
  font-size: 0.85rem;
  color: var(--color-text-light-muted);
  transition: var(--transition-fast);
}

.footer-link:hover {
  color: var(--color-text-light);
}

.footer-bottom {
  border-top: 1px solid var(--color-border-dark);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

/* --- Impressum & Privacy Styles --- */
.legal-container {
  padding-top: calc(var(--header-height) + 3rem);
  padding-bottom: 6rem;
  max-width: 800px;
  margin: 0 auto;
}

.legal-container h1 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

.legal-container h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  border-bottom: none;
  padding-bottom: 0;
}

.legal-container h2::after {
  display: none;
}

.legal-container h3 {
  font-size: 1.15rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.legal-container p, .legal-container li {
  font-size: 0.95rem;
  line-height: 1.7;
}

.legal-container ul {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

/* --- Keyframe Animations --- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Grid children default to min-width:auto (= min-content), which lets a single
   long word (German/Spanish compounds especially) push the whole column past
   the viewport. Allowing them to shrink keeps every grid inside the screen. */
.hero-grid > *,
.audience-grid > *,
.about-grid > *,
.contact-grid > *,
.methodology-grid > *,
.case-studies-grid > *,
.footer-grid > * {
  min-width: 0;
}

/* --- Responsive Media Queries --- */
@media (max-width: 992px) {
  /* Footer: stack the two columns and let the link rows wrap, otherwise the
     right-hand column is clipped on narrow screens. */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
  }

  .footer-brand p {
    max-width: 100%;
  }

  .footer-links {
    align-items: flex-start;
    gap: 1.25rem;
  }

  .footer-links-row {
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-cta-group {
    justify-content: center;
  }

  .hero-svg-frame {
    max-width: 320px;
  }

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

  .services-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .services-nav {
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border);
    scrollbar-width: thin;
    scrollbar-color: var(--color-accent) transparent;
    scroll-snap-type: x proximity;
    /* Fade the right edge so it's visually obvious there are more tabs to
       scroll to. Removed (see .at-end below) once the user reaches the
       last tab, so the final tab isn't permanently dimmed. */
    mask-image: linear-gradient(to right, black calc(100% - 44px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black calc(100% - 44px), transparent 100%);
  }

  .services-nav.at-end {
    mask-image: none;
    -webkit-mask-image: none;
  }

  .services-nav::-webkit-scrollbar {
    height: 4px;
  }

  .services-nav::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: 2px;
  }

  .service-tab-btn {
    border-left: none;
    border-bottom: 2px solid transparent;
    padding: 0.85rem 1.25rem;
    text-align: center;
    /* Cap each tab's width so the next tab always peeks in at the edge —
       otherwise a long title fills the whole screen and there's no visual
       hint that more services exist. */
    flex: 0 0 min(78vw, 320px);
    scroll-snap-align: start;
  }

  .service-tab-btn p {
    display: none;
  }

  .service-tab-btn h3 {
    font-size: 0.95rem;
    margin-bottom: 0;
    white-space: normal;
    overflow-wrap: break-word;
  }

  /* Pagination dots below the scrollable tab row — shows position/count
     (e.g. 1 of 5) since only one tab is visible at a time on mobile. */
  .services-nav-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.85rem;
  }

  .services-nav-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--color-border);
    transition: var(--transition-fast);
  }

  .services-nav-dots .dot.active {
    background-color: var(--color-accent);
    width: 18px;
    border-radius: 3px;
  }

  .service-tab-btn.active {
    background-color: var(--color-accent-light);
    border-bottom-color: var(--color-accent);
  }

  .services-display {
    padding: 2rem 1.5rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-visual {
    max-width: 450px;
    margin: 0 auto;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .contact-info {
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem;
  }

  .contact-details {
    margin-top: 0;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }

  /* Long single words (Marktforschungsagenturen, chinesischsprachigen,
     Investigación…) must be allowed to break rather than overflow.
     hyphens:auto gives a proper hyphenated break on devices that ship
     hyphenation dictionaries; break-word is the guaranteed fallback. */
  body {
    overflow-wrap: break-word;
    hyphens: auto;
  }

  /* A 40px headline in a 326px column forces even ordinary German compounds
     to break mid-word; a slightly smaller mobile headline keeps them whole. */
  h1 {
    font-size: clamp(1.9rem, 7.5vw, 4rem);
  }

  /* Two audience cards per row leaves ~143px per card — every longer heading
     breaks mid-word. One per row on phones. */
  .audience-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Same reason: two columns of ~150px can't hold German/Spanish labels. */
  .about-bullets {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .about-bullets > *,
  .package-details-grid > * {
    min-width: 0;
  }

  /* Hero buttons can't shrink below their longest word, so let them stack
     instead of pushing the row past the screen on narrow phones. */
  .hero-cta-group {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .btn {
    padding: 1rem 1.5rem;
  }

  header {
    height: var(--header-height);
  }

  .mobile-nav-toggle {
    display: block;
  }

  nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background-color: var(--color-bg-primary);
    flex-direction: column;
    padding: 3rem 2rem;
    gap: 2rem;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.77,0.2,0.05,1.0);
    border-top: 1px solid var(--color-border);
    overflow-y: auto;
  }

  nav.open {
    transform: translateX(0);
  }

  .nav-link {
    font-size: 1.1rem;
  }

  .btn-contact-header {
    width: 100%;
    text-align: center;
    padding: 1rem;
    font-size: 1rem;
  }

  .lang-switch {
    font-size: 1rem;
    gap: 0.6rem;
  }

  /* Hamburger transformations */
  .mobile-nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .mobile-nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .mobile-nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .methodology-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .case-studies-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-info {
    flex-direction: column;
    /* flex-start (inherited from the tablet rule) sizes children to their
       content and lets them exceed the column; stretch keeps them in. */
    align-items: stretch;
  }

  .contact-info > * {
    min-width: 0;
  }

  /* Flex items default to min-width:auto, and overflow-wrap:break-word does
     not shrink the intrinsic minimum — so the step text next to each icon
     still needs an explicit min-width:0 to stay inside the column. */
  .contact-info p {
    min-width: 0;
  }
}
