/* kaironos website styles
   Change a colour or font here and it updates on every page. */

@font-face { font-family: "Michroma"; src: url("fonts/michroma-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/ibm-plex-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/ibm-plex-sans-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/ibm-plex-sans-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/ibm-plex-sans-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

/* Layout idea: every page band ends on the logo's two horizon bars, with the sun resting on them. */
:root {
  color-scheme: light;
  --night: #0E1A2B;      /* dark bands */
  --navy: #14325A;       /* logo navy: headings, links */
  --sun: #D9822B;        /* logo orange on light backgrounds */
  --sun-bright: #E8963F; /* logo orange on dark backgrounds */
  --snow: #F4F6F8;       /* text on dark bands */
  --ice: #E9EEF3;        /* pale band */
  --ink: #1B2430;        /* body text */
  --slate: #4A5563;      /* secondary text */
  --mist: #B9C4D0;       /* secondary text on dark bands */
  --rule: #D5DAE0;       /* thin lines */
  --white: #FFFFFF;

  --display: "Michroma", "Eurostile", "Arial", sans-serif;
  --body: "IBM Plex Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --page-width: 72rem;
  --text-width: 40rem;
}

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

a { color: var(--navy); text-underline-offset: 0.18em; }
a:hover { color: var(--sun); }
a:focus-visible { outline: 3px solid var(--sun-bright); outline-offset: 3px; }

h1, h2, h3 { margin: 0; text-wrap: balance; }
p, ul, ol, dl { margin: 0; }

h1, h2 { font-family: var(--display); font-weight: 400; line-height: 1.25; }
h1 { font-size: clamp(1.75rem, 4.2vw, 3rem); }
h2 { font-size: clamp(1.25rem, 2.6vw, 1.75rem); color: var(--navy); }
h3 { font-size: 1.125rem; font-weight: 600; line-height: 1.35; color: var(--navy); }

.wrap {
  width: 100%;
  max-width: calc(var(--page-width) + 3rem);
  margin-inline: auto;
  padding-left: max(1.5rem, env(safe-area-inset-left, 0px));
  padding-right: max(1.5rem, env(safe-area-inset-right, 0px));
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 2;
  padding: 0.5rem 1rem;
  background: var(--white);
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* Header */

.band-dark { background: var(--night); color: var(--snow); }

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-block: 1.5rem;
}
.site-header .logo img { width: 11.5rem; }
.site-header nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.75rem;
  padding: 0;
  list-style: none;
}
.site-header nav a {
  display: inline-block;
  padding-block: 0.25rem;
  color: var(--snow);
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.site-header nav a:hover { color: var(--sun-bright); }
.site-header nav a[aria-current="page"] { border-bottom-color: var(--sun-bright); }

/* Horizon: sun and two bars, taken from the logo */

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 2rem 3rem;
}
.hero-copy { padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(2rem, 5vw, 4rem); display: grid; gap: 1.5rem; }
.hero-copy .lede { max-width: 36rem; font-size: 1.1875rem; color: var(--snow); }

.sun-frame { overflow: hidden; line-height: 0; }
.sun {
  display: block;
  width: clamp(13rem, 30vw, 25rem);
  aspect-ratio: 2 / 1;
  border-radius: 999px 999px 0 0;
  background: var(--sun-bright);
  animation: rise 1.4s ease-out both;
}
.sun-small { width: clamp(6rem, 13vw, 10rem); animation: none; }

@keyframes rise {
  from { transform: translateY(16%); }
  to { transform: translateY(0); }
}

.bars { display: grid; gap: 7px; padding-bottom: clamp(2rem, 4vw, 3rem); }
.bars span { display: block; height: 8px; background: var(--snow); }
.bars span:last-child { width: 64%; justify-self: center; }

.page-head-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 1.5rem 3rem; }
.page-head-copy { padding-block: clamp(1.5rem, 4vw, 3rem); display: grid; gap: 0.75rem; }
.page-head-copy p { max-width: 36rem; color: var(--mist); }

