/* Fonts (self hosted, SIL Open Font Licence, see /fonts) */
@font-face {
  font-family: "EB Garamond";
  src: url("/fonts/eb-garamond-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("/fonts/eb-garamond-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #0C1430;
  --blue: #303468;
  --beige: #F0EDE5;
  --paper: #F7F5F0;
  --line: rgba(48, 52, 104, 0.18);
  --serif: "EB Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 68rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--beige);
  color: var(--black);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; height: auto; }

a { color: var(--blue); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--black); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* Hero */
.hero {
  padding: clamp(5rem, 14vw, 10rem) 0 clamp(4rem, 10vw, 7rem);
  text-align: center;
}
.hero__logo { margin: 0 auto; max-width: min(32rem, 86%); }
.hero__logo img { width: 100%; }
.hero__tagline {
  margin: clamp(1.5rem, 4vw, 2.25rem) 0 0;
  font: italic 400 clamp(1.4rem, 3.4vw, 1.9rem)/1.3 var(--serif);
  color: var(--blue);
}
.hero__intro {
  max-width: 36rem;
  margin: 1.75rem auto 0;
  font-size: clamp(1rem, 2.2vw, 1.125rem);
}
.hero__intro::before {
  content: "";
  display: block;
  width: 3rem;
  height: 1px;
  margin: 0 auto 1.75rem;
  background: var(--blue);
  opacity: 0.5;
}

/* Sections */
.section { padding: clamp(4rem, 9vw, 6.5rem) 0; border-top: 1px solid var(--line); }
.section--alt { background: var(--paper); }
.section__title {
  margin: 0 0 clamp(2rem, 5vw, 3rem);
  font: 500 clamp(2rem, 5vw, 2.75rem)/1.1 var(--serif);
  letter-spacing: 0.005em;
  text-align: center;
}

/* Videos */
.videos {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
}
.video { margin: 0; }
.video__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 4px;
  background: var(--black);
  box-shadow: 0 1px 2px rgba(12, 20, 48, 0.08), 0 12px 32px -12px rgba(12, 20, 48, 0.35);
}
.video__play, .video__frame iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.video__play img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s ease, opacity 0.3s ease;
}
.video__icon {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.25s ease;
}
.video__icon rect { fill: var(--black); opacity: 0.85; transition: fill 0.25s ease, opacity 0.25s ease; }
.video__icon path { fill: var(--beige); }
.video__play:hover img, .video__play:focus-visible img { transform: scale(1.03); opacity: 0.92; }
.video__play:hover .video__icon, .video__play:focus-visible .video__icon { transform: translate(-50%, -50%) scale(1.06); }
.video__play:hover rect, .video__play:focus-visible rect { fill: var(--blue); opacity: 1; }
.video__play:focus-visible { outline-offset: -4px; outline-color: var(--beige); }
.video__title {
  margin-top: 1rem;
  font: 500 1.375rem/1.3 var(--serif);
}

.actions {
  display: flex; flex-wrap: wrap; gap: 0.75rem 1rem;
  margin: 1.75rem 0 0; padding: 0; list-style: none;
}
.actions--center { justify-content: center; margin-top: clamp(2.5rem, 6vw, 3.5rem); }
.button {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border: 1px solid var(--blue);
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.3;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.button:hover { background: var(--black); border-color: var(--black); color: #fff; }
.button--ghost { background: transparent; color: var(--blue); }
.button--ghost:hover { background: var(--blue); border-color: var(--blue); color: #fff; }

.section__intro {
  max-width: 34rem;
  margin: calc(-1 * clamp(1rem, 3vw, 1.75rem)) auto clamp(2rem, 5vw, 3rem);
  text-align: center;
}
.video__client {
  display: block;
  margin-top: 0.25rem;
  font: 600 0.75rem/1.4 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
}

/* TimeLens (featured, in TimeLens brand colours) */
.timelens {
  --tl-orange: #D56311;   /* brand orange: logo and accents only */
  --tl-ink: #A84B0B;      /* darker orange: text and buttons (WCAG AA) */
  --tl-cream: #F4E8DA;
  --tl-text: #3A2A1E;
  padding: clamp(4rem, 9vw, 6.5rem) 0;
  background: var(--tl-cream);
  color: var(--tl-text);
  border-top: 4px solid var(--tl-orange);
}
.timelens__grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (min-width: 60rem) {
  .timelens__grid { grid-template-columns: 1.3fr 1fr; }
}
.timelens__media { margin: 0; }
.timelens__media img {
  width: 100%;
  border-radius: 16px 16px 0 0; /* bottom of the image is TimeLens cream and blends into the section */
}
.timelens__logo { margin: 0; width: min(16rem, 70%); }
.timelens__logo img { width: 100%; }
.timelens__lead {
  margin: 1.25rem 0 1rem;
  font: 500 clamp(1.6rem, 3.6vw, 2.25rem)/1.15 var(--serif);
  color: var(--tl-text);
}
.timelens__body p { max-width: 32rem; }
.timelens a { color: var(--tl-ink); }
.timelens a:hover { color: var(--tl-text); }
.timelens :focus-visible { outline-color: var(--tl-ink); }
.timelens .button--timelens { background: var(--tl-ink); border-color: var(--tl-ink); color: #fff; }
.timelens .button--timelens:hover { background: var(--tl-text); border-color: var(--tl-text); color: #fff; }
.timelens .button--timelens-ghost { background: transparent; border-color: var(--tl-ink); color: var(--tl-ink); }
.timelens .button--timelens-ghost:hover { background: var(--tl-ink); color: #fff; }
.timelens__stores { margin: 1.25rem 0 0; font-size: 0.9375rem; }
.timelens__stores a { font-weight: 600; }

/* Apps (Campa) */
.app {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  max-width: 50rem;
  margin: 0 auto;
}
@media (min-width: 40rem) {
  .app { grid-template-columns: auto 1fr; }
}
.app__icon { width: clamp(4.5rem, 12vw, 6rem); }
.app__name { margin: 0 0 0.75rem; font: 500 clamp(2rem, 5vw, 2.75rem)/1.1 var(--serif); }
.app__body p { margin: 0; max-width: 34rem; }

/* Footer */
.footer {
  padding: clamp(3.5rem, 8vw, 5rem) 0;
  background: var(--black);
  color: var(--beige);
  font-size: 0.9375rem;
  line-height: 1.75;
}
.footer a { color: var(--beige); }
.footer a:hover { color: #fff; }
.footer__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}
.footer__block { margin: 0; font-style: normal; }
.footer__name { font: 500 1.375rem/1.6 var(--serif); letter-spacing: 0.02em; }
.footer__copy { align-self: end; }
@media (min-width: 46rem) {
  .footer__copy { text-align: right; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
