/* ==========================================================
   Ellie Howard — homepage (menu overlay)
   Layout is measured from a 1906px-wide reference screenshot
   and expressed in vw so it scales proportionally.
   ========================================================== */

:root {
  --bg: #f4f4f4;
  --teal: #004750;
  --teal-faded: #a8bec1;
  --footer-bg: #004750;
  --footer-text: #f4f4f4;

  /* Font stack: replace with the real typeface once known (see README) */
  --serif: "Times New Roman", Times, "Liberation Serif", "Nimbus Roman", serif;

  --footer-h: 5.67vw;
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--teal);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }

/* ---------- Stage (everything above the footer) ---------- */

.stage {
  position: relative;
  height: max(70.1vw, calc(100svh - var(--footer-h)));
  overflow: hidden;
}

.site-title {
  position: absolute;
  left: 1.8vw;
  top: 0.25vw;
  margin: 0;
  font-weight: 400;
  font-size: 5.86vw;
  line-height: 1.15;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.close {
  position: absolute;
  top: 1.65vw;
  right: 1.9vw;
  width: 4.5vw;
  height: 4.5vw;
  display: block;
}
.close svg { width: 100%; height: 100%; display: block; }

/* ---------- Menu items ---------- */

.tile {
  position: absolute;
  margin: 0;
  display: block;
  width: 23.5vw;
}

.tile img {
  display: block;
  width: 100%;
  height: 21.85vw;
  object-fit: cover;
}

.tile figcaption,
.tile .label {
  display: block;
  margin-top: 0.2vw;
  font-size: 1.9vw;
  line-height: 1.2;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}

.tile--about      { left: 14.85vw; top: 17.94vw; }
.tile--about img  { object-position: 40% 50%; }

.tile--publishing      { left: 64.06vw; top: 7.03vw; }
.tile--publishing .label { text-align: right; }
.tile--publishing img  { object-position: 62% 50%; }

.tile--writing      { left: 55.46vw; top: 39.98vw; }
.tile--writing img  { object-position: 50% 50%; }

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  height: var(--footer-h);
  background: var(--footer-bg);
  color: var(--footer-text);
  font-size: 1.55vw;
}

.site-footer a,
.site-footer span {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  line-height: 1;
}
.site-footer .footer-instagram { left: 1.15vw; }
.site-footer .footer-email     { left: 17.4vw; }

/* ---------- Fade-in on load (only when JS is available) ---------- */

.js .reveal {
  opacity: 0;
}
.js.is-ready .reveal {
  animation: fade-in 1.9s ease forwards;
  animation-delay: var(--d, 0s);
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; }
  .js.is-ready .reveal { animation: none; }
}

/* ==========================================================
   Mobile — the Readymag mobile version was not usable as a
   reference, so this is a clean stacked version of the same
   look (same fonts, colours, scattered-image feel).
   ========================================================== */

@media (max-width: 700px) {
  :root { --footer-h: 18vw; }

  .stage {
    height: auto;
    min-height: calc(100svh - var(--footer-h));
    padding-bottom: 12vw;
  }

  .site-title {
    position: relative;
    left: auto; top: auto;
    margin: 4vw 4vw 0;
    font-size: 12.5vw;
    line-height: 1.1;
    white-space: normal;
    max-width: 72vw;
  }

  .close {
    top: 5vw;
    right: 4.5vw;
    width: 10vw;
    height: 10vw;
  }

  .tile {
    position: relative;
    left: auto; top: auto;
    width: 64vw;
    margin-top: 11vw;
  }
  .tile img { height: 59vw; }
  .tile figcaption,
  .tile .label { font-size: 5.4vw; margin-top: 2vw; }

  .tile--about      { margin-left: 4vw; margin-top: 14vw; }
  .tile--publishing { margin-left: auto; margin-right: 4vw; }
  .tile--writing    { margin-left: 4vw; }

  .site-footer { font-size: 4.6vw; }
  .site-footer .footer-instagram { left: 4vw; }
  .site-footer .footer-email     { left: auto; right: 4vw; }
}

/* ==========================================================
   Inner pages: About, Selected Text (writing), Publishing
   Measured from 1906px-wide screenshots, in vw.
   ========================================================== */

