/* =========================================================
   Swiss Cure Pharmaceutical — design tokens
   ========================================================= */
:root {
  --red:        #C8102E;
  --red-dark:   #9E0C24;
  --red-soft:   #FDF1F3;
  --black:      #0C0D0F;
  --ink:        #16181C;
  --ink-2:      #3D434D;
  --muted:      #6B7280;
  --white:      #FFFFFF;
  --paper:      #FAFAFA;
  --line:       #E5E7EB;
  --line-dark:  #24262B;

  --radius:     14px;
  --radius-sm:  10px;
  --max:        1180px;

  --shadow-sm:  0 1px 2px rgba(12,13,15,.05);
  --shadow:     0 8px 30px rgba(12,13,15,.08);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
  border-radius: 4px;
}
/* red outline would vanish against the red bar and dark sections */
.nav :focus-visible,
.section--dark :focus-visible,
.footer :focus-visible { outline-color: #fff; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--red); color: #fff; padding: 12px 20px; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ===== Typography ===== */
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.125rem; letter-spacing: -0.01em; }
h4 { font-size: .875rem; letter-spacing: .04em; text-transform: uppercase; }

.eyebrow {
  display: inline-block;
  font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--red);
  margin-bottom: 18px;
  position: relative; padding-left: 30px;
}
.eyebrow::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 20px; height: 2px; background: var(--red);
}
.eyebrow--dark { color: var(--red); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-weight: 600; font-size: .9375rem;
  padding: 13px 26px; border-radius: var(--radius-sm); border: 1px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-dark); transform: translateY(-1px); }
