/* ==========================================================================
   KOI WEBSITE STYLES
   EDIT: brand colours are in the first block below. Change one and it
   updates everywhere on the site.

   Phone layout comes first. Laptop changes are in the block at the bottom.
   ========================================================================== */

:root {
  --green: #16201B;
  --forest: #1E3A2F;
  --cream: #EFE6D6;
  --off-white: #FBF8F2;
  --peach: #E2A57A;
  --line: rgba(251, 248, 242, .32);
  --header-height: 60px;
}

@font-face {
  font-family: "ARP Display";
  src: url("../fonts/ARPDisplay-40.woff2") format("woff2");
  font-display: swap;
}

/* --- Basics --- */
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--green);
  color: var(--off-white);
  font: 400 15px/1.5 "Instrument Sans", system-ui, sans-serif;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--peach); outline-offset: 2px; }

/* --- Text styles --- */
.display {
  font-family: "ARP Display", sans-serif;
  font-weight: 400;
  /* Sized so FEBRUARY always fits the width of the phone */
  font-size: calc((100vw - 40px) / 7.25);
  line-height: 1.02;
}
.display-small { font-size: clamp(2.3rem, 11vw, 3.5rem); }
.eyebrow { font-size: 12px; letter-spacing: .28em; }
.accent { color: var(--peach); }

/* --- Menu bar: see-through, sits on top of the photo --- */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  height: var(--header-height);
  padding: 0 12px;
}
.site-logo { grid-column: 2; grid-row: 1; justify-self: center; position: relative; z-index: 10; }
.site-logo img { width: 92px; }

/* The three stripes (phones only) */
.menu-button {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  z-index: 10;
  display: grid;
  align-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0 9px;
  background: none;
  border: 0;
  cursor: pointer;
}
.menu-button span { display: block; height: 1.5px; background: var(--off-white); transition: transform .2s, opacity .2s; }
.menu-button[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-button[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-button[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* The menu that opens on phones */
.site-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 8;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--green);
  font-size: 22px;
}
.site-nav.is-open { display: flex; }
.site-nav a { padding: 10px 16px; text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current] { text-decoration: underline; text-underline-offset: 4px; }

/* --- Homepage: one photo with the text over it, no scrolling --- */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 500px;
  overflow: hidden;
  text-align: center;
}
.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 49% 20%;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(22, 32, 27, .6) 0%, rgba(22, 32, 27, .42) 12%, rgba(22, 32, 27, .3) 34%, rgba(22, 32, 27, .55) 58%, rgba(22, 32, 27, .55) 100%);
}
.hero-tagline, .hero-top, .hero-bottom { position: relative; z-index: 1; }
.hero-tagline {
  margin-top: var(--header-height);
  padding: 10px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}
/* EDIT: the 23.5svh number moves the FEBRUARY text up or down over the photo */
.hero-top { display: grid; justify-items: center; gap: 6px; padding: max(8px, calc(23.5svh - 180px)) 16px 0; }
.hero-bottom {
  position: absolute;
  top: 52%;
  left: 0;
  right: 0;
  padding: 0 16px;
}
.outline-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  /* EDIT: the 21svh number moves the Join the Waitlist button up or down on phones */
  margin-top: 21svh;
  padding: 11px 18px;
  border: 2px solid var(--off-white);
  font: 400 13px/1 "Trirong", serif;
  text-decoration: none;
}
.outline-button svg { width: 11px; height: 11px; }
.outline-button:hover { background: var(--off-white); color: var(--green); }

/* --- Join page --- */
.join { position: relative; min-height: 100svh; overflow: hidden; }
.join-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
/* EDIT: the last number sets how dark the photo is (0 = no darkening, 1 = solid) */
.join::after { content: ""; position: absolute; inset: 0; background: rgba(22, 32, 27, .66); }
.join-title, .join-form { position: relative; z-index: 1; }
.join-title { max-width: 520px; margin: 0 auto; padding: calc(var(--header-height) + 16px) 16px 0; }
.join-title h1 { margin-bottom: 6px; font-size: 30px; font-weight: 400; line-height: 1.1; }

.join-form { display: grid; gap: 14px; max-width: 520px; margin: 0 auto; padding: 20px 16px 36px; }
.field-pair { display: grid; gap: 14px; }
.field { display: grid; gap: 4px; font-size: 13px; }
.field input, .field select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  /* 16px stops iPhones zooming in when someone taps a box */
  font: 16px "Instrument Sans", sans-serif;
  color: var(--off-white);
  background: rgba(22, 32, 27, .4);
  border: 1px solid var(--line);
  border-radius: 8px;
}
/* EDIT: colours of the open Industry list */
.field select option { background: var(--forest); color: var(--cream); }
::placeholder { color: var(--off-white); opacity: .65; }
fieldset { padding: 0; border: 0; }
legend { padding: 0; margin-bottom: 6px; font-size: 13px; }

