:root {
  --blue: #0058ab;      /* Sogeti blue (from the official logo) */
  --red: #f53b53;       /* Sogeti red dot */
  --navy: #0e2841;
  --sky: #1f7fd6;       /* Geti background blue */
  --ice: #eaf3fc;
  --ink: #12233a;
  --key: #ffffff;
  --key-hover: #f1f6fc;
  --radius: 22px;
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; overflow-x: hidden; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(31, 127, 214, 0.22), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(245, 59, 83, 0.10), transparent 60%),
    var(--ice);
  position: relative;
}

/* Faint tiled Sogeti logos: "plastered" without hurting readability */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("assets/sogeti-logo.svg");
  background-size: 120px 63px;
  background-repeat: space;
  opacity: 0.035;
  transform: rotate(-12deg) scale(1.4);
  pointer-events: none;
  z-index: 0;
}

.topbar, .page, .footer { position: relative; z-index: 1; }

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(18px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(0, 88, 171, 0.12);
}
.topbar-logo { height: 46px; width: auto; display: block; }
.topbar-tag { font-size: 14px; color: #4a5a70; text-align: right; }

/* ---------- hero ---------- */
.page {
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(18px, 3vh, 36px) clamp(16px, 4vw, 40px) 20px;
}

.hero { text-align: center; margin-bottom: clamp(18px, 3vh, 32px); }
.kicker {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
}
.hero h1 {
  margin: 0;
  font-size: clamp(28px, 4.6vw, 50px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.hero h1::after {
  content: "";
  display: inline-block;
  width: 0.22em;
  height: 0.22em;
  margin-left: 0.08em;
  border-radius: 50%;
  background: var(--red);
  vertical-align: 0.05em;
}
.lead { margin: 12px 0 0; font-size: clamp(16px, 2vw, 19px); color: #3d4f66; }

/* ---------- stage ---------- */
.stage {
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(300px, 380px);
  justify-content: center;
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
}

/* ---------- Geti ---------- */
.geti { display: flex; flex-direction: column; align-items: center; text-align: center; }
.bubble {
  position: relative;
  background: #fff;
  border: 2px solid var(--blue);
  border-radius: 18px;
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  box-shadow: 0 8px 24px rgba(14, 40, 65, 0.10);
  margin-bottom: 22px;
  max-width: 300px;
  min-height: 58px;
}
.bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -11px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-right: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  transform: translateX(-50%) rotate(45deg);
}
.geti-img {
  width: clamp(180px, 26vw, 280px);
  height: auto;
  border-radius: 50%;
  border: 6px solid #fff;
  box-shadow: 0 14px 40px rgba(0, 88, 171, 0.30), 0 0 0 3px var(--sky);
  background: var(--sky);
}
.geti-name { margin: 14px 0 0; font-size: 20px; font-weight: 800; color: var(--blue); }
.geti-name span { display: block; font-size: 14px; font-weight: 600; color: #4a5a70; }

/* ---------- calculator ---------- */
.calculator {
  width: 100%;
  background: linear-gradient(160deg, var(--blue) 0%, #003f7d 100%);
  border-radius: var(--radius);
  padding: 18px 18px 20px;
  box-shadow: 0 24px 60px rgba(14, 40, 65, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.plate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 6px 14px;
}
.plate img { height: 30px; width: auto; display: block; }
.model { font-size: 12px; font-weight: 700; letter-spacing: 0.2em; color: rgba(255, 255, 255, 0.75); }

.screen {
  background: #f6fbff;
  border-radius: 14px;
  padding: 12px 16px 14px;
  margin-bottom: 16px;
  text-align: right;
  box-shadow: inset 0 2px 6px rgba(14, 40, 65, 0.18);
  min-height: 88px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.expression {
  min-height: 22px;
  font-size: 16px;
  color: #5b6b80;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.display {
  display: block;
  font-size: 42px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.display.error { font-size: 22px; color: var(--red); }

.keys {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.key {
  appearance: none;
  border: 0;
  border-radius: 14px;
  height: 56px;
  font: inherit;
  font-size: 24px;
  font-weight: 600;
  color: var(--navy);
  background: var(--key);
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.18);
  transition: background-color 0.12s, transform 0.06s, box-shadow 0.06s;
}
.key:hover { background: var(--key-hover); }
.key:active, .key.pressed { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.18); }
.key:focus-visible { outline: 3px solid #ffd34d; outline-offset: 2px; }
.key.fn { background: #cfe2f6; }
.key.fn:hover { background: #bfd7f1; }
.key.op { background: #e3eefb; color: var(--blue); font-size: 28px; }
.key.op:hover { background: #d4e5f8; }
.key.op.active { background: var(--navy); color: #fff; }
.key.eq { background: var(--red); color: #fff; font-size: 28px; }
.key.eq:hover { background: #e32f47; }
.key.wide { grid-column: span 2; }

/* ---------- footer ---------- */
.footer {
  text-align: center;
  font-size: 12px;
  color: #6a7a8f;
  padding: 12px 16px 16px;
}

/* ---------- small screens ---------- */
@media (max-width: 760px) {
  .stage { grid-template-columns: minmax(0, 380px); }
  .geti { flex-direction: row; gap: 14px; text-align: left; }
  .geti-img { width: 110px; order: -1; border-width: 4px; }
  .bubble { margin: 0; font-size: 14px; }
  .bubble::after { left: -11px; top: 50%; bottom: auto; transform: translateY(-50%) rotate(135deg); }
  .geti-name { display: none; }
  .topbar-tag { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .key { transition: none; }
}