/* Ghost sits on light backgrounds (hero); --onDark flips it for the dark sections */
.btn--ghost { background: transparent; color: var(--ink); border-color: #CFD3DA; }
.btn--ghost:hover { border-color: var(--ink); background: rgba(12,13,15,.04); }
.btn--ghost.btn--onDark { color: var(--white); border-color: rgba(255,255,255,.28); }
.btn--ghost.btn--onDark:hover { border-color: var(--white); background: rgba(255,255,255,.06); }
.btn--block { width: 100%; }

/* ===== Navbar =====
   Solid red bar, white type. Deepens slightly on scroll so it still
   reads as a layer above the page rather than a flat strip.
   ------------------------------------------------------------------ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--red);
  transition: background .28s ease, box-shadow .28s ease;
}
.nav.is-scrolled {
  background: var(--red-dark);
  box-shadow: 0 2px 24px rgba(12,13,15,.16);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }

.logo { display: inline-flex; align-items: center; gap: 10px; color: #fff; }
.logo__mark { color: #fff; display: flex; }
.logo__text { display: flex; flex-direction: column; line-height: 1.05; }
.logo__text strong { font-size: .95rem; font-weight: 800; letter-spacing: .08em; }
.logo__text em {
  font-style: normal; font-size: .6rem; letter-spacing: .18em;
  text-transform: uppercase; color: rgba(255,255,255,.62);
}

.nav__links { display: flex; align-items: center; gap: 32px; }
.nav__links a {
  font-size: .9rem; font-weight: 500; color: rgba(255,255,255,.86);
  transition: color .2s ease; position: relative; padding: 4px 0;
}
.nav__links a:hover { color: #fff; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: #fff; transition: width .22s ease;
}
.nav__links a:hover::after { width: 100%; }

.nav__actions { display: flex; align-items: center; gap: 14px; }

.langswitch {
  display: inline-flex; border: 1px solid rgba(255,255,255,.4);
  border-radius: 8px; overflow: hidden;
}
.langswitch__btn {
  font: inherit; font-size: .75rem; font-weight: 600; letter-spacing: .05em;
  padding: 7px 12px; border: 0; cursor: pointer;
  background: transparent; color: rgba(255,255,255,.8);
  transition: background .2s ease, color .2s ease;
  display: inline-flex; align-items: center;
}
.langswitch__btn:hover { background: rgba(255,255,255,.14); color: #fff; }
/* inverted: white chip on the red bar */
.langswitch__btn.is-active { background: #fff; color: var(--red); }

.nav__toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 6px;
}
.nav__toggle span { width: 22px; height: 2px; background: #fff; border-radius: 2px; }

/* ===== Hero =====
   Light page with a solid red panel carrying the brand mark.
   ------------------------------------------------------------------ */
.hero { background: var(--white); color: var(--ink); position: relative; }
.hero__inner {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center;
  /* extra top padding clears the fixed header (76px) */
  padding: calc(76px + clamp(48px, 7vw, 88px)) 24px clamp(64px, 9vw, 104px);
}
.hero__title {
  font-size: clamp(2.25rem, 5.2vw, 3.75rem);
  font-weight: 800; letter-spacing: -0.035em; margin-bottom: 22px;
  color: var(--ink);
}
.hero__text {
  font-size: 1.0625rem; color: var(--ink-2);
  max-width: 52ch; margin-bottom: 34px;
}
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Red panel */
.hero__visual {
  position: relative; display: grid; place-items: center;
  min-height: clamp(320px, 38vw, 440px);
  background: var(--red);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(200,16,46,.18);
}
/* soft highlight so the panel isn't a flat slab */
.hero__glow {
  position: absolute; top: -20%; right: -15%;
  width: 70%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.16), transparent 70%);
}
/* oversized ghost mark bleeding off the bottom-left corner */
.hero__visual::after {
  content: ""; position: absolute; left: -14%; bottom: -30%;
  width: 55%; aspect-ratio: 1;
  background:
    linear-gradient(to right, transparent 38%, rgba(255,255,255,.07) 38% 62%, transparent 62%),
    linear-gradient(to bottom, transparent 38%, rgba(255,255,255,.07) 38% 62%, transparent 62%);
}
.hero__cross { position: relative; width: 38%; max-width: 170px; color: #fff; }

/* ===== Stats ===== */
.stats { background: var(--paper); border-bottom: 1px solid var(--line); }
.stats__inner {
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 40px 24px; gap: 24px;
}
.stat { text-align: center; }
.stat strong {
  display: block; font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 800; letter-spacing: -0.03em; color: var(--red);
}
.stat span { font-size: .875rem; color: var(--muted); }

/* ===== Sections ===== */
.section { padding: clamp(64px, 8vw, 104px) 0; }
/* Keep anchor targets clear of the fixed header */
section[id], main[id] { scroll-margin-top: 88px; }
.section--alt { background: var(--paper); border-block: 1px solid var(--line); }
.section--dark { background: var(--black); color: #fff; }

.section__head { max-width: 620px; margin-bottom: 52px; }
.section__head h2 { margin-bottom: 14px; }
.section__head p { color: var(--muted); font-size: 1.0625rem; }
.section__head--light p { color: rgba(255,255,255,.62); }

/* ===== Grids & cards ===== */
.grid { display: grid; gap: 20px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
  position: relative;
}
.card::before {
  content: ""; position: absolute; left: 28px; top: 0; width: 32px; height: 3px;
  background: var(--red); border-radius: 0 0 3px 3px;
  transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.card:hover { border-color: #D6D9DE; transform: translateY(-3px); box-shadow: var(--shadow); }
.card:hover::before { transform: scaleX(1); }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); font-size: .9375rem; }

/* ===== Products ===== */
.products {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.product {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.product:hover { border-color: #D6D9DE; transform: translateY(-3px); box-shadow: var(--shadow); }
.product__media { aspect-ratio: 1 / 1; overflow: hidden; background: var(--paper); }
.product__media img { width: 100%; height: 100%; object-fit: cover; }
.product__body { padding: 18px 20px 22px; }
.product__cat {
  display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--red); margin-bottom: 8px;
}
.product__body h3 { margin-bottom: 4px; font-size: 1.05rem; }
.product__body p { color: var(--muted); font-size: .875rem; }

/* ===== Facilities ===== */
.facilities {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
}
.facility {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 16 / 10; margin: 0; background: var(--black);
}
/* all tiles equal now — the wide span is neutralised */
.facility--wide { grid-column: span 1; }

/* ===== Reveal-on-scroll animation =====
   The hidden starting state is gated behind .reveal-ready, which JS adds
   to <html> only when it can drive the animation. With no JS the elements
   are never hidden, so content is always visible as a fallback.
   ------------------------------------------------------------------ */
.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.22,.61,.36,1);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}
.reveal-ready .reveal.is-visible {
  opacity: 1;
  transform: none;
}
/* Stagger: each tile arrives a beat after the previous one */
.facilities .facility:nth-child(1) { --reveal-delay: 0s;    }
.facilities .facility:nth-child(2) { --reveal-delay: .1s;   }
.facilities .facility:nth-child(3) { --reveal-delay: .2s;   }
.facilities .facility:nth-child(4) { --reveal-delay: .3s;   }
.products .product:nth-child(1) { --reveal-delay: 0s;  }
.products .product:nth-child(2) { --reveal-delay: .08s; }
.products .product:nth-child(3) { --reveal-delay: .16s; }
.products .product:nth-child(4) { --reveal-delay: .24s; }

/* If the user prefers less motion, never hide anything */
@media (prefers-reduced-motion: reduce) {
  .reveal-ready .reveal { opacity: 1 !important; transform: none !important; transition: none; }
}
.facility img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
.facility:hover img { transform: scale(1.04); }
.facility figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 40px 20px 16px; color: #fff; font-size: .9rem; font-weight: 600;
  background: linear-gradient(to top, rgba(10,11,13,.82), transparent);
}

.qcard { padding: 26px 24px; border-left: 2px solid var(--line); }
.qcard__tag {
  display: block; font-size: .75rem; font-weight: 700;
  color: var(--red); letter-spacing: .1em; margin-bottom: 12px;
}
.qcard h3 { margin-bottom: 8px; font-size: 1rem; }
.qcard p { color: var(--muted); font-size: .9rem; }

.pcard {
  background: #141519; border: 1px solid var(--line-dark);
  border-radius: var(--radius); padding: 28px;
  transition: border-color .2s ease, background .2s ease;
}
.pcard:hover { border-color: var(--red); background: #17181D; }
.pcard h3 { margin-bottom: 10px; }
.pcard p { color: rgba(255,255,255,.6); font-size: .9375rem; }

/* ===== About ===== */
.about__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: start; }
.about__content h2 { margin-bottom: 20px; }
.about__content p { color: var(--ink-2); margin-bottom: 18px; }

.checklist { list-style: none; margin-top: 26px; display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 30px; font-size: .9375rem; color: var(--ink-2); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--red-soft);
  box-shadow: inset 0 0 0 2px var(--red);
}

