/* --- VARIABLES --- */
:root {
  /* Colors: Warm Paper Palette */
  --color-bg: #f5f2eb; /* Warm Eggshell */
  --color-surface: #ebe6dc; /* Slightly darker for contrast */
  --color-text: #1a1a1a; /* Charcoal Black */
  --color-accent: #bc4b35; /* Terracotta / Swiss Red */
  --color-border: #1a1a1a; /* Strict Black Borders */

  /* Typography */
  --font-heading: "Playfair Display", serif;
  --font-body: "Inter", sans-serif;

  /* Layout */
  --container-width: 1280px;
  --header-height: 80px;
  --border-width: 1px;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

ul {
  list-style: none;
}

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

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* --- TYPOGRAPHY --- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
}

/* --- BUTTONS (Strict Shape) --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  border: var(--border-width) solid var(--color-border);
  background: transparent;
  color: var(--color-text);
  border-radius: 0; /* Strict */
  transition: all 0.3s ease;
}

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

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

/* --- HEADER (Swiss Grid Style) --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: var(--color-bg);
  border-bottom: var(--border-width) solid var(--color-border);
  z-index: 1000;
}

.header__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.logo__icon {
  height: 32px;
  width: auto;
}

.nav__list {
  display: flex;
  gap: 30px;
}

.nav__link {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
}

.nav__link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 1px;
  background-color: var(--color-accent);
  transition: width 0.3s ease;
}

.nav__link:hover::after {
  width: 100%;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

/* --- FOOTER (Swiss Grid) --- */
.footer {
  border-top: var(--border-width) solid var(--color-border);
  background-color: var(--color-bg);
  padding-top: 0;
}

