/* ================================
   Custom Properties
   ================================ */
:root {
  /* Palette */
  --bg-body: #f8f9fb;
  --bg-surface: #ffffff;
  --bg-surface-alt: #edf1f5;

  --text-primary: #1a2332;
  --text-secondary: #3a4a5c;
  --text-muted: #6b7d8f;
  --text-on-dark: #f0f4f7;
  --text-on-dark-muted: rgba(240, 244, 247, 0.7);

  --accent: #2a8f9d;
  --accent-hover: #237a86;
  --accent-light: #e6f4f6;
  --warm: #c47a52;
  --warm-hover: #a8663f;
  --warm-light: #faf0ea;

  --border: rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.1);

  /* Typography */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  /* Misc */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 100px;
  --max-width: 960px;
  --transition: 200ms ease;
}

/* ================================
   Reset & Base
   ================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-primary);
  background-color: var(--bg-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

section[id] {
  scroll-margin-top: 2rem;
}

/* ================================
   Accessibility
   ================================ */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background-color: var(--text-primary);
  color: var(--text-on-dark);
  padding: var(--space-sm) var(--space-md);
  z-index: 100;
  font-weight: 600;
}

.skip-link:focus {
  top: 0;
}

/* ================================
   Layout
   ================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ================================
   Typography
   ================================ */
.section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  font-optical-sizing: auto;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  line-height: 1.3;
}

/* ================================
   Buttons
   ================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: background-color var(--transition), transform 0.15s ease, box-shadow var(--transition);
  min-height: 48px;
  width: 100%;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background-color: var(--accent);
  color: var(--text-on-dark);
  box-shadow: 0 2px 8px rgba(42, 143, 157, 0.3);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  color: var(--text-on-dark);
  box-shadow: 0 4px 16px rgba(42, 143, 157, 0.35);
}

.btn-hero {
  background-color: #ffffff;
  color: var(--text-primary);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.btn-hero:hover {
  background-color: #f0f4f7;
  color: var(--text-primary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
  background-color: var(--warm);
  color: #ffffff;
}

.btn-secondary:hover {
  background-color: var(--warm-hover);
  color: #ffffff;
}

.btn-outline {
  background-color: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-outline:hover {
  background-color: var(--accent);
  color: #ffffff;
}

.btn-cta {
  background-color: #ffffff;
  color: var(--accent);
}

.btn-cta:hover {
  background-color: #f0f4f7;
  color: var(--accent-hover);
}

/* ================================
   Hero
   ================================ */
.hero {
  background:
    linear-gradient(150deg, rgba(26, 35, 50, 0.85) 0%, rgba(36, 52, 68, 0.82) 45%, rgba(30, 96, 109, 0.78) 100%),
    url('seattle_emerald_20260124_162244.png') center / cover no-repeat;
  color: var(--text-on-dark);
  padding: 3rem 0 2.5rem;
  display: flex;
  align-items: center;
  min-height: 100svh;
  min-height: 100vh; /* fallback */
}

.hero-content {
  width: 100%;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-on-dark-muted);
  margin-bottom: var(--space-sm);
}

.hero-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  font-optical-sizing: auto;
  line-height: 1.1;
  color: #ffffff;
  margin-bottom: var(--space-md);
}

.hero-tagline {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-on-dark-muted);
  max-width: 500px;
  margin-bottom: var(--space-lg);
}

/* Event pills: horizontal scroll on mobile */
.event-strip {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.5rem;
  margin-bottom: var(--space-lg);
  margin-left: -1.25rem;
  margin-right: -1.25rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.event-strip::-webkit-scrollbar {
  display: none;
}

.event-pill {
  scroll-snap-align: start;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 0.625rem 1rem;
  text-align: center;
  min-width: 100px;
}

.pill-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 0.15rem;
}

.pill-value {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: #ffffff;
}

.hero-note {
  font-size: 0.8rem;
  color: var(--text-on-dark-muted);
  margin-top: var(--space-sm);
}

/* ================================
   Invited Section
   ================================ */
.invited {
  padding: var(--space-xl) 0;
  background-color: var(--bg-surface);
}

