/*
  Estudio Elyse
  Layout: every page is at least one window tall: header, content, pomegranate.
  Widths follow the Figma artboard (4880 units wide, --u) so the header keeps
  the mockup's proportions. Heights follow the window, so the home page photos
  fill whatever screen they are on.
*/
:root {
  --paper: #ffffff;
  --ink: #000000;
  --umber: #463620;            /* the logo's brown, used for focus rings */
  --serif: Georgia, Gelasio, "Times New Roman", Times, serif;

  --u: calc(100vw / 4880);     /* one Figma unit */
  --gutter: calc(680 * var(--u));

  --head-top: clamp(16px, 3vh, 48px);       /* space above the header */
  --strip-top: clamp(24px, 5vh, 80px);      /* space between header and photos */
  --mark: clamp(48px, 9vh, 120px);          /* pomegranate width */
  --mark-top: clamp(10px, 2vh, 32px);
  --mark-bottom: clamp(12px, 2.5vh, 40px);

  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  line-height: normal;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

a:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--umber);
  outline-offset: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wrap {
  padding-left: max(16px, var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(16px, var(--gutter), env(safe-area-inset-right, 0px));
}

/* ---------- Page frame ---------- */

.page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 100vh;
  min-height: 100svh;
}

/* The home page is exactly one window tall; the photos take the space left. */
.page--home {
  height: 100vh;
  height: 100svh;
  min-height: 400px;
}

/* ---------- Header ---------- */

.site-header {
  padding-block: var(--head-top) 0;
}

.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.nav-about {
  justify-self: start;
}

.nav-contact {
  justify-self: end;
}

.nav-link {
  font-size: max(12px, calc(60 * var(--u)));
  text-transform: uppercase;
  text-decoration: none;
  text-underline-offset: 0.25em;
  text-decoration-thickness: 1px;
}

.nav-link:hover {
  text-decoration-line: underline;
}

.logo img {
  width: calc(1336 * var(--u));
  height: auto;
}

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

.site-footer {
  display: flex;
  justify-content: center;
  padding-block: var(--mark-top) var(--mark-bottom);
}

.mark img {
  width: var(--mark);
  height: auto;
}

/* ---------- Home: scrolling photo strip ---------- */

.home {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  padding-top: var(--strip-top);
}

.strip {
  flex: none;
  display: flex;
  gap: clamp(10px, calc(68 * var(--u)), 40px);
  /* fill the space, but never so tall that one photo is wider than the screen */
  height: min(100%, 127vw);
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

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

.strip.is-dragging {
  cursor: grabbing;
}

.strip:focus-visible {
  outline-offset: -2px;
}

.strip img {
  flex: none;
  height: 100%;
  width: auto;
  max-width: none;
  -webkit-user-drag: none;
}

/* ---------- About ---------- */

.about {
  align-self: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr) calc(875 * var(--u));
  column-gap: calc(147 * var(--u));
  align-items: center;                 /* text sits centered beside the photo */
  padding-block: clamp(24px, 5vh, 96px);
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 1.14em;
  font-size: max(16px, calc(80 * var(--u)));
  line-height: 1.14;
}

.about-text p {
  margin: 0;
}

.about-photo {
  margin: 0;
}

.about-photo img {
  width: 100%;
  height: auto;
}

/* ---------- Contact ---------- */

.contact {
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(283 * var(--u));
  padding-block: clamp(24px, 5vh, 96px);
  text-align: center;
}

.contact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(59 * var(--u));
  margin: 0;
}

.contact-label {
  font-size: max(11px, calc(40 * var(--u)));
  text-transform: uppercase;
}

.contact-value {
  margin: 0;
  font-size: max(18px, calc(80 * var(--u)));
}

.contact-value a {
  text-underline-offset: 0.12em;
  text-decoration-thickness: 1px;
}

.contact-value a.plain {
  text-decoration-line: none;
}

.contact-value a.plain:hover {
  text-decoration-line: underline;
}

/* ---------- Phones ---------- */

@media (max-width: 720px) {
  :root {
    --gutter: 20px;
    --head-top: 44px;
    --strip-top: 32px;     /* also the space above the About photo, so both line up */
    --mark: 45px;
    --mark-top: 16px;
    --mark-bottom: 24px;
  }

  .nav {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "logo logo"
      "about contact";
    row-gap: 32px;
  }

  .logo {
    grid-area: logo;
    justify-self: center;
  }

  .logo img {
    width: min(78vw, 340px);
  }

  .nav-about {
    grid-area: about;
  }

  .nav-contact {
    grid-area: contact;
  }

  .nav-link {
    font-size: 13px;
  }

  /* photos start right under the header, at the same height as the About photo,
     and the pomegranate follows them with the same space as above the photos */
  .home {
    justify-content: flex-start;
  }

  .page--home {
    grid-template-rows: auto auto minmax(0, 1fr);
  }

  .page--home .strip {
    height: clamp(280px, calc(100vh - 255px), 127vw);
    height: clamp(280px, calc(100svh - 255px), 127vw);
  }

  .page--home .site-footer {
    align-items: flex-start;
    padding-top: var(--strip-top);
  }

  .about {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 32px;
    padding-block: var(--strip-top) 24px;
  }

  .about-text {
    font-size: 17px;
    line-height: 1.45;
    gap: 1em;
  }

  /* photo first on phones */
  .about-photo {
    order: -1;
    max-width: 420px;
  }

  .contact {
    gap: 56px;
    padding-block: 56px;
  }

  .contact-item {
    gap: 12px;
  }

  .contact-label {
    font-size: 12px;
  }

  .contact-value {
    font-size: 22px;
  }
}