.footer__container {
  max-width: var(--container-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  /* Swiss Style: Vertical borders between columns */
}

.footer__col {
  padding: 40px 20px;
  border-right: var(--border-width) solid var(--color-border);
}

.footer__col:first-child {
  padding-left: 20px; /* Reset internal padding */
  padding-left: 0;
}

.footer__col:last-child {
  border-right: none;
  padding-right: 0;
}

.footer__title {
  font-size: 1.1rem;
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer__desc {
  font-size: 0.95rem;
  margin-top: 16px;
  opacity: 0.8;
}

.footer__list li {
  margin-bottom: 12px;
}

.footer__link {
  font-size: 0.9rem;
  color: var(--color-text);
}

.footer__link:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

.footer__contacts .contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.contact-item i {
  width: 18px;
  height: 18px;
  stroke: var(--color-accent);
  flex-shrink: 0;
}

.footer__bottom {
  border-top: var(--border-width) solid var(--color-border);
  padding: 20px;
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.7;
}

/* --- MOBILE ADAPTATION --- */
@media (max-width: 992px) {
  .burger {
    display: block;
  }

  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: 0;
    background-color: var(--color-bg);
    overflow: hidden;
    transition: height 0.4s ease;
    border-bottom: var(--border-width) solid var(--color-border);
  }

  .nav.active {
    height: calc(100vh - var(--header-height));
  }

  .nav__list {
    flex-direction: column;
    align-items: center;
    padding-top: 40px;
    gap: 30px;
  }

  .nav__link {
    font-size: 1.2rem;
  }

  .header__btn {
    display: none; /* Hide CTA on mobile header, keep in menu or sections */
  }

  .footer__container {
    grid-template-columns: 1fr;
  }

  .footer__col {
    border-right: none;
    border-bottom: var(--border-width) solid var(--color-border);
    padding: 40px 0;
  }
}

/* --- HERO SECTION (Swiss Grid) --- */
.hero {
  width: 100%;
  border-bottom: var(--border-width) solid var(--color-border);
  background-color: var(--color-bg);
  margin-top: var(--header-height); /* Offset for fixed header */
  min-height: calc(100vh - var(--header-height));
  display: flex;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 50% / 50% split */
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  border-left: var(--border-width) solid var(--color-border);
  border-right: var(--border-width) solid var(--color-border);
}

.hero__content {
  padding: 60px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: var(--border-width) solid var(--color-border); /* Middle line */
}

.hero__visual {
  position: relative;
  background-color: #ebe6dc; /* Slightly darker for contrast */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#heroCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Typography & Elements */
.hero__label {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 15px;
  width: fit-content;
}

.hero__badge {
  color: var(--color-accent);
  font-weight: 700;
}

.hero__title {
  font-size: clamp(3rem, 5vw, 4.5rem); /* Giant Swiss Typography */
  line-height: 1.1;
  margin-bottom: 30px;
  color: var(--color-text);
}

.text-italic {
  font-style: italic;
  font-family: var(--font-heading);
  color: var(--color-accent);
}

.hero__desc {
  font-size: 1.1rem;
  max-width: 450px;
  margin-bottom: 40px;
}

.hero__actions {
  margin-top: auto;
}

.hero__note {
  font-size: 0.8rem;
  margin-top: 15px;
  opacity: 0.6;
  font-style: italic;
}

/* Visual Overlay Words */
.hero__overlay-text {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 100px;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 4rem;
  opacity: 0.05; /* Very subtle background text */
  pointer-events: none;
  font-weight: 700;
  text-transform: uppercase;
}

/* Mobile Adaptation */
@media (max-width: 992px) {
  .hero__grid {
    grid-template-columns: 1fr; /* Stack on mobile */
    border-left: none;
    border-right: none;
  }

  .hero__content {
    border-right: none;
    border-bottom: var(--border-width) solid var(--color-border);
    padding: 40px 20px;
  }

  .hero__visual {
    height: 300px; /* Fixed height for visual on mobile */
  }

  .hero__title {
    font-size: 2.5rem;
  }
}

/* --- COMMON SECTION STYLES --- */
.section {
  border-bottom: var(--border-width) solid var(--color-border);
  background-color: var(--color-bg);
}

.section-title {
  font-size: 2.5rem;
  color: var(--color-text);
  margin-bottom: 20px;
}

.text-accent {
  color: var(--color-accent);
  font-style: italic;
  font-family: var(--font-heading);
}

/* --- METHODOLOGY (Horizontal List) --- */
.methodology__container {
  display: grid;
  grid-template-columns: 1fr 2fr; /* Asymmetric split */
  min-height: 400px;
}

.methodology__head {
  padding: 60px 40px;
  border-right: var(--border-width) solid var(--color-border);
}

.methodology__sub {
  font-size: 1.1rem;
  max-width: 300px;
}

.methodology__steps {
  display: flex;
  flex-direction: column;
}

.step {
  display: flex;
  gap: 30px;
  padding: 40px;
  border-bottom: var(--border-width) solid var(--color-border);
  transition: background-color 0.3s ease;
}

.step:last-child {
  border-bottom: none;
}

.step:hover {
  background-color: #ebe6dc; /* Slight darken on hover */
}

.step__num {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-accent);
  font-weight: 700;
}

.step__title {
  font-size: 1.25rem;
  margin-bottom: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.step__desc {
  font-size: 1rem;
  max-width: 500px;
  color: #444;
}

/* --- OPPORTUNITIES (Columnar Grid) --- */
.opps__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-left: var(--border-width) solid var(--color-border);
  border-right: var(--border-width) solid var(--color-border);
}

.opps__item {
  padding: 50px 30px;
  border-right: var(--border-width) solid var(--color-border);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: transform 0.3s ease;
}

.opps__item:last-child {
  border-right: none;
}

.opps__item:hover {
  background-color: var(--color-surface);
}

.opps__icon {
  margin-bottom: 25px;
  color: var(--color-accent);
}

.opps__icon svg {
  width: 32px;
  height: 32px;
}

.opps__title {
  font-size: 1.2rem;
  margin-bottom: 15px;
  font-family: var(--font-heading);
  font-weight: 600;
}

.opps__desc {
  font-size: 0.95rem;
  margin-bottom: 20px;
  line-height: 1.5;
}

.link-arrow {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--color-accent);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.link-arrow:hover {
  gap: 12px; /* Micro-interaction: arrow moves */
}

/* --- MOBILE ADAPTATION --- */
@media (max-width: 992px) {
  .methodology__container {
    grid-template-columns: 1fr;
  }

  .methodology__head {
    border-right: none;
    border-bottom: var(--border-width) solid var(--color-border);
    padding: 40px 20px;
  }

  .step {
    flex-direction: column;
    gap: 15px;
    padding: 30px 20px;
  }

  .opps__grid {
    grid-template-columns: 1fr;
    border-left: none;
    border-right: none;
  }

  .opps__item {
    border-right: none;
    border-bottom: var(--border-width) solid var(--color-border);
    padding: 40px 20px;
  }
}

/* --- BLOG (Journal Style) --- */
.blog__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 4px solid var(--color-border); /* Thick separate line */
}

