/* =====================================================================
   BASE.CSS
   The foundation every page uses:
     1. Design tokens (colours, fonts, spacing)  -> change the brand here
     2. Reset and typography
     3. Page container and section spacing
     4. Section headings (eyebrow, title, intro)
     5. Buttons
     6. Photo slots (pictures you add later)
     7. Scroll-in animation
     8. Accessibility helpers
   ===================================================================== */


/* ---------------------------------------------------------------------
   1. DESIGN TOKENS
   --------------------------------------------------------------------- */
:root {
  /* Brand colours */
  --navy: #192A3D;
  --navy-deep: #0B1626;
  --navy-mid: #15304D;
  --blue: #1559ED;
  --blue-dark: #0F46C2;
  --orange: #E8801A;
  --orange-light: #F39A3F;

  /* Neutrals */
  --text: #33475B;
  --text-soft: #3A4F66;
  --muted: #8C99A6;
  --line: #E1E8ED;
  --cloud: #F2F5F7;
  --white: #FFFFFF;

  /* Siemens page palette */
  --siemens-navy: #000028;
  --siemens-teal: #009999;
  --siemens-mint: #00E6DC;

  /* Fonts */
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Fira Sans', 'Inter', sans-serif;

  /* Layout */
  --container: 1200px;
  --gutter: 32px;                     /* left/right page padding */
  --section-space: 104px;             /* top/bottom padding of sections */
  --radius: 20px;
  --radius-sm: 12px;
  --header-h: 88px;                   /* updated by js/main.js */

  /* Shadows and motion */
  --shadow-sm: 0 10px 30px rgba(25, 42, 61, .08);
  --shadow-md: 0 18px 44px rgba(25, 42, 61, .14);
  --shadow-lg: 0 28px 60px rgba(25, 42, 61, .2);
  --ease: cubic-bezier(.22, .61, .36, 1);
}


/* ---------------------------------------------------------------------
   2. RESET AND TYPOGRAPHY
   --------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-head);
  color: var(--navy);
  letter-spacing: -.005em;
  line-height: 1.2;
}
h1, h2 { font-weight: 700; }
p, ul, figure, blockquote { margin: 0; }
img, video { max-width: 100%; display: block; }
a { color: var(--blue); }
button { font: inherit; }
.icon { flex: none; }

body.no-scroll { overflow: hidden; }
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }


/* ---------------------------------------------------------------------
   3. CONTAINER AND SECTIONS
   --------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section { padding: var(--section-space) 0; position: relative; }
.section--cloud { background: var(--cloud); }
.section--dark  { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%); color: #C9D4E0; }
.section--dark h2, .section--dark h3 { color: var(--white); }

.stack { display: flex; flex-direction: column; gap: 48px; }   /* heading + content */


/* ---------------------------------------------------------------------
   4. SECTION HEADINGS
   <div class="section-head">
     <span class="eyebrow">Small label</span>
     <h2>Big title</h2>
     <p>Short intro</p>
   </div>
   --------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font: 600 13px/1.4 var(--font-body);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue);
}
.eyebrow--orange { color: var(--orange); }
.eyebrow--line::before { content: ""; width: 36px; height: 2px; background: currentColor; }

.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}
.section-head--left { align-items: flex-start; text-align: left; }
.section-head h2 { font-size: 46px; line-height: 1.15; }
.section-head p { font-size: 19px; line-height: 1.65; color: var(--text); max-width: 680px; }
.section--dark .section-head p { color: #C9D4E0; }


/* ---------------------------------------------------------------------
   5. BUTTONS
   btn--primary  blue      btn--outline  dark outline
   btn--orange   orange    btn--ghost    white outline (dark backgrounds)
   btn--white    white
   --------------------------------------------------------------------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; }
.btn-row--center { justify-content: center; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 26px;
  border: 2px solid transparent;
  border-radius: 10px;
  font: 600 15px/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn .icon { transition: transform .2s; }
.btn:hover .icon { transform: translateX(3px); }

.btn--primary { background: var(--blue); color: var(--white); }
.btn--primary:hover { background: var(--blue-dark); }

.btn--outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--outline:hover { background: var(--line); }

.btn--orange { background: var(--orange); color: var(--navy); }
.btn--orange:hover { background: var(--orange-light); }

.btn--ghost { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .7); }
.btn--ghost:hover { background: rgba(255, 255, 255, .14); border-color: var(--white); }

.btn--white { background: var(--white); color: var(--navy); }
.btn--white:hover { background: var(--line); }

.btn[disabled] { opacity: .6; cursor: wait; }


/* ---------------------------------------------------------------------
   6. PHOTO SLOTS
   Any <img data-slot> is a place for a photo you add later.
   - Photo found  -> parent gets .has-photo and the photo fades in.
   - Photo missing-> parent gets .no-photo and shows the placeholder.
   (handled in js/main.js, block "Photo slots")
   --------------------------------------------------------------------- */
img[data-slot] {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .5s, transform .8s var(--ease);
}
.has-photo > img[data-slot] { opacity: 1; }
.no-photo > img[data-slot] { display: none; }

/* Placeholder look for empty slots: dark blue with a faint grid */
.photo-placeholder,
.no-photo {
  background-color: var(--navy-mid);
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 36px 36px;
}


/* ---------------------------------------------------------------------
   7. SCROLL-IN ANIMATION
   Add class="reveal" to anything that should fade up into view.
   Cards in the same row appear one after another (js/main.js sets --delay).
   --------------------------------------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(32px); }
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity .8s var(--ease) var(--delay, 0ms), transform .8s var(--ease) var(--delay, 0ms);
}


/* ---------------------------------------------------------------------
   8. ACCESSIBILITY HELPERS
   --------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 300;
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Visitors who switch off animations on their device */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}


/* ---------------------------------------------------------------------
   RESPONSIVE: shared sizes for tablets and phones
   --------------------------------------------------------------------- */
@media (max-width: 1024px) {
  :root { --section-space: 88px; }
  .section-head h2 { font-size: 40px; }
}
@media (max-width: 820px) {
  :root { --section-space: 72px; }
  .section-head h2 { font-size: clamp(28px, 6vw, 36px); }
  .section-head p { font-size: 17px; }
  .stack { gap: 36px; }
}
@media (max-width: 600px) {
  :root { --gutter: 20px; --section-space: 60px; }
  .btn { min-height: 50px; white-space: normal; text-align: center; }
}
@media (max-width: 380px) {
  :root { --gutter: 16px; }
}