.about__panel {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 32px;
}
.timeline { display: grid; gap: 0; }
.timeline__item {
  display: grid; grid-template-columns: 62px 1fr; gap: 18px;
  padding: 16px 0 16px 0; border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.timeline__item:last-child { border-bottom: 0; padding-bottom: 0; }
.timeline__item:first-child { padding-top: 0; }
.timeline__item strong { color: var(--red); font-size: .9375rem; font-weight: 700; }
.timeline__item span { font-size: .9375rem; color: var(--ink-2); }

/* ===== Contact ===== */
.contact__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.contact__info h2 { margin-bottom: 14px; }
.contact__info > p { color: var(--muted); margin-bottom: 34px; }

.contact__list { display: grid; gap: 22px; }
.contact__list dt {
  font-size: .75rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 5px;
}
.contact__list dd { font-size: .9375rem; color: var(--ink); }
.contact__list a:hover { color: var(--red); }

.contact__form {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 32px;
  display: grid; gap: 18px;
}
.field { display: grid; gap: 7px; }
.field label { font-size: .8125rem; font-weight: 600; color: var(--ink-2); }
.field input, .field textarea {
  font: inherit; font-size: .9375rem;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--white); color: var(--ink); width: 100%;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(200,16,46,.12);
}
.field textarea { resize: vertical; min-height: 110px; }
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--red); }