.invited-intro {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.invited-audience {
  background-color: var(--accent-light);
  border-left: 3px solid var(--accent);
  padding: var(--space-sm) var(--space-md);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: var(--space-md);
  font-size: 0.95rem;
  line-height: 1.65;
}

.invited-host {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ================================
   Values Section
   ================================ */
.values {
  padding: var(--space-xl) 0;
  background-color: var(--bg-body);
}

.values-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.value-card {
  background: var(--bg-surface);
  padding: var(--space-md);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.value-card:nth-child(2) {
  border-left-color: var(--warm);
}

.value-card:nth-child(3) {
  border-left-color: var(--text-primary);
}

.value-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.value-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ================================
   CTA Block
   ================================ */
.cta-block {
  padding: var(--space-xl) 0;
  background:
    linear-gradient(135deg, rgba(42, 143, 157, 0.88) 0%, rgba(30, 96, 109, 0.91) 100%),
    url('seattle_japanese_ink_20260129_203611.png') center / cover no-repeat;
  text-align: center;
  color: #ffffff;
}

.cta-heading {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: var(--space-xs);
}

.cta-subheading {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--space-md);
}

/* ================================
   Topics Section
   ================================ */
.topics {
  padding: var(--space-xl) 0;
  background-color: var(--bg-surface);
}

.rules-list {
  counter-reset: rules;
  list-style: none;
  margin-bottom: var(--space-lg);
}

.rules-list li {
  counter-increment: rules;
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: var(--space-sm);
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.rules-list li::before {
  content: counter(rules, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent);
  line-height: 1.65;
}

/* ================================
   Details Hub
   ================================ */
.details-hub {
  padding: var(--space-xl) 0;
  background-color: var(--bg-body);
}

.link-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--bg-surface);
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), color var(--transition);
  min-height: 48px;
}

.link-card:hover {
  text-decoration: none;
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
  color: var(--accent);
}

.link-arrow {
  font-size: 1.1rem;
  color: var(--accent);
  transition: transform var(--transition);
  flex-shrink: 0;
  margin-left: var(--space-sm);
}

.link-card:hover .link-arrow {
  transform: translateX(4px);
}

/* ================================
   Contact Section
   ================================ */
.contact {
  padding: var(--space-xl) 0;
  background-color: var(--bg-surface);
}

.contact-note {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

/* ================================
   Register Section
   ================================ */
.register {
  padding: var(--space-xl) 0;
  background:
    linear-gradient(180deg, rgba(237, 241, 245, 0.93) 0%, rgba(248, 249, 251, 0.96) 100%),
    url('seattle_japanese_ink_20260129_203611.png') center top / cover no-repeat;
}

.register-intro {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.event-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.event-card {
  background: var(--bg-surface);
  padding: var(--space-lg) var(--space-md);
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--accent);
  transition: transform var(--transition), box-shadow var(--transition);
}

.event-card--warm {
  border-top-color: var(--warm);
}

.event-card .btn {
  width: 100%;
}

.event-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-sm);
}

.event-badge--virtual {
  background-color: var(--accent-light);
  color: var(--accent);
}

.event-badge--inperson {
  background-color: var(--warm-light);
  color: var(--warm);
}

.event-card-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.event-card-date {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.event-card-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

/* ================================
   Code of Conduct
   ================================ */
.code-of-conduct {
  padding: var(--space-xl) 0;
  background-color: var(--bg-surface);
}

.conduct-list {
  max-width: 700px;
}

.conduct-item {
  border-bottom: 1px solid var(--border);
}

.conduct-item:first-child {
  border-top: 1px solid var(--border);
}

.conduct-item summary {
  padding: 1rem 0;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 48px;
}

.conduct-item summary::-webkit-details-marker {
  display: none;
}

.conduct-item summary::after {
  content: "+";
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--text-muted);
  transition: transform var(--transition);
  flex-shrink: 0;
  margin-left: var(--space-sm);
}

.conduct-item[open] summary::after {
  transform: rotate(45deg);
}

