/* Swiss Cyber Security Platform — site styles */
:root {
  --bg: #1b1b1b;
  --bg-alt: #232323;
  --text: #ffffff;
  --muted: #c9c9c9;
  --line: #3a3a3a;
  --header-bg: #ffffff;
  --header-text: #1b1b1b;
  --accent: #e2611b;          /* orange from the shield logo */
  --heading-font: "Cabin", "Helvetica Neue", Arial, sans-serif;
  --body-font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --max: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body-font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--heading-font); font-weight: 600; line-height: 1.25; margin: 0 0 .6em; }
p { margin: 0 0 1em; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.section { padding: 64px 0; }
.section.alt { background: var(--bg-alt); }

/* ---------- Header ---------- */
.site-header { background: var(--header-bg); color: var(--header-text); position: sticky; top: 0; z-index: 20; }
.header-inner {
  max-width: 1400px; margin: 0 auto; padding: 18px 32px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
}
.site-title {
  font-family: var(--heading-font); font-weight: 600; text-transform: uppercase;
  font-size: clamp(20px, 2.2vw, 30px); letter-spacing: .02em; text-align: center;
  text-decoration: none; color: var(--header-text); line-height: 1.15; max-width: 520px;
}
.site-title:hover { color: var(--header-text); }
/* Logo sits in the title's left margin, so the name stays exactly centred */
.site-title { position: relative; display: block; justify-self: center; max-width: none; margin: 0 52px; }
.site-logo { position: absolute; right: calc(100% + 12px); top: 50%; width: 40px; height: 40px; margin-top: -20px; }
.nav-link { white-space: nowrap; }
@media (max-width: 1320px) and (min-width: 961px) {
  .nav { gap: 20px; }
  .site-title { font-size: 22px; margin: 0 46px; }
  .site-title span { display: inline-block; max-width: 270px; }
  .site-logo { width: 34px; height: 34px; margin-top: -17px; }
}
.nav { display: flex; align-items: center; gap: 28px; }
.nav-right { justify-content: flex-end; }
.nav-link {
  font: 600 13px/1 var(--heading-font); letter-spacing: .08em; text-transform: uppercase;
  color: var(--header-text); text-decoration: none; background: none; border: 0; padding: 8px 0; cursor: pointer;
}
.nav-link[aria-current="page"] { border-bottom: 2px solid var(--header-text); }
.caret { display: inline-block; width: 6px; height: 6px; border-right: 1.5px solid; border-bottom: 1.5px solid; transform: translateY(-3px) rotate(45deg); margin-left: 4px; }
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: 100%; left: -16px; min-width: 230px; padding: 10px 0;
  background: var(--header-bg); box-shadow: 0 8px 24px rgba(0,0,0,.15); border-radius: 4px;
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s;
}
.dropdown:hover .dropdown-menu, .dropdown:focus-within .dropdown-menu, .dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: none; }
.dropdown-menu a { display: block; padding: 9px 18px; font-size: 15px; color: var(--header-text); text-decoration: none; }
.dropdown-menu a:hover, .dropdown-menu a[aria-current="page"] { background: #f2f2f2; color: var(--header-text); }

.mobile-menu { display: none; }

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-block; padding: 14px 40px; border: 2px solid currentColor; border-radius: 999px;
  font: 600 14px/1 var(--heading-font); letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none; color: var(--text); background: transparent; cursor: pointer; transition: .15s;
}
.btn:hover { background: var(--text); color: var(--bg); }