/* Buttons */

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; align-items: center; }
.button {
  display: inline-block;
  padding: 0.7rem 1.35rem;
  background: var(--sun-bright);
  color: var(--night);
  font-weight: 600;
  text-decoration: none;
}
.button:hover { background: var(--snow); color: var(--night); }
.quiet-link { color: var(--snow); font-weight: 500; }
.quiet-link:hover { color: var(--sun-bright); }

/* Page sections */

.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-pale { background: var(--ice); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 1.25rem 4rem;
  align-items: start;
}
.prose { display: grid; gap: 1rem; max-width: var(--text-width); }

/* Project timeline on the home page */

.windows {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding: 0;
  list-style: none;
}
.windows .mark {
  display: block;
  position: relative;
  height: 2.25rem;
  border-bottom: 5px solid var(--navy);
  margin-bottom: 1rem;
}
.windows .mark::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 2.5rem;
  height: 1.25rem;
  border-radius: 2.5rem 2.5rem 0 0;
  background: var(--sun);
}
.windows .text { display: grid; gap: 0.35rem; padding-right: 1.5rem; }
.windows p { font-size: 1rem; color: var(--slate); }

/* Service list on the home page */

.service-list { margin-top: 2rem; padding: 0; list-style: none; border-top: 1px solid var(--navy); }
.service-list a {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 0.25rem 4rem;
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  text-decoration: none;
}
.service-list strong { font-weight: 600; color: var(--navy); }
.service-list a:hover strong { color: var(--sun); text-decoration: underline; }

/* Services page */

.service { padding-block: 2.5rem; border-top: 1px solid var(--rule); scroll-margin-top: 1rem; }
.service:first-child { padding-top: 0; border-top: 0; }
.service h3.typical { margin-top: 0.5rem; font-size: 1rem; color: var(--ink); }
.service ul { display: grid; gap: 0.25rem; padding-left: 1.2rem; }
.service li::marker { color: var(--sun); }

.who {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem 3rem;
  margin-top: 2rem;
}
.who > div { display: grid; gap: 0.4rem; align-content: start; }
.who p { color: var(--slate); }

.scope { margin-top: 2.5rem; max-width: var(--text-width); color: var(--slate); }

/* About page */

.name-line { font-size: 1.25rem; line-height: 1.5; color: var(--navy); }

.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.5rem 2rem; }
.facts dt { font-weight: 600; color: var(--navy); }
.facts dd { margin: 0; }

.founder-side { display: grid; gap: 1.5rem; align-content: start; }
.founder-photo { width: 100%; max-width: 20rem; aspect-ratio: 720 / 964; object-fit: cover; border-bottom: 6px solid var(--sun); }

/* Contact page */

.email-big {
  font-family: var(--display);
  font-size: clamp(1rem, 3.1vw, 1.75rem);
  overflow-wrap: anywhere;
}

/* Closing band and footer */

.closing .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 3rem;
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
}
.closing h2 { color: var(--snow); max-width: 34rem; }

.site-footer { background: var(--night); color: var(--mist); border-top: 1px solid var(--navy); font-size: 0.9375rem; }
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: 2rem;
}
.site-footer img { width: 8.5rem; }

/* Tablet and phone */

@media (max-width: 62rem) {
  .windows { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .windows .text { padding-right: 0; }
  .windows .mark { margin-bottom: 0.75rem; }
  .who { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
}

@media (max-width: 48rem) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hero-copy { padding-bottom: 2.5rem; }
  .sun-frame { justify-self: end; }
  .page-head-grid { grid-template-columns: minmax(0, 1fr) auto; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .service-list a { grid-template-columns: minmax(0, 1fr); }
  .founder-photo { max-width: 15rem; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .facts dd { margin-bottom: 0.75rem; }
}

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