:root {
  color-scheme: light dark;
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  --paper: #f3f5f7;
  --paper-strong: #edf0f3;
  --ink: #17273c;
  --muted: #5c6c7d;
  --line: rgba(23, 39, 60, .17);
  --accent: #0a69db;
  --card: rgba(250, 252, 253, .67);
  --shadow: rgba(34, 53, 76, .11);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--paper); }

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

a { color: inherit; }

.home-shell {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 100dvh;
  overflow: clip;
  grid-template-columns: minmax(40px, 1fr) minmax(0, 520px) minmax(0, 460px) minmax(40px, 1fr);
  grid-template-rows: auto 1fr auto;
  background: var(--paper);
}

.art-field {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, var(--paper) 0%, rgba(243, 245, 247, .86) 48%, rgba(243, 245, 247, .24) 100%),
    url('./assets/home-constellation.jpg') right center / auto 100% no-repeat;
}

.art-field::after {
  position: absolute;
  inset: 0;
  content: '';
  background: linear-gradient(180deg, rgba(243, 245, 247, .24), var(--paper) 93%);
}

.site-header,
.site-footer {
  grid-column: 2 / 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header {
  min-height: 72px;
  padding: 0;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--ink);
  font-size: 19px;
  font-weight: 720;
  letter-spacing: -.055em;
  text-decoration: none;
}

.site-header p,
.site-footer {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .04em;
}

.intro {
  grid-column: 2 / 3;
  align-self: center;
  padding: 9vh 0 11vh;
}

.kicker {
  margin: 0 0 20px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .18em;
}

h1 {
  max-width: 12em;
  margin: 0;
  color: var(--ink);
  font-size: clamp(42px, 4.1vw, 60px);
  font-weight: 730;
  letter-spacing: -.075em;
  line-height: 1.06;
}

.intro-copy {
  max-width: 26em;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
}

.project-area {
  grid-column: 3 / 4;
  align-self: center;
  padding: 10vh 0 10vh clamp(28px, 4vw, 64px);
}

.project-grid {
  display: grid;
  gap: 10px;
}

.project-card {
  position: relative;
  display: grid;
  min-height: 148px;
  grid-template-columns: 100px minmax(0, 1fr) 22px;
  gap: 13px;
  align-items: start;
  overflow: hidden;
  padding: 22px 20px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 15px 40px -28px var(--shadow);
  text-decoration: none;
  transition: transform .22s cubic-bezier(.2, .7, .2, 1), border-color .22s ease, background .22s ease, box-shadow .22s ease;
}

.project-card::before {
  position: absolute;
  right: -26px;
  bottom: -40px;
  width: 125px;
  height: 125px;
  border: 1px solid rgba(10, 105, 219, .14);
  border-radius: 50%;
  content: '';
  transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}

.project-card:hover {
  border-color: rgba(10, 105, 219, .45);
  background: rgba(255, 255, 255, .84);
  box-shadow: 0 20px 45px -27px rgba(13, 53, 98, .36);
  transform: translateY(-3px);
}

.project-card:hover::before { transform: scale(1.34); }
.project-card:active { transform: translateY(0) scale(.988); }
.project-card:focus-visible { outline: 3px solid rgba(10, 105, 219, .36); outline-offset: 3px; }

.project-type {
  position: relative;
  z-index: 1;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  line-height: 1.45;
}

.project-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
}

.project-copy strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 690;
  letter-spacing: -.035em;
  line-height: 1.35;
}

.project-copy span {
  max-width: 18em;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.project-arrow {
  position: relative;
  z-index: 1;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: var(--accent);
  font-size: 20px;
  line-height: 1;
  transition: transform .22s ease;
}

.project-card:hover .project-arrow { transform: translate(3px, -3px); }

.prompts::before { border-color: rgba(10, 105, 219, .17); }
.trading::before { border-color: rgba(23, 39, 60, .22); }
.freight::before { border-color: rgba(34, 113, 102, .22); }
.trading .project-type { color: #35506d; }
.freight .project-type { color: #247366; }

.future-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.site-footer {
  min-height: 64px;
  padding: 0;
}

.site-footer span:first-child {
  color: var(--ink);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .16em;
}

@media (max-width: 980px) {
  .home-shell {
    grid-template-columns: minmax(28px, 1fr) minmax(0, 1.2fr) minmax(0, 1fr) minmax(28px, 1fr);
  }

  .site-header,
  .site-footer { grid-column: 2 / 4; }
  .intro { grid-column: 2 / 4; padding: 70px 0 38px; }
  .project-area { grid-column: 2 / 4; padding: 0 0 68px; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-card:first-child { grid-row: span 2; min-height: 306px; grid-template-columns: 1fr 22px; }
  .project-card:first-child .project-type { grid-column: 1 / -1; }
  .project-card:first-child .project-copy { align-self: end; }
}

@media (max-width: 640px) {
  .home-shell {
    display: block;
    min-height: 100dvh;
    padding: 0 22px;
  }

  .art-field {
    background:
      linear-gradient(180deg, rgba(243, 245, 247, .22) 0%, var(--paper) 61%),
      url('./assets/home-constellation.jpg') 64% top / auto 430px no-repeat;
  }

  .site-header { min-height: 64px; }
  .site-header p { font-size: 11px; }
  .intro { padding: 80px 0 44px; }
  h1 { font-size: clamp(39px, 12vw, 56px); }
  .intro-copy { margin-top: 22px; font-size: 14px; }
  .project-area { padding: 0 0 42px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card,
  .project-card:first-child {
    min-height: 132px;
    grid-template-columns: 82px minmax(0, 1fr) 22px;
    grid-row: auto;
  }
  .project-card:first-child .project-type { grid-column: auto; }
  .project-card:first-child .project-copy { align-self: auto; }
  .project-copy strong { font-size: 17px; }
  .site-footer { min-height: 58px; }
  .site-footer span:last-child { display: none; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111925;
    --paper-strong: #162233;
    --ink: #edf4fc;
    --muted: #b2c1d1;
    --line: rgba(202, 219, 237, .18);
    --accent: #7db7ff;
    --card: rgba(24, 35, 51, .76);
    --shadow: rgba(0, 0, 0, .5);
  }

  .art-field {
    background:
      linear-gradient(90deg, var(--paper) 0%, rgba(17, 25, 37, .86) 48%, rgba(17, 25, 37, .4) 100%),
      url('./assets/home-constellation.jpg') right center / auto 100% no-repeat;
    filter: saturate(.72) brightness(.52);
  }

  .art-field::after { background: linear-gradient(180deg, rgba(17, 25, 37, .1), var(--paper) 93%); }
  .project-card:hover { background: rgba(29, 45, 64, .94); }
  .trading .project-type { color: #bed0e4; }
  .freight .project-type { color: #8ed0c3; }
}

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