/* ===========================================================================
   diogolanca.com

   Deliberately not spearlight.co. That site is near-black, grotesque type, a
   scrolling narrative. This is warm paper, a serif, one screen.

   Layout is a centred grid rather than a viewport-wide split. The distinction
   matters: a panel pinned to the viewport edge leaves whatever space is left
   over in the middle, and on a wide screen that reads as a hole. Inside a
   centred shell the gap is a measure you chose.
   =========================================================================== */

@font-face {
  font-family: "Instrument Serif";
  src: url("../assets/fonts/instrument-serif-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../assets/fonts/instrument-serif-latin-400-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}

:root {
  --paper:  #f2ede4;   /* warm, not white: white would read as unfinished */
  --ink:    #1b1917;
  --ink-2:  rgba(27, 25, 23, 0.66);
  --ink-3:  rgba(27, 25, 23, 0.40);
  --rule:   rgba(27, 25, 23, 0.13);
  --accent: #b4441f;   /* terracotta: Spearlight's red, warmed and darkened,
                          so the two feel related without matching */
  --serif:  "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans:   "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius: 14px;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100dvh;
  padding: 32px 24px;
}

/* --- Layout --------------------------------------------------------------
   Phone: one column, and the order is identity, then the work, then where to
   go. Seeing a face and a name before a video is what makes the video mean
   something. */
.layout {
  width: 100%;
  max-width: 1120px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "identity"
    "reel"
    "actions"
    "foot";
  gap: 30px;
}

.identity { grid-area: identity; }
.reel     { grid-area: reel; }
.actions  { grid-area: actions; }
.foot     { grid-area: foot; }

/* 1000px, not 900. Below this the two columns technically fit, but the reel
   is squeezed to about 450px beside a 360px text column and reads as an
   afterthought. Measured at 900 before moving it. One wide reel above the
   text beats two cramped columns. */
@media (min-width: 1000px) {
  .layout {
    /* The text column is capped in ch-adjacent terms and the reel takes the
       rest, so the measure stays readable while the video grows with the
       screen. */
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    grid-template-areas:
      "identity reel"
      "actions  reel"
      "foot     foot";
    column-gap: clamp(40px, 5vw, 72px);
    row-gap: 28px;
    align-items: start;
  }

  /* Optically centred against the text column rather than top-aligned with
     it: the two blocks have very different heights and aligning their tops
     leaves the video hanging. */
  .reel { align-self: center; }

  .foot { margin-top: 16px; }
}

/* --- Identity ------------------------------------------------------------ */

/* Centred in its column while the text below stays left-aligned. That pairing
   only works if the photo is big enough to read as a deliberate crest rather
   than a stray element that failed to line up, which is why it went from 76px
   to 104px at the same time. */
.portrait {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 26px;
  /* A ring rather than a border, so the photo's edge stays soft against paper
     instead of being cut out of it. */
  box-shadow: 0 0 0 1px var(--rule), 0 6px 18px rgba(27, 25, 23, 0.10);
}

/* Smaller than the bare name was, because "Hi, I am Diogo Lança." is three
   times the characters and at the old size it took four lines in a 360px
   column. Measured before changing it. */
.name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 1.7rem + 1.3vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 16px;
  text-wrap: balance;
}

.intro {
  font-size: 0.95rem;
  line-height: 1.62;
  color: var(--ink-2);
  margin: 0;
  max-width: 42ch;
  text-wrap: pretty;
}

.intro + .intro { margin-top: 14px; }

.intro em {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.08em;
  color: var(--ink);
}

/* --- Reel ----------------------------------------------------------------
   16:9, uncropped, because the framing of a reel is the work. aspect-ratio
   plus a poster of the same shape means the box is reserved before a single
   byte of video arrives, so nothing on the page moves when it loads. */
.reel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ink);
  aspect-ratio: 16 / 9;
  box-shadow: 0 14px 40px rgba(27, 25, 23, 0.14);
}

.reel-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Actions -------------------------------------------------------------- */

.primary {
  display: flex;
  /* Centres, not baselines: an image has no baseline of its own, so a mixed
     row of label, logo and arrow only lines up on centres. */
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  border-radius: 10px;
  padding: 14px 18px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.primary:hover,
.primary:focus-visible { background: var(--accent); transform: translateY(-1px); }

.primary-label {
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(242, 237, 228, 0.62);
}

/* Sized by height so the wordmark's optical weight is what is being matched,
   not its pixel width. 17px lands the cap-height of SPEARLIGHT close to the
   serif it replaced, which keeps the button the same height as before. */
.primary-logo {
  height: 17px;
  width: auto;
  display: block;
  margin-right: auto;
  /* The mark reads slightly heavier than the type around it at full strength;
     a touch of transparency settles it into the control without making it
     look faded. */
  opacity: 0.94;
}

.primary-arrow { font-size: 1rem; opacity: 0.8; }

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}

.links a {
  font-size: 0.9rem;
  color: var(--ink-2);
  text-decoration: none;
  /* Border rather than text-decoration: it animates, and it clears the
     descenders. */
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.links a:hover,
.links a:focus-visible { color: var(--ink); border-bottom-color: var(--accent); }

/* --- Store ----------------------------------------------------------------
   The second door. Same anatomy as .primary (label, name, arrow) so the two
   read as a pair, but outlined rather than filled: that difference is the
   entire hierarchy between them. Two solid blocks would compete and the page
   would stop having one obvious action. */

.store { margin-top: 22px; }

.store-q {
  font-size: 0.85rem;
  color: var(--ink-3);
  margin: 0 0 10px;
}

.secondary {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  background: transparent;
  /* Stronger than --rule, which is a divider weight and disappears when asked
     to describe a shape. */
  border: 1px solid rgba(27, 25, 23, 0.20);
  border-radius: 10px;
  padding: 12px 16px;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.secondary:hover,
.secondary:focus-visible {
  border-color: var(--accent);
  background: rgba(180, 68, 31, 0.06);
  transform: translateY(-1px);
}

.secondary-label {
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.secondary-name {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1;
  margin-right: auto;
}

.secondary-arrow { font-size: 0.9rem; color: var(--ink-3); }

/* --- Foot ----------------------------------------------------------------- */

.foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--ink-3);
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}

.foot a { color: inherit; text-decoration: none; }
.foot a:hover { color: var(--accent); }

@media (max-width: 400px) {
  .foot { flex-direction: column; align-items: flex-start; gap: 4px; }
}

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