/* Pick one: round buttons in a list */
.radios { display: grid; gap: 2px; }
.radio { display: flex; align-items: center; gap: 10px; min-height: 36px; font-size: 14.5px; cursor: pointer; }
.radio input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--peach); }

/* Pick many: tappable pills */
.choices { display: flex; flex-wrap: wrap; gap: 6px; }
.choice input { position: absolute; width: 0; height: 0; opacity: 0; }
.choice span {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 13px;
  font-size: 13.5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}
.choice input:checked + span { background: var(--peach); border-color: var(--peach); color: var(--green); }
.choice input:focus-visible + span { outline: 2px solid var(--peach); outline-offset: 2px; }
.hint { margin: -2px 0 8px; font-size: 12px; opacity: .85; }
.field .hint { margin: 0 0 2px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; }
.consent input { flex: none; width: 20px; height: 20px; margin-top: 1px; accent-color: var(--peach); }
.solid-button {
  width: 100%;
  padding: 17px;
  background: var(--forest);
  color: var(--cream);
  /* Thin beige edge so the button stands out from the dark page */
  border: 1px solid var(--cream);
  border-radius: 999px;
  font: 600 13px/1 "Instrument Sans", sans-serif;
  letter-spacing: .14em;
  cursor: pointer;
}
.solid-button:hover { filter: brightness(1.07); }
.solid-button:disabled { opacity: .6; cursor: default; }
.form-status { text-align: center; font-size: 15px; }
.form-status:empty { display: none; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --- About page --- */
.about { position: relative; min-height: 100svh; overflow: hidden; }
.about-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; }
.about::after { content: ""; position: absolute; inset: 0; background: rgba(22, 32, 27, .72); }
.about-content { position: relative; z-index: 1; padding: calc(var(--header-height) + 16px) 16px 36px; }
.about-content p { margin-top: 12px; }
.about-subheading { margin-top: 24px; font-size: 18px; font-weight: 700; color: var(--peach); }
.rules { margin-top: 10px; padding: 0; list-style: none; }
.rules li { display: flex; gap: 14px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--line); }
.rules b { color: var(--peach); font-size: 18px; }
.about-cta { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.about-cta p { margin-top: 0; font-size: 17px; }
.about-cta .outline-button { margin-top: 14px; }

/* --- Laptops and larger screens --- */
@media (min-width: 760px) {
  :root { --header-height: 84px; }

  .site-header { grid-template-columns: 1fr auto 1fr; padding: 0 4.5vw; }
  .menu-button { display: none; }
  .site-logo img { width: 130px; }
  .site-nav {
    display: flex;
    position: static;
    grid-column: 1;
    grid-row: 1;
    flex-direction: row;
    justify-content: flex-start;
    gap: 6px;
    background: none;
    font-size: 17px;
  }
  .site-nav a { padding: 10px 8px; }
  .site-nav a:first-child { padding-left: 0; }

  .display { font-size: clamp(4.75rem, 6.6vw, 7.9rem); }
  .display-small { font-size: clamp(4rem, 6.6vw, 7.9rem); }
  .eyebrow { font-size: clamp(14px, 1.3vw, 24px); }

  .hero-tagline { font-size: clamp(15px, 1.25vw, 22px); padding: 12px 16px; }
  .hero-top { gap: 10px; padding-top: 3.5svh; }
  .hero-bottom { top: 70%; }
  .outline-button { margin-top: clamp(20px, 6svh, 60px); font-size: clamp(14px, 1.3vw, 22px); }

  .join-title { padding-top: calc(var(--header-height) + 24px); }
  .join-title h1 { font-size: 44px; }
  .field-pair { grid-template-columns: 1fr 1fr; }
  .radios { grid-template-columns: 1fr 1fr; }

  /* About page uses the full width of the screen */
  .about-content { padding: calc(var(--header-height) + 2vw) 4.5vw 4vw; }
  .about-content p { max-width: 62%; margin-top: 1.4vw; font-size: clamp(18px, 1.4vw, 26px); }
  .about-subheading { margin-top: 3vw; font-size: clamp(26px, 2.4vw, 44px); }
  .rules { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.5vw; margin-top: 1.6vw; }
  .rules li { display: block; padding: 1.2vw 0 0; font-size: clamp(16px, 1.4vw, 26px); }
  .rules b { display: block; margin-bottom: .6vw; font-size: clamp(24px, 2.4vw, 44px); }
  .about-cta { margin-top: 3vw; padding-top: 2.4vw; }
  .about-cta p { margin-top: 0; font-size: clamp(20px, 1.8vw, 32px); }
  .about-cta .outline-button { margin-top: 1.4vw; }
}

/* --- Fade-in animation ---
   EDIT: add class="fade-in" to any text to make it fade in.
   Add "fade-later" too for it to appear a moment afterwards. */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.fade-in { animation: fade-in 1.1s ease-out .2s both; }
.fade-later { animation-delay: .7s; }

/* Switches the animation off for people who have reduced motion turned on */
@media (prefers-reduced-motion: reduce) {
  .fade-in { animation: none; }
}
