/*
 * purioapp.com, before the product opens there.
 *
 * Built from the founder's design reference: Purio's dark forest green, the
 * editorial serif headline with one orange accent, the photographs in their
 * organic frames, and the quiet rules above and below. Three layouts, not one
 * shrunk: a single column on phones, a wider single column on tablets, and the
 * reference's two-part composition from 1024px.
 */

@font-face {
  font-family: 'Purio Display';
  src: url('/fonts/purio-display-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Poppins';
  src: url('/fonts/poppins-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Poppins';
  src: url('/fonts/poppins-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;

  --green: #03241a;
  --green-deep: #011a10;
  --green-lift: #0a3626;
  --cream: #f7f5f1;
  --cream-soft: rgb(247 245 241 / 0.88);
  --cream-muted: rgb(247 245 241 / 0.7);
  --accent: #f2a74b;
  --sage-line: rgb(181 206 160 / 0.55);
  --rule: rgb(143 183 156 / 0.34);

  --gutter: clamp(1.25rem, 7.5vw, 9rem);
  --logo-h: clamp(2.25rem, 4.3vw, 5.25rem);
  --masthead-pad: clamp(0.875rem, 1.3vw, 1.75rem);
  --masthead-h: calc(var(--logo-h) + 2 * var(--masthead-pad) + 1px);
  --colophon-h: clamp(4.75rem, 6.4vw, 8rem);
}

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

html {
  background: var(--green-deep);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  color: var(--cream);
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  background:
    radial-gradient(90% 70% at 100% 0%, rgb(10 54 38 / 0.9), transparent 70%),
    radial-gradient(60% 50% at 0% 100%, rgb(1 22 13 / 0.9), transparent 75%),
    linear-gradient(180deg, #042a1c 0%, #022116 48%, #011c12 100%);
  background-color: var(--green);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.page {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100svh;
  overflow-x: clip;
}

/* ── Header ─────────────────────────────────────────────────────────────── */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: var(--masthead-pad) var(--gutter);
  border-bottom: 1px solid var(--rule);
}

.logo {
  display: block;
  width: auto;
  height: var(--logo-h);
  flex: none;
}

.masthead__tools {
  display: flex;
  align-items: center;
  gap: clamp(0.875rem, 2.2vw, 2.75rem);
}

.languages ul {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: clamp(0.9375rem, 0.85rem + 0.35vw, 1.25rem);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.languages li + li::before {
  content: '/' / '';
  margin: 0 0.35em;
  color: var(--cream-muted);
  font-weight: 400;
}

.languages a {
  display: inline-block;
  padding: 0.5rem 0.35rem;
  color: var(--cream-muted);
  text-decoration: none;
}

.languages a[aria-current='page'] {
  color: var(--cream);
}

.languages a:hover {
  color: var(--cream);
  text-decoration: underline;
  text-underline-offset: 0.35em;
}

.masthead__rule {
  width: 1px;
  height: clamp(1.75rem, 2.6vw, 3.25rem);
  background: var(--rule);
}

.masthead__social {
  display: inline-flex;
  color: var(--cream);
}

.masthead__social .icon {
  width: clamp(1.5rem, 1.25rem + 0.9vw, 2.25rem);
  height: auto;
}

.icon {
  display: block;
  flex: none;
}

/* ── Hero ───────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  isolation: isolate;
}

.hero__text {
  position: relative;
  z-index: 2;
  padding: clamp(2.25rem, 9vw, 4.5rem) var(--gutter) 0;
}

.hero__title {
  max-width: 9.6em;
  margin: 0;
  font-family: 'Purio Display', Georgia, 'Times New Roman', serif;
  font-size: clamp(2.6rem, 1.4rem + 5.4vw, 4.75rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero__accent {
  color: var(--accent);
}

.hero__lede {
  max-width: 30em;
  margin: clamp(1.25rem, 3vw, 2rem) 0 0;
  color: var(--cream-soft);
  font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.375rem);
  line-height: 1.6;
  text-wrap: pretty;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.75em;
  margin: clamp(1.75rem, 4vw, 2.5rem) 0 0;
  padding: 0.9em 1.5em;
  border: 1px solid var(--sage-line);
  border-radius: 999px;
  background: rgb(3 36 26 / 0.6);
  font-size: clamp(0.8125rem, 0.75rem + 0.3vw, 1rem);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.status__dot {
  width: 0.55em;
  height: 0.55em;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0.3em rgb(242 167 75 / 0.16);
}

.hero__art {
  position: relative;
  z-index: 1;
  margin-top: clamp(2rem, 7vw, 3.5rem);
}

.hero__art picture {
  display: block;
}

.hero__image {
  display: block;
  width: 100%;
  height: auto;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 5%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 5%);
}

.flourish {
  display: none;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

.colophon {
  position: relative;
  padding: 1.5rem var(--gutter) 2rem;
  border-top: 1px solid var(--rule);
  overflow: hidden;
}

.colophon__items {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.colophon__item {
  display: inline-flex;
  align-items: center;
  gap: 0.85em;
  padding: 0.45rem 0;
  color: var(--cream-soft);
  font-size: clamp(0.9375rem, 0.88rem + 0.3vw, 1.25rem);
  text-decoration: none;
}

.colophon__item .icon {
  width: 1.55em;
  height: 1.55em;
  color: var(--cream);
}

a.colophon__item:hover {
  color: var(--cream);
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.colophon__leaf {
  position: absolute;
  right: -1rem;
  bottom: -0.5rem;
  width: clamp(7rem, 12vw, 15rem);
  height: auto;
  opacity: 0.8;
}

/* ── Tablet ─────────────────────────────────────────────────────────────── */

@media (min-width: 640px) {
  .colophon__items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 2.5rem;
  }
}

/* ── Desktop: the reference's composition ───────────────────────────────── */

@media (min-width: 1024px) {
  .hero {
    /* The photographs start at 42.7% of the width, as in the reference, and
       the words run on over their faded left edge to 48%. */
    grid-template-columns: 42.7% 5.3% minmax(0, 1fr);
    align-content: stretch;
  }

  .hero__text {
    grid-row: 1;
    grid-column: 1 / 3;
    align-self: center;
    padding: clamp(2rem, 5vh, 4rem) 0 clamp(2rem, 5vh, 4rem) var(--gutter);
  }

  .hero__title {
    font-size: clamp(3.25rem, 5.4vw, 8rem);
    line-height: 1.02;
    text-wrap: wrap;
  }

  /* The Lithuanian line is longer; a slightly smaller size keeps it to the
     reference's three lines. */
  .hero__title:lang(lt) {
    font-size: clamp(2.875rem, 4.75vw, 7rem);
  }

  .hero__lede {
    /* Ends before the photographs' leaf, at the edge of the first column. */
    max-width: min(25em, calc(42.7vw - var(--gutter) - 1.5rem));
    font-size: clamp(1.0625rem, 1.4vw, 1.75rem);
  }

  .status {
    font-size: clamp(0.8125rem, 0.95vw, 1.1875rem);
  }

  .hero__art {
    grid-row: 1;
    grid-column: 2 / 4;
    align-self: end;
    margin: 0;
  }

  .hero__image {
    /* As wide as its columns, unless the window is too short for that. */
    width: min(100%, calc((100svh - var(--masthead-h) - var(--colophon-h)) * 2200 / 1641));
    margin-left: auto;
    -webkit-mask-image:
      linear-gradient(to right, transparent 0, #000 10%),
      linear-gradient(to bottom, transparent 0, #000 4%);
    -webkit-mask-composite: source-in;
    mask-image:
      linear-gradient(to right, transparent 0, #000 10%),
      linear-gradient(to bottom, transparent 0, #000 4%);
    mask-composite: intersect;
  }

  .flourish {
    position: absolute;
    display: block;
    pointer-events: none;
  }

  .flourish--line {
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    color: var(--sage-line);
  }

  .flourish--leaves {
    left: 0;
    bottom: 0;
    z-index: 0;
    width: 14.6vw;
    height: auto;
  }

  .colophon {
    display: flex;
    align-items: center;
    min-height: var(--colophon-h);
    padding-block: 1rem;
  }

  .colophon__items {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    width: 100%;
    gap: 0;
  }

  .colophon__items li {
    display: flex;
    justify-content: center;
    padding: 0 1rem;
  }

  .colophon__items li:first-child {
    justify-content: flex-start;
    padding-left: 0;
  }

  .colophon__items li:last-child {
    justify-content: flex-end;
    padding-right: clamp(2rem, 4vw, 6rem);
  }

  .colophon__items li + li {
    border-left: 1px solid var(--rule);
  }

  .colophon__item {
    font-size: clamp(0.875rem, 0.25rem + 0.95vw, 1.25rem);
    white-space: nowrap;
  }

  .colophon__leaf {
    right: 0;
    bottom: 0;
  }
}

/* ── Not found ──────────────────────────────────────────────────────────── */

.page--plain {
  grid-template-rows: auto 1fr;
}

.missing {
  align-self: center;
  padding: clamp(2.5rem, 8vw, 6rem) var(--gutter);
}

.missing__title {
  margin: 0 0 0.5em;
  font-family: 'Purio Display', Georgia, 'Times New Roman', serif;
  font-size: clamp(2.25rem, 1.5rem + 3vw, 4.5rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.missing__link {
  display: block;
  width: fit-content;
  margin-top: 0.35em;
  color: var(--accent);
  text-underline-offset: 0.3em;
}

/* ── Motion, only for those who have not asked for less ────────────────── */

@media (prefers-reduced-motion: no-preference) {
  .status__dot {
    animation: breathe 3.2s ease-in-out infinite;
  }

  @keyframes breathe {
    0%,
    100% {
      box-shadow: 0 0 0 0.3em rgb(242 167 75 / 0.16);
    }

    50% {
      box-shadow: 0 0 0 0.55em rgb(242 167 75 / 0.05);
    }
  }
}

@media (forced-colors: active) {
  .status {
    border-color: CanvasText;
  }
}
