/* Geosphere theme: two browns and grey, simple square boxes.
   Change a color in the block below and every geosphere page changes with it. */

:root {
  --brown: #563D2D;       /* dark brown */
  --tan: #AF804F;         /* lighter brown (planned to change) */
  --grey: #808080;        /* grey outline for the navigation buttons */
  --grey-light: #BDBDBD;  /* grey fill for the navigation buttons */
  --text: #2B1D12;        /* text on the tan boxes */
}

html {
  background: #FFFFFF;
  -webkit-text-size-adjust: 100%;   /* stops phones from enlarging text */
  text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 8px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  line-height: 1.5;
}

/* full-screen background photo */
#bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  z-index: -1;
}

img { max-width: 100%; height: auto; }

/* title picture at the top of the page */
.header { display: block; margin: 8px auto 16px; width: 60%; max-width: 400px; }

/* square box with a thin border: a dark brown box with a tan box inside it.
   Add "rev" to swap the colors. Add "clear" for a see-through box with no border. */
.box {
  box-sizing: border-box;
  width: 75%;
  margin: 16px auto;
  padding: 12px;
  background: var(--brown);
  border: 4px solid var(--grey);
}
.box .inner {
  padding: 10px 14px;
  background: var(--tan);
  color: var(--text);
  text-align: center;
}
.box .inner.light { color: #FFFFFF; font-weight: bold; }
.box .inner.empty { min-height: 5em; }
.box.rev { background: var(--tan); border: 0; }
.box.rev .inner { background: var(--brown); color: #FFFFFF; border: 4px solid var(--grey); }
.inner p { margin: 6px 0; }
.inner h2 { margin: 0 0 8px; font-size: 1.6em; }

/* tan bar, for the footer */
.bar {
  box-sizing: border-box;
  width: 90%;
  margin: 16px auto;
  padding: 12px;
  background: var(--tan);
  text-align: center;
}

.box.clear,
.bar.clear { background: transparent; border: 0; }

/* image buttons in a row, 3 across */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 80%;
  margin: 16px auto;
}
.grid a { display: block; }
.grid img { display: block; width: 100%; }

/* spinning globe home button */
.globe { display: block; margin: 0 auto; width: 110px; border-radius: 50%; }

/* page shown inside an iframe: tan behind the box, box fills the width */
html.frame { background: var(--tan); }
html.frame .box { width: 100%; }

/* two-column information table: heading on the left, text on the right.
   On narrow screens (phones) each heading sits above its text. */
.info { width: 100%; border-collapse: collapse; text-align: left; border: 4px solid var(--brown); }
.info th,
.info td { padding: 10px 12px; vertical-align: top; text-align: left; border-bottom: 1px solid var(--brown); }
.info th { width: 25%; font-size: 1.1em; }
.info tr:last-child th,
.info tr:last-child td { border-bottom: none; }
@media (max-width: 600px) {
  .info, .info tbody, .info tr, .info th, .info td { display: block; width: 100%; box-sizing: border-box; }
  .info th { padding-bottom: 0; }
  .info td { padding-top: 4px; }
}

/* phones: wider boxes, smaller text, so the intro doesn't fill the screen */
@media (max-width: 600px) {
  .box, .bar { width: 96%; }
  .box { padding: 8px; }
  .box .inner { padding: 8px 10px; font-size: 0.82em; line-height: 1.35; }
  .inner h2 { font-size: 1.3em; }
  .inner p { margin: 4px 0; }
  .grid { width: 92%; gap: 10px; }
}

/* wider box, for pages that need more room (like the geophysics viewer) */
.box.wide { width: 80%; }

/* intro lines that shouldn't be bold */
.box .inner.normal { font-weight: normal; }

/* window that shows another page (the geophysics viewer) */
.viewer { display: block; width: 100%; height: 70vh; min-height: 360px; border: 0; background: var(--tan); }

/* basic grey navigation buttons, centered under the viewer */
.nav { display: flex; justify-content: center; gap: 24px; margin: 12px auto; }
.nav button {
  width: 130px;
  padding: 10px 0;
  font-size: 1em;
  color: #222222;
  background: var(--grey-light);
  border: 2px solid var(--grey);
  cursor: pointer;
}
.nav button:hover { background: #D6D6D6; }

/* Back link with its picture */
.back { display: block; text-decoration: none; color: var(--text); font-weight: bold; }
.back img { display: block; margin: 0 auto 6px; width: 60%; max-width: 240px; }

/* image buttons, 4 across */
.grid.four { grid-template-columns: repeat(4, 1fr); }

/* phones: the four image buttons go two across, two rows */
@media (max-width: 600px) {
  .grid.four { grid-template-columns: repeat(2, 1fr); }
}
