/* Egypt: Hieroglyphics Scanner — egypt.babala.ch
   One stylesheet, no frameworks, no external fonts, no scripts. */

:root {
  --sand:        #F7EFD9;
  --sand-deep:   #EBD9B4;
  --lapis:       #1C3873;
  --lapis-deep:  #0D1A3D;
  --gold:        #B8860B;

  --bg:          var(--sand);
  --bg-alt:      var(--sand-deep);
  --card:        #FFFBF1;
  --text:        #22201A;
  --text-soft:   #5A5344;
  --heading:     var(--lapis-deep);
  --accent:      var(--lapis);
  --accent-soft: #3A5B9E;
  --rule:        #D8C49A;
  --shadow:      0 1px 3px rgba(13, 26, 61, .10), 0 8px 24px rgba(13, 26, 61, .07);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 62rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:          var(--lapis-deep);
    --bg-alt:      #132450;
    --card:        #16295A;
    --text:        #EFE6D0;
    --text-soft:   #BDB299;
    --heading:     var(--sand);
    --accent:      #D8AE3C;
    --accent-soft: #9EB6E6;
    --rule:        #2C427C;
    --shadow:      0 1px 3px rgba(0, 0, 0, .35), 0 10px 28px rgba(0, 0, 0, .28);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--heading);
  line-height: 1.2;
  margin: 0 0 .5em;
  font-weight: 600;
}

h1 { font-size: clamp(2rem, 5.2vw, 3rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

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

@media (prefers-color-scheme: dark) {
  a:hover { color: #F0D98A; }
}

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

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

hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--card);
  padding: .6rem 1rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

/* ---------- header ---------- */

.site-head {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
}

.site-head .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1.25rem;
  padding-top: .9rem;
  padding-bottom: .9rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--heading);
  text-decoration: none;
  margin-right: auto;
}
.brand img { width: 34px; height: 34px; border-radius: 8px; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.1rem;
  font-size: .95rem;
}
.site-nav a { text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  border-bottom: 1px solid var(--rule);
  background: var(--bg-alt);
  overflow: hidden;
}

.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .9;
}

/* scrim, so the headline stays readable on top of the illustration */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(247, 239, 217, .62) 0%,
    rgba(247, 239, 217, .86) 55%,
    rgba(235, 217, 180, .94) 100%);
}

@media (prefers-color-scheme: dark) {
  .hero-art { opacity: .8; }
  .hero::after {
    background: linear-gradient(180deg,
      rgba(13, 26, 61, .66) 0%,
      rgba(13, 26, 61, .88) 55%,
      rgba(13, 26, 61, .95) 100%);
  }
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: 3.5rem 1.25rem 3rem;
  text-align: center;
}

.hero-icon {
  width: 112px;
  height: 112px;
  border-radius: 25%;
  margin: 0 auto 1.25rem;
  box-shadow: var(--shadow);
}

.pitch {
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  color: var(--text);
  max-width: 34rem;
  margin: 0 auto 1.75rem;
}

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .75rem;
  font-weight: 700;
  color: var(--gold);
  margin: 0 0 .75rem;
}

@media (prefers-color-scheme: dark) {
  .eyebrow { color: #D8AE3C; }
}

.btn {
  display: inline-block;
  background: var(--lapis);
  color: #FFF8E6;
  font-weight: 600;
  text-decoration: none;
  padding: .85rem 1.6rem;
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.btn:hover { background: var(--lapis-deep); color: #FFF8E6; }
/* the same shape as the download button, but plainly not a link yet */
.btn-soon { cursor: default; opacity: .72; }
.btn-soon:hover { background: var(--lapis); }

@media (prefers-color-scheme: dark) {
  .btn { background: var(--gold); color: #1A1204; }
  .btn:hover { background: #D8AE3C; color: #1A1204; }
}

.btn-note {
  font-size: .85rem;
  color: var(--text);
  margin: .9rem 0 0;
}

/* ---------- sections ---------- */

section { padding: 3rem 0; }
section + section { border-top: 1px solid var(--rule); }

.lede { font-size: 1.1rem; max-width: 42rem; }

.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  margin-top: 1.5rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .35rem; }
.card p:last-child { margin-bottom: 0; }

.split {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 46rem) {
  .split { grid-template-columns: 1.1fr 1fr; }
  .split.flip > :first-child { order: 2; }
}

.figure {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
}
.figure.portrait { max-width: 17rem; margin-inline: auto; }

.figure figcaption {
  font-size: .82rem;
  color: var(--text-soft);
  padding: .55rem .8rem;
  background: var(--bg-alt);
}

.note {
  border-left: 4px solid var(--gold);
  background: var(--card);
  border-radius: 0 10px 10px 0;
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
}
.note p:last-child { margin-bottom: 0; }
.note h2 { margin-top: 0; }
.note strong { color: var(--heading); }

.facts {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: grid;
  gap: .9rem;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
}
.facts li {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: .9rem 1rem;
  text-align: center;
}
.facts b {
  display: block;
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--accent);
  line-height: 1.1;
}
.facts span { font-size: .85rem; color: var(--text-soft); }

ul.ticks { list-style: none; padding: 0; margin: 1rem 0; }
ul.ticks li {
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: .6rem;
}
ul.ticks li::before {
  content: "\2022";
  position: absolute;
  left: .35rem;
  color: var(--gold);
  font-weight: 700;
}

/* ---------- screenshots ---------- */

.shots {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding: .5rem .25rem 1.25rem;
  scroll-snap-type: x mandatory;
}
.shots figure {
  margin: 0;
  flex: 0 0 auto;
  width: min(15rem, 62vw);
  scroll-snap-align: center;
}
.shots img {
  border-radius: 16px;
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
}
.shots figcaption {
  font-size: .85rem;
  color: var(--text-soft);
  margin-top: .6rem;
  text-align: center;
}

/* ---------- language list ---------- */

.langs {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: 0;
  margin: 1.25rem 0 0;
}
.langs li {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: .3rem .9rem;
  font-size: .9rem;
}

/* ---------- text pages ---------- */

.page { padding: 2.5rem 0 3rem; }
.page h2 { margin-top: 2.2rem; }
.page h3 { margin-top: 1.6rem; }
.page dl { margin: 0; }
.page dt {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--heading);
  margin-top: 1.5rem;
  font-weight: 600;
}
.page dd { margin: .4rem 0 0; }
.page address {
  font-style: normal;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  display: inline-block;
}

.langswitch {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: .95rem;
  padding: .75rem 0 0;
  margin: 0 0 1rem;
  list-style: none;
}

.updated { font-size: .88rem; color: var(--text-soft); }

/* ---------- footer ---------- */

.site-foot {
  border-top: 1px solid var(--rule);
  background: var(--bg-alt);
  padding: 2.5rem 0;
  font-size: .92rem;
}
.site-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  margin-bottom: 1rem;
}
.site-foot p { color: var(--text-soft); margin-bottom: .4rem; }