.page {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
.page > main { flex: 1 0 auto; position: relative; }

.page-head {
  position: relative;
  height: 7.87vw;
  border-bottom: 0.16vw solid var(--teal);
}
.page-head .site-title { z-index: 2; }
.page-head .close { z-index: 3; }

/* Orange tab that switches between Selected Text and Publishing */
.tab {
  position: absolute;
  top: 0;
  right: 0;
  width: 50.95vw;
  height: 7.7vw;
  background: #ee553b;
}
.tab a {
  position: absolute;
  left: 2vw;
  top: 0.25vw;
  font-size: 5.86vw;
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: #0483f9;
  text-decoration: underline;
  text-decoration-thickness: 0.1vw;
  text-underline-offset: 0.55vw;
  white-space: nowrap;
}

/* List rows */
.entries { list-style: none; margin: 0; padding: 0; }
.entry {
  padding: 0.9vw 1.94vw;
  border-bottom: 0.16vw solid var(--teal);
  font-size: 3.5vw;
  line-height: 3.9vw;
  letter-spacing: -0.03em;
}
.entry p { margin: 0; }
.entry a {
  color: #0483f9;
  text-decoration: underline;
  text-decoration-thickness: 0.08vw;
  text-underline-offset: 0.45vw;
}
.entry em { font-style: italic; }

/* Footer variants */
.site-footer--dark {
  height: 5.46vw;
  font-size: 1.36vw;
  flex: 0 0 auto;
}
.site-footer--dark .footer-instagram { left: 1.94vw; }

.site-footer--light {
  height: 5.67vw;
  background: var(--bg);
  color: var(--teal);
  border-top: 0.16vw solid var(--teal);
  font-size: 1.5vw;
  flex: 0 0 auto;
}
.site-footer--light .footer-instagram { left: 1.94vw; }
.site-footer--light .footer-email { left: 21.1vw; color: #282828; }

/* About page has no rule under the header */
.page--about .page-head { border-bottom: 0; }

/* About text */
.about {
  position: relative;
  min-height: 64.43vw;
  font-size: 1.13vw;
  line-height: 2.15vw;
  letter-spacing: -0.035em;
}
.about p { margin: 0; }
.about-col { position: absolute; }
.about-col--left  { left: 2.36vw; top: 2.33vw; width: 44vw; }
.about-col--right { left: 50.8vw; top: 8.53vw; width: 46.4vw; }
.about-col p + p { margin-top: 2.15vw; }
.about-col--left p:nth-child(2) { margin-top: 3.67vw; }

@media (max-width: 700px) {
  .page-head { height: auto; padding: 4vw 4vw 0; border-bottom: 0.6vw solid var(--teal); }
  .page-head .site-title {
    position: static;
    margin: 0 0 3vw;
    max-width: 70vw;
    font-size: 11.5vw;
  }
  .page-head .close { top: 4.5vw; right: 4.5vw; width: 10vw; height: 10vw; }

  .tab {
    position: static;
    width: auto;
    height: auto;
    margin: 0 -4vw;
    padding: 2.5vw 4vw;
  }
  .tab a {
    position: static;
    display: inline-block;
    font-size: 9vw;
    text-underline-offset: 1.2vw;
    text-decoration-thickness: 0.4vw;
  }

  .entry {
    padding: 3.5vw 4vw;
    border-bottom-width: 0.6vw;
    font-size: 6.4vw;
    line-height: 7.6vw;
  }
  .entry a { text-underline-offset: 1vw; text-decoration-thickness: 0.3vw; }

  .site-footer--dark { height: 15vw; font-size: 4.4vw; }
  .site-footer--dark .footer-instagram { left: 4vw; }

  .page--about .page-head { padding-bottom: 2vw; }
  .about { min-height: 0; font-size: 4.9vw; line-height: 7.4vw; letter-spacing: -0.02em; padding: 6vw 4vw 10vw; }
  .about-col { position: static; width: auto; }
  .about-col--right { margin-top: 7.4vw; }
  .about-col p + p, .about-col--left p:nth-child(2) { margin-top: 7.4vw; }

  .site-footer--light { height: 18vw; font-size: 4.6vw; border-top-width: 0.6vw; }
  .site-footer--light .footer-instagram { left: 4vw; }
  .site-footer--light .footer-email { left: auto; right: 4vw; }
}