.form { display: grid; gap: 16px; text-align: left; max-width: 560px; margin: 24px auto 0; }
.form label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.form input[type=text], .form input[type=email], .form textarea {
  width: 100%; padding: 12px 14px; font: inherit; color: var(--text);
  background: transparent; border: 1px solid #6b6b6b; border-radius: 4px;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--text); }
.form .check { display: flex; align-items: center; gap: 10px; }
.form .btn { justify-self: center; margin-top: 8px; }
.form-fallback { margin-top: 16px; }

/* ---------- Home ---------- */
.hero { background: var(--header-bg); padding: 24px 24px 56px; }
.hero-logo { margin: 0 auto; width: min(546px, 80vw); position: relative; z-index: 30; transform-origin: 50% 50%; }
/* Home page: the hero shield shrinks into the header logo while scrolling (see default layout) */
.logo-anim .hero-logo { will-change: transform, opacity; }
.logo-anim .site-logo { opacity: 0; }
.display { font-family: var(--body-font); font-weight: 400; letter-spacing: .06em; font-size: clamp(28px, 4vw, 44px); }
.lead { font-size: 19px; color: var(--muted); }
.section-title { text-align: center; text-transform: uppercase; letter-spacing: .06em; font-size: 26px; margin-bottom: 40px; }
.wide-image { width: 100%; margin: 0 auto 28px; border-radius: 2px; }
.mission { text-align: center; font-size: 22px; letter-spacing: .06em; max-width: 1000px; margin: 0 auto; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.card { display: flex; flex-direction: column; align-items: flex-start; }
.card img { aspect-ratio: 1; object-fit: cover; width: 100%; margin-bottom: 22px; }
.card h3 { font-size: 22px; }
.card p { color: var(--muted); flex: 1; }
.social { display: inline-flex; color: var(--text); }

/* ---------- Pages ---------- */
.page-title { text-align: center; text-transform: uppercase; letter-spacing: .05em; font-size: clamp(26px, 3.2vw, 36px); margin-bottom: 28px; }
.page-title.left { text-align: left; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.feature { border-top: 1px solid var(--line); padding-top: 28px; }
.feature p { color: var(--muted); }
.feature h3 { margin-top: 24px; }
.contact-info p { color: var(--muted); }
.contact-info a { word-break: break-all; }
.bg-image { background-size: cover; background-position: center; min-height: 70vh; }
.bg-image .sub { font-size: 22px; font-weight: 400; }
.empty-state { color: var(--muted); text-align: center; border: 1px dashed var(--line); padding: 28px; border-radius: 4px; }
.calendar-frame { background: #fff; border-radius: 4px; overflow: hidden; }
.calendar-frame iframe { display: block; width: 100%; height: 640px; border: 0; }

/* ---------- Events ---------- */
.event-list { list-style: none; padding: 0; margin: 32px 0 0; }
.event-list li { display: grid; grid-template-columns: 110px 1fr; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.event-list time { color: var(--muted); font-size: 14px; text-transform: uppercase; }
.event-list .day { display: block; font: 600 40px/1 var(--heading-font); color: var(--text); }

/* ---------- Blog ---------- */
.blog-grid { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 48px; }
.categories { border-left: 1px solid var(--line); padding-left: 24px; }
.categories h2 { font-size: 20px; letter-spacing: .06em; }
.categories ul { list-style: none; padding: 0; margin: 0; }
.categories li { margin: 10px 0; font-size: 15px; }
.categories a { text-decoration: none; }
.categories a.active { font-weight: 700; }
.filter-note { color: var(--muted); font-size: 15px; margin: -12px 0 8px; }
.post-list { list-style: none; padding: 0; margin: 0; }
.post-item { display: grid; grid-template-columns: 160px 1fr; gap: 28px; padding: 32px 0; border-bottom: 1px solid var(--line); }
.post-item:last-child { border-bottom: 0; }
.post-thumb { background: #fff; border-radius: 4px; padding: 12px; display: flex; align-items: center; justify-content: center; height: 130px; align-self: start; }
.post-thumb img { width: 100%; max-height: 106px; object-fit: contain; }
.post-summary h3 { font-size: 22px; letter-spacing: .05em; font-weight: 400; margin: 6px 0 12px; }
.post-summary h3 a { text-decoration: none; }
.post-summary p { color: var(--muted); font-size: 15px; }
.post-meta { font-size: 13px; color: var(--muted); margin: 0; }
.post-meta .sep { margin: 0 8px; }
.read-more { font-size: 15px; text-decoration: none; border-bottom: 1px solid; }
.post-list.compact { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.post-list.compact .post-item { grid-template-columns: 1fr; border: 0; padding: 0; gap: 12px; align-content: start; }
.post-list.compact .post-thumb { background: #fff; border-radius: 4px; padding: 16px; display: flex; align-items: center; justify-content: center; height: 150px; }
.post-list.compact .post-thumb img { max-height: 118px; }
.post-list.compact h3 { font-size: 18px; }
.back-link { display: inline-block; margin-bottom: 20px; font-size: 14px; text-decoration: none; color: var(--muted); }
.post-title { font-size: clamp(26px, 3vw, 34px); font-weight: 400; letter-spacing: .05em; }
.post-logo { max-width: 320px; max-height: 220px; object-fit: contain; margin: 28px 0; background: #fff; padding: 16px; border-radius: 4px; }
.post-body { color: #e4e4e4; }
.post-body h2 { font-size: 24px; margin-top: 1.4em; }
.post-body a { color: var(--text); text-decoration-color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer { text-align: center; padding: 48px 24px 56px; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); }
.footer-links { display: flex; justify-content: center; gap: 20px; }
.footer-links a { color: var(--text); text-decoration: none; font: 600 13px var(--heading-font); letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .post-list.compact { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .header-inner { grid-template-columns: 1fr auto; padding: 14px 16px; }
  .nav { display: none; }
  .site-title { display: flex; align-items: center; gap: 10px; margin: 0; text-align: left; font-size: 18px; justify-self: start; }
  .site-logo { position: static; width: 32px; height: 32px; margin: 0; flex: none; }
  .mobile-menu { display: block; position: relative; }
  .mobile-menu summary { list-style: none; cursor: pointer; width: 40px; height: 40px; display: grid; align-content: center; gap: 5px; padding: 0 8px; }
  .mobile-menu summary::-webkit-details-marker { display: none; }
  .mobile-menu summary span { display: block; height: 2px; background: var(--header-text); }
  .mobile-panel { position: absolute; right: 0; top: 48px; width: min(300px, calc(100vw - 32px)); background: var(--header-bg); box-shadow: 0 10px 30px rgba(0,0,0,.25); border-radius: 4px; padding: 12px 0; }
  .mobile-panel a { display: block; padding: 10px 20px; text-decoration: none; color: var(--header-text); font-size: 16px; }
  .mobile-panel .mobile-sub { padding-left: 34px; font-size: 15px; }
  .mobile-group { margin: 8px 0 0; padding: 6px 20px; font: 600 12px var(--heading-font); letter-spacing: .1em; text-transform: uppercase; color: #777; }
  .cards, .two-col, .blog-grid { grid-template-columns: 1fr; }
  .categories { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 24px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .section { padding: 44px 0; }
  .post-item { grid-template-columns: 1fr; gap: 14px; }
  .post-thumb { max-width: 220px; }
  .post-list.compact { grid-template-columns: 1fr; }
  .mission { font-size: 18px; }
  .event-list li { grid-template-columns: 1fr; gap: 6px; }
}
