/* Theme variables */
:root{
  /* Theme variables #91C8E4*/
  --bg: #FFFFFF;
  --fg: #161652;
  --nav-fg: var(--fg);
  --muted: #5b6479;
  --surface-1: #749BC2;
  --surface-2: #e7ebf5;

  /* Accent + CTA colors */
  --accent: #30e5ee;
  --accent-contrast: #ffffff;
  --cta-bg: #161652;
  --cta-fg: #ffffff;

  /* Section-scoped variables (light-blue tints) */
  --hero-bg: #FBFBFB;         --hero-fg: var(--fg);
  --services-bg: #FBFBFB;     --services-fg: var(--fg);
  --references-bg: #FBFBFB;   --references-fg: var(--fg);
  --team-bg: #FBFBFB;         --team-fg: var(--fg);
  --blog-bg: #FBFBFB;         --blog-fg: var(--fg);
  --contact-bg: #FBFBFB;      --contact-fg: var(--fg);

  --radius: 16px;
  --shadow: 0 10px 30px rgba(11,18,33,0.08);
  --container: 1100px;

  /* Persistent header height */
  --header-height: 64px;
}

*{ box-sizing: border-box; }
html, body{ margin:0; padding:0; }

/* Ensure the area outside content/footer is white */
html{ background: #ffffff; }
body{
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;

  /* Make room for the fixed header so content isn't hidden underneath */
  padding-top: var(--header-height);
}

img{ max-width: 100%; display: block; }
.responsive{ width: 100%; height: auto; }

.container{
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.section{ padding: 4rem 0; }
/* Help anchor jumps (#services etc.) account for fixed header */
.section{ scroll-margin-top: calc(var(--header-height) + 12px); }

.section.hero{ background: var(--hero-bg); color: var(--hero-fg); padding-top: 6rem; }
.section.services{ background: var(--services-bg); color: var(--services-fg); }
.section.references{ background: var(--references-bg); color: var(--references-fg); }
.section.team{ background: var(--team-bg); color: var(--team-fg); }
.section.blog{ background: var(--blog-bg); color: var(--blog-fg); }
.section.contact{ background: var(--contact-bg); color: var(--contact-fg); }

/* -------------------------
   Typography & wrapping
--------------------------*/
h1,h2,h3{ line-height:1.2; margin: 0 0 .5rem 0; }
h1{ font-size: clamp(2rem, 4vw + 1rem, 3rem); }
h2{ font-size: clamp(1.5rem, 2vw + .5rem, 2rem); margin-bottom: 1rem; }
h3{ font-size: 1.125rem; margin-bottom: .25rem; }
.lead{ font-size: 1.125rem; color: var(--muted); }

/* Natural, width-dependent wrapping everywhere */
h1,h2,h3,p,.lead{
  white-space: normal;
  overflow-wrap: anywhere;             /* allow breaking long tokens if needed */
  -webkit-hypens: none;
  hyphens: none;
  word-break: normal;
  overflow-wrap: normal;                /* language-aware hyphenation where supported */
}

/* Remove hard <br> in flowing text so breaks are width-dependent.
   If you *need* a manual <br> somewhere, wrap the element with .allow-br */
h1 br, h2 br, h3 br, p br, .lead br{ display:none; }
.allow-br br{ display:inline; }

.muted{ color: var(--muted); }
/*
.grid-2{
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 2rem;
  align-items: center;
}
*/
.grid-2 { grid-template-columns: 1fr; }

.stack.gap > * + *{ margin-top: 1rem; }

.cards{
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 1rem;
}
.card{
  background: var(--surface-1);
  border: 1px solid var(--surface-2);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.logo-grid{
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.5rem;
  align-items: center;
  opacity: .8;
}
.logo-grid img{ filter: grayscale(100%); mix-blend-mode: multiply; }

.team-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.member{
  background: var(--surface-1);
  border: 1px solid var(--surface-2);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.avatar{ border-radius: 50%; aspect-ratio: 1/1; object-fit: cover; }

.posts{
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 1rem;
}
.post{
  background: var(--surface-1);
  border: 1px solid var(--surface-2);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.link{ text-decoration: none; font-weight: 600; }
.link:hover{ text-decoration: underline; }

/* Header — persistent (fixed) */
.site-header{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.9);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--surface-2);
}
.header-inner{
  display:flex; align-items:center; justify-content: space-between;
  min-height: var(--header-height);
}
.brand{ display:flex; align-items:center; gap:.5rem; text-decoration:none; color:inherit; font-weight:700; }
.brand-logo{ height: 36px; width: auto; display:block; }
.brand-name{ letter-spacing:.2px; }

/* Nav (no underline version) */
.nav ul{
  list-style:none;
  display:flex;
  gap:1rem;
  margin:0;
  padding:0;
}
.nav a{
  text-decoration:none;
  color: var(--nav-fg);
  padding:.5rem .75rem;
  border-radius: 999px;
}
.nav a:hover{ background: var(--surface-1); }

/* Hero logo centered above text with ~3 lines spacing before the headline */
.hero-brand{
  display:flex;
  justify-content:center;
  align-items:center;

  /* Fallback spacing (approx 3 text lines) */
  margin-bottom: 3rem;

  /* Prefer exact “3 lines” where supported: 1lh = current line height */
  line-height: 1.6;                /* match body text line-height */
  margin-bottom: calc(3 * 1lh);    /* overrides 3rem on modern browsers */
}
.hero-logo{
  width: clamp(140px, 25vw, 600px);
  height: auto;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.08)); /* optional, looks nice on very light bg */
}


/* CTA buttons */
.cta{
  background: var(--cta-bg);
  color: var(--cta-fg);
  border: none;
  padding: .6rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  display: inline-block;
  box-shadow: var(--shadow);
}
.cta.big{ padding: .9rem 1.25rem; font-size: 1.05rem; }
.cta:hover{ filter: brightness(1.05); }

.header-actions{ display:flex; align-items:center; gap:.75rem; }
#lang{ padding:.4rem .5rem; border-radius: 10px; border:1px solid var(--surface-2); background:#fff; color:inherit; }

.burger{
  display:none;
  width:42px; height:36px; border-radius:10px; border:1px solid var(--surface-2);
  background: #fff;
  align-items:center; justify-content:center; gap:4px; padding:6px;
}
.burger span{ display:block; width:24px; height:2px; background: currentColor; }

/* Footer */
.site-footer{ padding:2rem 0; border-top:1px solid var(--surface-2); background: #ffffff; }

/* Forms */
.field{ display:flex; flex-direction:column; gap:.4rem; margin-bottom: .8rem; }
input, textarea{
  font: inherit; color: inherit;
  background: #ffffff;
  border:1px solid var(--surface-2);
  border-radius: 12px;
  padding:.7rem .8rem;
}
input:focus, textarea:focus{ outline: 2px solid color-mix(in oklab, var(--accent), transparent 60%); outline-offset: 1px; }

.form-status{ margin-left: .75rem; color: var(--muted); }
.form-actions{ display:flex; align-items:center; gap:.75rem; }

/* Utilities */
.grid-2 .stack + .map{ align-self: start; }
.actions{ display:flex; gap:.75rem; align-items:center; }
.visually-hidden{ position:absolute; width:1px; height:1px; margin:-1px; padding:0; border:0; overflow:hidden; clip:rect(0 0 0 0); clip-path: inset(50%); }
.skip-link{ position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden; }
.skip-link:focus{ position: fixed; left: .75rem; top:.75rem; width:auto; height:auto; padding:.5rem .75rem; background: var(--accent); color: var(--accent-contrast); z-index: 1001; border-radius: 8px; }

/* Responsive */
@media (max-width: 1024px){
  .cards{ grid-template-columns: repeat(2,1fr); }
  .team-grid{ grid-template-columns: repeat(2,1fr); }
  .posts{ grid-template-columns: repeat(2,1fr); }
  .grid-2{ grid-template-columns: 1fr; }
}
@media (max-width: 860px){
  .burger{ display:inline-flex; }
  /* Mobile menu drops just below the fixed header */
  .nav{
    position: absolute;
    top: var(--header-height);
    right:0; left:0;
    background: #ffffff;
    border-bottom: 1px solid var(--surface-2);
    display:none;
  }
  .nav.open{ display:block; }
  .nav ul{ flex-direction: column; gap:.25rem; padding: .75rem; }
  .nav a{ display:block; }
  .nav a.cta{ align-self:flex-start; }
  .header-inner{ position: relative; }
  .logo-grid{ grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 520px){
  .cards{ grid-template-columns: 1fr; }
  .team-grid{ grid-template-columns: 1fr; }
  .posts{ grid-template-columns: 1fr; }
}

/* Center hero main text, lead, and CTA */
.section.hero h1{
  text-align: center;
}

.section.hero .lead{
  text-align: center;
  max-width: 62ch;
  margin: .75rem auto 0;
}

/* Center the button row if using a flex .actions container */
.section.hero .actions{
  display: flex;           /* in case it wasn't already */
  justify-content: center;
}

/* Safety net if the CTA is a single link without .actions */
.section.hero .cta{
  display: inline-block;
  margin-inline: auto;
}

/* If hero uses two columns, center everything in the left (text) column */
.section.hero .grid-2 > :first-child{
  text-align: center;
}