.journal-entry {
  display: grid;
  grid-template-columns: 1fr 3fr 0.5fr;
  padding: 30px 0;
  border-bottom: var(--border-width) solid var(--color-border);
  align-items: baseline;
  transition: background-color 0.3s ease;
}

.journal-entry:hover {
  background-color: var(--color-surface);
}

.journal-entry__meta {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: #666;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.journal-entry__cat {
  color: var(--color-accent);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.journal-entry__title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 10px;
}

.journal-entry__excerpt {
  font-size: 0.95rem;
  color: #444;
  max-width: 600px;
}

.journal-entry__action {
  display: flex;
  justify-content: flex-end;
  color: var(--color-text);
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
}

.journal-entry:hover .journal-entry__action {
  opacity: 1;
  transform: translateX(0);
}

/* --- FAQ (Swiss Accordion) --- */
.faq__container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
}

.faq__desc {
  max-width: 300px;
  font-size: 1rem;
  margin-top: 20px;
}

.faq-item {
  border-bottom: var(--border-width) solid var(--color-border);
}

.faq-item:first-child {
  border-top: var(--border-width) solid var(--color-border);
}

.faq-item__trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: color 0.3s ease;
}

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

.faq-item__q {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 500;
  color: inherit;
}

.faq-item__icon {
  transition: transform 0.3s ease;
  stroke-width: 1.5;
}

.faq-item.active .faq-item__icon {
  transform: rotate(45deg);
}

.faq-item__content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.faq-item__text {
  padding-bottom: 25px;
  font-size: 1rem;
  color: #444;
  line-height: 1.6;
  padding-right: 40px;
}

