/* AMES 2027 Tokyo stylesheet. Colors and fonts are set in :root below. */

/* ===== Colors and fonts ===== */
:root {
  --bg: #faf7f6;
  --surface: #ffffff;
  --fg: #241618;
  --muted: #66555a;
  --line: #e8dcdc;
  --accent: #8a1c2b;
  --accent-ink: #ffffff;
  --accent-soft: #f5e6e8;
  --hl: #b5651d;
  --display: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --brand: #8a1c2b;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body {
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 var(--body);
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--surface);
}
a {
  color: var(--accent);
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ===== Header and menu ===== */
header.nav {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 5;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
header.nav .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-block: 10px;
  flex-wrap: wrap;
}
.brand {
  font: 700 1.5rem/1 var(--display);
  letter-spacing: 0.02em;
  color: var(--accent);
  text-decoration: none;
}
.brand span {
  color: var(--fg);
  font-weight: 600;
}
nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
}
nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}
nav a:hover {
  color: var(--accent);
}
@media (max-width: 820px) {
  header.nav .wrap {
    gap: 6px;
    padding-block: 8px;
  }
  nav {
    flex: 1 0 100%;
    min-width: 0;
    margin-inline: calc(-1 * max(16px, env(safe-area-inset-left, 0px)))
      calc(-1 * max(16px, env(safe-area-inset-right, 0px)));
    mask-image: linear-gradient(90deg, #000 88%, transparent);
  }
  nav ul {
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    padding: 2px max(16px, env(safe-area-inset-left, 0px)) 4px;
  }
  nav ul::-webkit-scrollbar {
    display: none;
  }
}

/* ===== Top banner ===== */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  background: var(--brand);
  color: #fff;
}
.hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding-block: 36px;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: 32px;
  min-width: 0;
}
.mark {
  font: 700 clamp(3.2rem, 7vw, 6rem)/0.86 var(--display);
  letter-spacing: 0.01em;
  margin: 0;
}
.mark span {
  display: block;
}
.city {
  display: flex;
  align-items: center;
  gap: 16px;
  font: 600 1.1rem/1 var(--body);
  letter-spacing: 0.6em;
  text-transform: uppercase;
}
.city::before {
  content: "";
  width: 56px;
  height: 2px;
  background: #fff;
  opacity: 0.7;
}
.hero h1 {
  margin: 0;
  font: 500 1.02rem/1.45 var(--body);
  max-width: 34ch;
  opacity: 0.92;
  text-wrap: balance;
}
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  padding-top: 18px;
}
.fact small {
  display: block;
  font: 500 0.7rem/1.4 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.8;
}
.fact b {
  font-weight: 600;
  font-size: 1rem;
}
.hero-photo {
  position: relative;
  min-width: 0;
}
.hero-photo img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
}
@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-photo {
    order: -1;
    height: 220px;
  }
  .hero-panel {
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    padding-left: max(16px, env(safe-area-inset-left, 0px));
  }
}

section {
  padding-block: 56px;
  border-bottom: 1px solid var(--line);
}
section:last-of-type {
  border-bottom: 0;
}

/* ===== Headings and sections ===== */
h2 {
  font: 700 clamp(1.9rem, 4vw, 2.6rem)/1.05 var(--display);
  margin: 0 0 20px;
  letter-spacing: 0.01em;
  text-wrap: balance;
}
h3 {
  font: 600 1.05rem/1.3 var(--body);
  margin: 0 0 8px;
}
.h2-sub {
  font: 500 1rem/1.3 var(--body);
  color: var(--muted);
  margin: -12px 0 20px;
}
p {
  margin: 0 0 14px;
  max-width: 68ch;
}
ul {
  margin: 0 0 14px;
  padding-left: 20px;
}
.lead {
  font-size: 1.1rem;
}
.small {
  font-size: 0.9rem;
  color: var(--muted);
}
.tbd {
  display: inline-block;
  font: 500 0.7rem/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hl);
  border: 1px solid currentColor;
  border-radius: 3px;
  padding: 3px 6px;
  vertical-align: 2px;
  margin-left: 6px;
  font-style: normal;
}

/* ===== Important Dates ===== */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  max-width: 720px;
}
.timeline li {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 4px 20px;
  padding: 14px 0 14px 28px;
  position: relative;
}
/* Dot: 12px circle whose center is 6px from the left edge, 27px from the top */
.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 21px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  z-index: 1;
}
/* Line: runs from this dot to the next one, so it stops at the last dot */
.timeline li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 27px;
  bottom: -27px;
  width: 2px;
  background: var(--line);
}
.timeline li.key::before {
  background: var(--accent);
}
.timeline time {
  font: 500 0.9rem/1.5 var(--mono);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.timeline span {
  min-width: 0;
}
@media (max-width: 560px) {
  .timeline li {
    grid-template-columns: 1fr;
  }
}

/* ===== Call for Papers (areas) and Committee ===== */
#cfp a {
  overflow-wrap: anywhere;
}
.topics {
  columns: 2 260px;
  column-gap: 32px;
  margin: 0;
  padding-left: 20px;
}
.topics li {
  break-inside: avoid;
  margin-bottom: 4px;
}

.chair {
  display: inline-block;
  font: 500 0.7rem/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 3px;
  padding: 4px 6px;
  margin-left: 6px;
  vertical-align: 2px;
}

/* ===== Speakers ===== */
.role {
  display: block;
  font: 500 0.7rem/1.6 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
#speakers .topics li {
  margin-bottom: 8px;
}
.role + .tbd,
li > .tbd:first-child {
  margin-left: 0;
}

/* ===== Venue & Travel ===== */
.travel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px 40px;
  margin-top: 40px;
}
.travel > div {
  min-width: 0;
  border-top: 2px solid var(--accent);
  padding-top: 16px;
}

/* ===== Contact ===== */

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
}
.mail {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 500 1rem var(--mono);
  user-select: all;
}
.copy {
  font: 500 0.75rem var(--body);
  background: transparent;
  border: 1px solid var(--line);
  color: var(--fg);
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
}

/* ===== Footer ===== */
footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}
footer .wrap {
  padding-block: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
}