.conduct-item p {
  padding-bottom: var(--space-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
}

/* ================================
   Footer
   ================================ */
.footer {
  padding: var(--space-lg) 0;
  background:
    linear-gradient(180deg, rgba(26, 35, 50, 0.93) 0%, rgba(26, 35, 50, 0.97) 100%),
    url('seattle_emerald_20260124_162244.png') center bottom / cover no-repeat;
  color: var(--text-on-dark);
  text-align: center;
}

.footer-text {
  font-size: 0.85rem;
  color: var(--text-on-dark-muted);
  margin-bottom: var(--space-xs);
}

.footer-links a {
  color: var(--text-on-dark);
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.7;
  transition: opacity var(--transition);
}

.footer-links a:hover {
  opacity: 1;
  color: var(--text-on-dark);
}

/* ================================
   Animations
   ================================ */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-eyebrow  { animation: fade-up 0.6s ease-out both; }
.hero-title    { animation: fade-up 0.6s ease-out 0.08s both; }
.hero-tagline  { animation: fade-up 0.6s ease-out 0.16s both; }
.event-strip   { animation: fade-up 0.6s ease-out 0.24s both; }
.hero .btn     { animation: fade-up 0.6s ease-out 0.32s both; }
.hero-note     { animation: fade-up 0.6s ease-out 0.38s both; }

/* ================================
   Tablet+ (768px)
   ================================ */
@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .btn {
    width: auto;
  }

  /* Hero */
  .hero {
    padding: 5rem 0 4rem;
  }

  .hero-title {
    font-size: 3.5rem;
  }

  .hero-tagline {
    font-size: 1.2rem;
  }

  .event-strip {
    overflow-x: visible;
    flex-wrap: wrap;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
  }

  /* Invited */
  .invited {
    padding: var(--space-2xl) 0;
  }

  .invited-intro {
    font-size: 1.15rem;
  }

  /* Values */
  .values {
    padding: var(--space-2xl) 0;
  }

  .values-grid {
    flex-direction: row;
    gap: var(--space-md);
  }

  .value-card {
    flex: 1;
    border-left: none;
    border-top: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: var(--space-lg) var(--space-md);
  }

  .value-card:nth-child(2) {
    border-left: none;
    border-top-color: var(--warm);
  }

  .value-card:nth-child(3) {
    border-left: none;
    border-top-color: var(--text-primary);
  }

  .value-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
  }

  /* CTA */
  .cta-block {
    padding: var(--space-2xl) 0;
  }

  .cta-heading {
    font-size: 2rem;
  }

  /* Topics */
  .topics {
    padding: var(--space-2xl) 0;
  }

  /* Register */
  .register {
    padding: var(--space-2xl) 0;
  }

  .event-cards {
    flex-direction: row;
  }

  .event-card {
    flex: 1;
  }

  .event-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
  }

  /* Other sections */
  .details-hub {
    padding: var(--space-2xl) 0;
  }

  .contact {
    padding: var(--space-2xl) 0;
  }

  .code-of-conduct {
    padding: var(--space-2xl) 0;
  }
}

/* ================================
   Desktop+ (1024px)
   ================================ */
@media (min-width: 1024px) {
  .container {
    padding: 0 var(--space-md);
  }

  .hero-title {
    font-size: 4rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .cta-heading {
    font-size: 2.25rem;
  }
}

/* ================================
   Dark Mode
   ================================ */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-body: #0f1722;
    --bg-surface: #1a2838;
    --bg-surface-alt: #152030;

    --text-primary: #e8edf2;
    --text-secondary: #b0bec9;
    --text-muted: #7a8a9c;

    --accent: #3db4c4;
    --accent-hover: #52c6d4;
    --accent-light: #162a30;
    --warm: #d89a73;
    --warm-hover: #e6ad88;
    --warm-light: #2a2019;

    --border: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.3);
  }

  .hero {
    background:
      linear-gradient(150deg, rgba(10, 16, 24, 0.88) 0%, rgba(20, 32, 46, 0.85) 45%, rgba(19, 53, 64, 0.82) 100%),
      url('seattle_emerald_20260124_162244.png') center / cover no-repeat;
  }

  .cta-block {
    background:
      linear-gradient(135deg, rgba(30, 96, 109, 0.92) 0%, rgba(19, 53, 64, 0.94) 100%),
      url('seattle_japanese_ink_20260129_203611.png') center / cover no-repeat;
  }

  .register {
    background:
      linear-gradient(180deg, rgba(21, 32, 48, 0.94) 0%, rgba(15, 23, 34, 0.96) 100%),
      url('seattle_japanese_ink_20260129_203611.png') center top / cover no-repeat;
  }

  .btn-primary {
    box-shadow: 0 2px 8px rgba(61, 180, 196, 0.3);
  }

  .btn-primary:hover {
    box-shadow: 0 4px 16px rgba(61, 180, 196, 0.35);
  }

  .btn-hero {
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  }

  .btn-hero:hover {
    background-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
  }

  .btn-cta {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
  }

  .btn-cta:hover {
    background-color: rgba(255, 255, 255, 0.22);
    color: #ffffff;
  }

  .footer {
    background:
      linear-gradient(180deg, rgba(10, 16, 24, 0.95) 0%, rgba(10, 16, 24, 0.98) 100%),
      url('seattle_emerald_20260124_162244.png') center bottom / cover no-repeat;
  }
}

/* ================================
   Reduced Motion
   ================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