/* Mobile Adaptation */
@media (max-width: 992px) {
  .journal-entry {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .journal-entry__action {
    display: none; /* Hide arrow on mobile */
  }

  .faq__container {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

/* --- CONTACT SECTION (Swiss Form) --- */
.contact__container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 600px;
  border-left: var(--border-width) solid var(--color-border);
  border-right: var(--border-width) solid var(--color-border);
}

.contact__info {
  padding: 60px 40px;
  border-right: var(--border-width) solid var(--color-border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.contact__desc {
  max-width: 350px;
  margin-bottom: 40px;
  font-size: 1.05rem;
}

.contact__detail-item {
  margin-bottom: 25px;
}

.detail-label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 5px;
  letter-spacing: 0.05em;
}

.detail-link {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-text);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

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

/* Form Styling */
.contact__form-wrapper {
  position: relative;
  background-color: var(--color-surface);
}

.contact__form {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.form-group {
  padding: 25px 40px;
  border-bottom: var(--border-width) solid var(--color-border);
  position: relative;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  margin-bottom: 10px;
  font-weight: 600;
}

.form-input {
  width: 100%;
  background: transparent;
  border: none;
  font-family: var(--font-body);
  font-size: 1.2rem;
  color: var(--color-text);
  outline: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s ease;
  padding-bottom: 5px;
}

.form-input:focus {
  border-bottom-color: var(--color-accent);
}

.form-input.error {
  border-bottom-color: #d32f2f; /* Red error line */
}

.error-msg {
  display: none;
  color: #d32f2f;
  font-size: 0.75rem;
  margin-top: 5px;
}

.form-input.error + .error-msg {
  display: block;
}

/* Checkboxes (Strict Square) */
.custom-checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
  cursor: pointer;
  user-select: none;
}

.custom-checkbox-wrapper input {
  display: none;
}

.custom-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.custom-checkbox-wrapper input:checked + .custom-checkbox {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
}

/* Small checkmark simulation */
.custom-checkbox-wrapper input:checked + .custom-checkbox::after {
  content: "";
  width: 10px;
  height: 10px;
  background-color: #fff;
}

.checkbox-text {
  font-size: 0.9rem;
}

.checkbox-text a {
  text-decoration: underline;
}

.form-btn {
  width: 100%;
  padding: 30px;
  font-size: 1.1rem;
  border: none;
  border-top: var(--border-width) solid var(--color-border);
  margin-top: auto; /* Push to bottom if space allows */
}

.form-btn:hover {
  background-color: var(--color-text); /* Darken on hover */
  color: #fff;
}

/* Success Overlay */
.success-message {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-bg);
  display: none; /* Hidden */
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 10;
}

.success-message.active {
  display: flex;
  animation: fadeIn 0.4s ease;
}

.success-icon {
  width: 64px;
  height: 64px;
  stroke: var(--color-accent);
  margin-bottom: 20px;
}

.success-title {
  font-size: 2rem;
  margin-bottom: 10px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* --- COOKIE POPUP --- */
.cookie-popup {
  position: fixed;
  bottom: -100%;
  left: 0;
  width: 100%;
  background-color: var(--color-text); /* Dark bg */
  color: #fff;
  z-index: 2000;
  transition: bottom 0.5s ease;
  border-top: 4px solid var(--color-accent);
}

.cookie-popup.show {
  bottom: 0;
}

.cookie-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cookie-text a {
  color: var(--color-accent);
  text-decoration: underline;
}

/* --- LEGAL PAGES TYPOGRAPHY --- */
/* Use this wrapper inside main > section for pages like privacy.html */
.legal-page {
  padding: 120px 0 60px;
}

.pages h1 {
  font-size: 3rem;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 20px;
}

.pages h2 {
  font-size: 1.8rem;
  margin-top: 40px;
  margin-bottom: 20px;
  color: var(--color-accent);
}

.pages p {
  margin-bottom: 15px;
  font-size: 1.05rem;
}

.pages ul {
  list-style: square;
  padding-left: 20px;
  margin-bottom: 20px;
}

.pages li {
  margin-bottom: 10px;
}

/* Mobile Adaptation */
@media (max-width: 992px) {
  .contact__container {
    grid-template-columns: 1fr;
    border-left: none;
    border-right: none;
  }

  .contact__info {
    border-right: none;
    border-bottom: var(--border-width) solid var(--color-border);
    padding: 40px 20px;
  }

  .form-group {
    padding: 20px;
  }

  .cookie-container {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
}

@media (min-width: 993px) {
  .section.blog,
  .section.faq {
    padding-top: 140px;
    padding-bottom: 140px;
  }

  /* 2. Hero Section */
  .hero__content {
    padding-top: 120px;
    padding-bottom: 120px;
  }

  /* 3. Methodology */
  /* Left column */
  .methodology__head {
    padding-top: 120px;
    padding-bottom: 120px;
  }
  /* Right column items */
  .step {
    padding-top: 60px;
    padding-bottom: 60px;
  }

  /* 4. Opportunities (The 3 columns) */
  .opps__item {
    padding-top: 100px;
    padding-bottom: 100px;
  }

  /* 5. Contact Section */
  .contact__info {
    padding-top: 100px;
    padding-bottom: 100px;
  }

  .form-group {
    padding-top: 35px;
    padding-bottom: 35px;
  }

  .form-btn {
    padding-top: 40px;
    padding-bottom: 40px;
  }
}
