/* UTokyo Hongo Campus Point Cloud Map — styles */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f6f8;
  --text: #1a1f2b;
  --muted: #5a6472;
  --brand: #0b5cad;        /* UTokyo-ish blue */
  --brand-dark: #0a4f95;   /* darker blue */
  --accent: #12603a;       /* accent green */
  --border: #dfe3e8;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.06);
  --radius: 10px;
  --max: 960px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

.container-narrow { max-width: 640px; }

h1, h2, h3 { line-height: 1.25; color: var(--text); }
h2 { font-size: 1.6rem; margin-top: 0; }
h3 { font-size: 1.15rem; margin-top: 1.8rem; }

a { color: var(--brand); }

/* Hero */
.hero {
  /* Header image (assets/images/header.png) sits under a translucent brand overlay
     for text contrast. Falls back to the solid brand color if the image is missing. */
  background-color: #0b3d67;
  background-image:
    linear-gradient(135deg, rgba(11, 61, 103, 0.82) 0%, rgba(11, 92, 173, 0.72) 55%, rgba(18, 96, 58, 0.78) 130%),
    url("assets/images/header.png");
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 84px 0 72px;
  text-align: center;
}
.hero-compact { padding: 60px 0 52px; text-align: left; }
.hero-compact .lede { margin-left: 0; margin-right: 0; }
.hero h1 { color: #fff; font-size: 2.6rem; margin: 0.2em 0 0.4em; letter-spacing: -0.01em; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 600;
  margin: 0;
  opacity: 0.85;
}
.lede { font-size: 1.15rem; max-width: 620px; margin: 0 auto 1.8em; opacity: 0.95; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.05s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: #fff; color: var(--brand); }
.hero .btn-primary { box-shadow: var(--shadow); }
.btn-primary:hover { background: #eef4fb; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.55); }
.btn-ghost:hover { background: rgba(255,255,255,0.12); }

/* In-form primary button uses brand fill */
#access .btn-primary,
#submit-btn {
  background: var(--brand);
  color: #fff;
  width: 100%;
  margin-top: 8px;
}
#submit-btn:hover { background: #0a4f95; }
#submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Sections */
.section { padding: 56px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* Preview */
.preview { margin: 0; }
.preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 280px;
  background: repeating-linear-gradient(45deg, #eef1f5, #eef1f5 12px, #e7ebf1 12px, #e7ebf1 24px);
  border: 1px dashed #c3ccd8;
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  padding: 24px;
}
.preview-placeholder span { font-weight: 600; font-size: 1.05rem; }
.preview-placeholder small { max-width: 360px; }
.preview-placeholder code { background: #dde3ea; padding: 1px 5px; border-radius: 4px; }
figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 10px; text-align: center; }

/* Interactive preview embed */
.preview-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: #0b1622;
}
.preview-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.preview-fallback { margin-top: 12px; font-size: 0.92rem; }
.preview-fallback a { font-weight: 600; }

/* Coverage gallery */
.coverage-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 1em 0 1.5em;
}
.coverage-gallery figure { margin: 0; }
.coverage-gallery img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: #0b1622;
}

/* Format list */
.format-list { padding-left: 1.2em; }
.format-list li { margin: 0.35em 0; }

/* Credits */
.credits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 1.5em 0;
}
.credits div { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.credits dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
.credits dd { margin: 4px 0 0; font-weight: 500; }
.links { margin-top: 1.2em; }
.links a { font-weight: 600; }
.links span { margin: 0 8px; color: var(--muted); }
.license-note { margin-top: 1em; font-size: 0.92rem; color: var(--muted); }

/* Citation */
blockquote.citation {
  margin: 0.6em 0 1em;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  font-size: 0.95rem;
}
blockquote.citation a { word-break: break-all; }
details.bibtex { margin-bottom: 0.5em; }
details.bibtex summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--brand);
  width: fit-content;
}
details.bibtex pre {
  margin: 10px 0 0;
  padding: 14px 16px;
  background: #0b1622;
  color: #e6edf3;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.5;
}
details.bibtex code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; }

/* Form */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field input[type="text"],
.field input[type="email"],
.field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
  color: var(--text);
  background: #fff;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(11, 92, 173, 0.15);
}
.field textarea { resize: vertical; }
.field-check { display: flex; gap: 10px; align-items: flex-start; }
.field-check input { margin-top: 5px; flex: 0 0 auto; }
.field-check label { font-weight: 400; margin: 0; }
.req { color: #c0392b; }

.form-status { margin-top: 14px; min-height: 1.2em; font-weight: 500; }
.form-status.error { color: #c0392b; }
.form-status.success { color: var(--accent); }

/* Downloads */
.thanks { color: var(--accent); font-weight: 600; }
.download-list { list-style: none; padding: 0; margin: 1.4em 0 0; display: grid; gap: 12px; }
.download-list li {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.download-list .dl-title { font-weight: 600; display: block; }
.download-list .dl-note { color: var(--muted); font-size: 0.9rem; display: block; margin: 2px 0 10px; }
.download-list a.dl-link {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
}
.download-list a.dl-link:hover { background: #0a4f95; }

.cite-note {
  margin-top: 22px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--muted);
}
.cite-note strong { color: var(--text); }

/* Footer */
.footer { padding: 32px 0; background: #0b1622; color: #aeb9c7; font-size: 0.9rem; }
.footer p { margin: 0; }
.footer-links { margin-top: 10px; }
.footer-links a { color: #9cc4ec; font-weight: 600; }
.footer-links span { margin: 0 8px; opacity: 0.6; }

/* Responsive */
@media (max-width: 600px) {
  .hero { padding: 60px 0 50px; }
  .hero h1 { font-size: 2rem; }
  .section { padding: 40px 0; }
}
