/* North Koi website. Colours are the studio's: navy, vermilion, scarf green, cream. */
:root {
  --navy: #1f2f3a;
  --navy-soft: #4a5a66;
  --vermilion: #e4572e;
  --green: #2f6a52;
  --cream: #f5efe4;
  --cream-deep: #ece3d2;
  --paper: #fbf8f2;
  --line: rgba(31, 47, 58, 0.14);
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --wide: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--navy);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--green);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--vermilion);
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 0.5em;
}

.wrap {
  width: min(100% - 40px, var(--wide));
  margin: 0 auto;
}

.kicker {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green);
}

/* ------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 248, 242, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 68px;
}

.brand img {
  height: 40px;
  width: auto;
}

.site-nav {
  display: flex;
  gap: 26px;
  font-size: 15px;
}

.site-nav a {
  color: var(--navy);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--vermilion);
}

/* --------------------------------------------------------------- hero */

.hero {
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero .wrap {
  padding: 72px 0 0;
  text-align: center;
}

.hero h1 {
  font-size: clamp(36px, 6vw, 60px);
  max-width: 14em;
  margin: 0 auto 18px;
}

.hero h1 em {
  color: var(--vermilion);
}

.hero .lead {
  max-width: 36em;
  margin: 0 auto 32px;
  font-size: 19px;
  color: var(--navy-soft);
}

.button {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 16px;
  text-decoration: none;
  transition: background 0.2s;
}

.button:hover {
  background: var(--navy);
  color: #fff;
}

/* The six title screens, standing in a row like phones on a shelf. */
.shelf {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(6px, 1.6vw, 20px);
  margin-top: 56px;
  padding: 0 10px;
}

.shelf a {
  display: block;
  width: clamp(72px, 13.5vw, 160px);
  transform: translateY(22%);
  transition: transform 0.35s ease;
}

.shelf a:nth-child(2n) {
  transform: translateY(30%);
}

.shelf a:hover {
  transform: translateY(12%);
}

/* ------------------------------------------------------------- phones */

.phone {
  aspect-ratio: 390 / 844;
  border-radius: 22px;
  overflow: hidden;
  border: 5px solid var(--navy);
  background: var(--navy);
  box-shadow: 0 18px 40px rgba(31, 47, 58, 0.22);
}

.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* -------------------------------------------------------------- games */

.section {
  padding: 88px 0;
}

.section-head {
  text-align: center;
  margin-bottom: 56px;
}

.section-head h2 {
  font-size: clamp(30px, 4.5vw, 42px);
}

.section-head p {
  max-width: 34em;
  margin: 0 auto;
  color: var(--navy-soft);
}

.game {
  scroll-margin-top: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 56px;
  align-items: center;
  padding: 48px 0;
  border-top: 1px solid var(--line);
}

.game:nth-of-type(even) .game-shots {
  order: 2;
}

.game-shots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  max-width: 440px;
  justify-self: center;
}

.game-shots .phone:last-child {
  transform: translateY(28px);
}

.game h3 {
  font-size: clamp(30px, 4vw, 40px);
  margin-bottom: 4px;
}

.tagline {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  color: var(--vermilion);
}

.game p {
  margin: 0 0 16px;
}

.features {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.features li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
}

.features li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

.status {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--cream-deep);
  color: var(--navy);
  font-size: 14px;
}

/* Credit for art shared by others (Koi-Koi's cards). */
.credit {
  margin: 18px 0 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--navy-soft);
}

.credit a {
  color: inherit;
}

/* -------------------------------------------------- about and contact */

.band {
  background: var(--cream);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px;
}

.columns h3 {
  font-size: 24px;
}

.columns p {
  margin: 0;
  color: var(--navy-soft);
}

.contact {
  text-align: center;
}

.contact .email {
  display: inline-block;
  margin: 8px 0 18px;
  font-family: var(--serif);
  font-size: clamp(24px, 4vw, 34px);
  color: var(--navy);
}

.contact p {
  max-width: 34em;
  margin: 0 auto 10px;
  color: var(--navy-soft);
}

/* ------------------------------------------------------- legal pages */

.page {
  padding: 64px 0 88px;
}

.prose {
  width: min(100% - 40px, 720px);
  margin: 0 auto;
}

.prose h1 {
  font-size: clamp(34px, 5vw, 46px);
}

.prose h2 {
  font-size: 26px;
  margin-top: 44px;
}

.prose h3 {
  font-size: 20px;
  margin-top: 28px;
}

.prose .updated {
  color: var(--navy-soft);
  margin-top: -6px;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 22px;
  font-size: 15px;
}

.prose th,
.prose td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  font-weight: 600;
}

.prose td.yes {
  color: var(--green);
  font-weight: 600;
}

.prose td.no {
  color: var(--navy-soft);
}

.prose ol,
.prose ul {
  padding-left: 22px;
}

.prose li {
  margin-bottom: 6px;
}

.note {
  padding: 16px 20px;
  border-radius: 14px;
  background: var(--cream);
  border: 1px solid var(--line);
}

/* ------------------------------------------------------------- footer */

.site-footer {
  background: var(--navy);
  color: var(--cream);
  padding: 44px 0;
  font-size: 15px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.site-footer img {
  height: 30px;
  width: auto;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.site-footer a {
  color: var(--cream);
  text-decoration: none;
  opacity: 0.85;
}

.site-footer a:hover {
  color: #fff;
  opacity: 1;
}

.site-footer small {
  opacity: 0.6;
}

/* -------------------------------------------------------- small screens */

@media (max-width: 820px) {
  .game {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .game:nth-of-type(even) .game-shots {
    order: 0;
  }

  .game-shots {
    max-width: 360px;
  }

  .columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .site-nav {
    gap: 16px;
    font-size: 14px;
  }

  .brand img {
    height: 32px;
  }

  .hero .wrap {
    padding-top: 48px;
  }

  .section {
    padding: 64px 0;
  }

  /* All six phones, overlapping a little, the middle two in front. */
  .shelf {
    gap: 0;
    padding: 0;
  }

  .shelf a {
    width: 17.5vw;
    margin: 0 -1.5vw;
  }

  .shelf .phone {
    border-width: 3px;
    border-radius: 13px;
    box-shadow: 0 10px 24px rgba(31, 47, 58, 0.25);
  }

  .shelf a:nth-child(1),
  .shelf a:nth-child(6) {
    z-index: 1;
    transform: translateY(30%) scale(0.86);
  }

  .shelf a:nth-child(2),
  .shelf a:nth-child(5) {
    z-index: 2;
    transform: translateY(25%) scale(0.93);
  }

  .shelf a:nth-child(3),
  .shelf a:nth-child(4) {
    z-index: 3;
    transform: translateY(20%);
  }

  .game {
    scroll-margin-top: 56px;
  }
}
