/* ==========================================================================
   LENS, inc.

   One screen. The type carries the page; the brand circle is punctuation —
   the period that closes "Design." Never blown up into a background shape.

   Grid: everything hangs off a single left margin and a hairline baseline
   at the foot of the page, like a title page.
   ========================================================================== */

:root {
  --paper: #f4f2ee;
  --ink: #17171a;
  --ink-mid: #6d6d75;
  --ink-faint: #a3a29c;
  --accent: #f2971b;
  --rule: rgba(23, 23, 26, 0.16);

  --display: "Instrument Serif", "Times New Roman", serif;
  --sans: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans",
    "Yu Gothic", sans-serif;

  --pad: clamp(24px, 4.2vw, 64px);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.8;
  font-feature-settings: "palt" 1;
  -webkit-font-smoothing: antialiased;
}

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

:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 4px;
}

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

.frame {
  min-height: 100svh;
  padding: var(--pad);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: clamp(32px, 4.5vw, 56px);
}

/* -------------------------------------------------------------- masthead */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand img {
  width: auto;
  height: 26px;
  /* the wordmark ships white — flip it for the light ground */
  filter: invert(1);
}

.masthead-meta {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mid);
}

.masthead-meta .sep {
  padding-inline: 0.7em;
  color: var(--ink-faint);
}

/* ----------------------------------------------------------------- stage */

.stage {
  align-self: center;
  padding-block: clamp(16px, 4vw, 48px);
}

.display {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  /* fills the measure horizontally, but yields to short viewports so the
     whole title page still fits on one screen */
  font-size: clamp(3.4rem, min(22.5vw, 21vh), 22rem);
  line-height: 0.92;
  letter-spacing: -0.018em;
}

.line { display: block; }

/* the brand mark, set as the period after "Design" */
.period {
  display: inline-block;
  width: 0.18em;
  height: 0.18em;
  margin-left: 0.1em;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: baseline;
  animation: period-in 0.9s 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes period-in {
  from { opacity: 0; transform: scale(0.2); }
  to   { opacity: 1; transform: scale(1); }
}

.reading {
  margin: clamp(28px, 3.6vw, 44px) 0 0;
  font-size: clamp(0.7rem, 1.05vw, 0.8rem);
  letter-spacing: 0.46em;
  color: var(--ink-mid);
}

/* -------------------------------------------------------------- colophon */

.colophon {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(24px, 5vw, 64px);
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(20px, 3.4vw, 52px);
  margin: 0;
}

.facts dt {
  margin: 0 0 2px;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  line-height: 1.6;
}

.facts dd {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
  white-space: nowrap;
}

.mail {
  flex: none;
  font-family: var(--display);
  font-size: clamp(1rem, 1.8vw, 1.4rem);
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  padding-bottom: 3px;
  background-image: linear-gradient(var(--ink), var(--ink));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1px;
  transition: background-size 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    background-image 0.3s ease;
}

.mail:hover {
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 100% 2px;
}

/* ---------------------------------------------------------------- narrow */

@media (max-width: 860px) {
  .frame { gap: 36px; }

  .display { font-size: clamp(3rem, 17vw, 7rem); }

  .colophon {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 28px;
  }

  .facts {
    gap: 18px 32px;
  }

  .mail { font-size: 1.15rem; }
}

@media (max-width: 560px) {
  .masthead-meta { display: none; }

  .reading { letter-spacing: 0.3em; }

  .facts { flex-direction: column; gap: 14px; }
  .facts dd { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation: none !important; }
}