.form__note { font-size: .875rem; min-height: 20px; }
.form__note.is-ok { color: #15803D; }
.form__note.is-error { color: var(--red); }

/* Honeypot: an off-screen decoy field. Real users never see or fill it;
   bots that auto-fill every input trip it, and Formspree drops the message.
   Kept in a class (not inline style) so the strict CSP stays intact. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Success card — replaces the form after a message is sent. Matches the form
   card so it sits cleanly in the same grid cell once the form is hidden. */

/* Our explicit `display` values below would override the `hidden` attribute
   (the UA's [hidden]{display:none} loses to a later stylesheet rule), leaving
   the card permanently visible. Restore hidden's meaning explicitly. */
.contact__form[hidden],
.form__success[hidden] { display: none; }

.form__success {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 52px 32px;
  display: grid; gap: 14px; justify-items: center; align-content: center;
  text-align: center;
}
.form__success:focus { outline: none; }
.form__success-mark {
  display: grid; place-items: center;
  width: 62px; height: 62px; border-radius: 50%;
  background: #15803D; color: #fff; margin-bottom: 6px;
}
.form__success h3 { font-size: 1.25rem; color: var(--ink); }
.form__success p { color: var(--muted); max-width: 36ch; }

/* ===== Footer ===== */
.footer { background: var(--black); color: #fff; padding-top: 64px; }
.footer__inner {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; padding-bottom: 48px;
}
.footer__tag {
  color: rgba(255,255,255,.5); font-size: .9rem; max-width: 34ch;
}

/* ===== Full brand lockup (footer) ===== */
.brandmark {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 48px 24px 8px;
  border-top: 1px solid var(--line-dark);
  margin-top: 12px;
}
.brandmark__mark { display: flex; flex-shrink: 0; }
.brandmark__words { display: flex; flex-direction: column; line-height: 1; }
.brandmark__name {
  font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; color: #fff;
  display: inline-flex; align-items: flex-start;
}
.brandmark__plus {
  color: var(--red); font-size: .9rem; font-weight: 800;
  line-height: 1; margin: 0 1px; transform: translateY(2px);
}
.brandmark__sub {
  font-size: .82rem; font-weight: 500; letter-spacing: .34em;
  text-transform: uppercase; color: rgba(255,255,255,.55); margin-top: 6px;
}
.footer__col { display: flex; flex-direction: column; gap: 12px; }
.footer__col h4 { color: rgba(255,255,255,.45); margin-bottom: 4px; }
.footer__col a { font-size: .9rem; color: rgba(255,255,255,.72); transition: color .18s ease; }
.footer__col a:hover { color: var(--red); }

.footer__bottom { border-top: 1px solid var(--line-dark); padding: 22px 0; }
.footer__bottom .container {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: .8125rem; color: rgba(255,255,255,.42);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
  /* keep the red panel — just make it a shorter band under the text */
  .hero__visual { min-height: 200px; order: 2; }
  .hero__cross { width: 88px; }
  .about__inner, .contact__inner { grid-template-columns: 1fr; gap: 40px; }
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .products { grid-template-columns: repeat(2, 1fr); }
  .facilities { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav__toggle { display: flex; }
  .nav__links {
    position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--red);
    box-shadow: 0 12px 30px rgba(12,13,15,.18);
    padding: 8px 24px 20px; display: none;
  }
  .nav.is-scrolled .nav__links { background: var(--red-dark); }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.18); }
  .nav__links a:last-child { border-bottom: 0; }
  .nav__links a::after { display: none; }

  .stats__inner { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .products { grid-template-columns: repeat(2, 1fr); }
  .facilities { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; gap: 32px; }
  .hero__actions .btn { flex: 1 1 auto; }
  .qcard { border-left: 0; border-top: 2px solid var(--line); padding-left: 0; }
}

/* ===== Motion preference ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
