/* ===== IN-CYPHER — editorial-minimal theme after the Wix "Tech It" template,
   rebranded in Imperial blue ===== */

:root {
  --blue: #0000CD;          /* Imperial College London brand blue */
  --ink: #101014;
  --muted: #4c4c55;
  --bg: #F4F6FB;            /* blue-tinted off-white */
  --line: rgba(16, 16, 20, 0.15);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

.container {
  width: min(1560px, 96%);
  margin-inline: auto;
}

/* ===== Header / nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.brand-icon { width: 24px; height: 24px; }

.brand-name {
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 1rem;
  color: inherit;
}

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
}

.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.nav-links a:hover {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--ink);
}

/* ===== Hero ===== */
.hero { padding: 56px 0 90px; }

.hero-display {
  font-size: clamp(3rem, 10.5vw, 9.5rem);
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin-bottom: 34px;
}

.hero-tagline {
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  color: var(--ink);
  margin-bottom: 48px;
}

.hero-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.hero-photo {
  position: relative;
  display: block;
  overflow: hidden;
}

.hero-photo img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hero-photo:hover img { transform: scale(1.03); }

.photo-tag {
  position: absolute;
  left: 16px;
  bottom: 16px;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 20px;
  border-radius: 999px;
}

/* ===== Section headings ===== */
section { scroll-margin-top: 70px; }

.section-title {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.section-sub {
  font-size: 1.1rem;
  color: var(--muted);
  margin-top: 6px;
}

/* ===== About ===== */
.about {
  padding: 90px 0;
  border-top: 1px solid var(--line);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 28px 72px;
  align-items: start;
}

.about-body { margin-top: 36px; }

.about-body p { margin-bottom: 16px; max-width: 58ch; }

.text-link {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.text-link:hover { color: var(--blue); }

.about-photo { grid-column: 2; grid-row: 1; }

.about-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.about-photo figcaption {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 8px;
}

/* ===== Demos ===== */
.demos {
  padding: 90px 0 110px;
  border-top: 1px solid var(--line);
}

.demo-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  margin-top: 64px;
}

.demo-mark {
  display: block;
  color: var(--blue);
  font-size: 1.6rem;
  margin-bottom: 14px;
}

.demo-col h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.demo-col p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ===== Scrolling ribbon ===== */
.ribbon {
  background: var(--blue);
  color: #fff;
  overflow: hidden;
  padding: 14px 0;
}

.ribbon-track {
  display: flex;
  width: max-content;
  animation: ribbon-scroll 22s linear infinite;
}

.ribbon-track span {
  white-space: nowrap;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

@keyframes ribbon-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .ribbon-track { animation: none; }
}

/* ===== Footer ===== */
.site-footer { padding: 72px 0 0; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}

.footer-brand .brand-name {
  display: block;
  margin-bottom: 14px;
}

.footer-brand p { color: var(--muted); font-size: 0.95rem; }

.footer-col h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}

.footer-col ul { list-style: none; }

.footer-col li { margin-bottom: 8px; }

.footer-col a {
  color: var(--muted);
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 18px 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero-photos,
  .about-grid,
  .demo-columns,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .about-grid { gap: 28px; }
  .about-photo { grid-column: 1; grid-row: auto; }
  .demo-columns { gap: 36px; margin-top: 40px; }

  .nav-toggle { display: flex; }

  .nav-links {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 8px 3%;
    display: none;
  }

  .nav-links.open { display: flex; }

  .nav-links a {
    display: block;
    padding: 12px 0;
    border-bottom: 0;
  }
}
