/* ------------------------------------------------------------------
   Diogo Silva — site.css
   One stylesheet for the whole house. Edit tokens below to retune.
------------------------------------------------------------------ */

:root {
  /* Paper & ink */
  --paper:      #FBFAF7;
  --ink:        #191814;
  --ink-soft:   #56534C;
  --ink-faint:  #8C887F;
  --rule:       rgba(25, 24, 20, 0.14);
  --bronze:     #8A6A3C;

  /* Type */
  --serif: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans:  "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  /* Measure & rhythm */
  --measure: 33rem;
  --page:    68rem;
  --gutter:  1.5rem;
  --step:    1.75rem;
}

/* ---------- Reset-ish ---------- */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 350;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

h1, h2, h3 { font-weight: 300; margin: 0; letter-spacing: -0.012em; }

p { margin: 0 0 1.1em; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Utility type: the small voice of the house ---------- */

.label {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  line-height: 1.4;
}

/* ---------- Shell ---------- */

.shell {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.measure { max-width: var(--measure); }

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem; top: 1rem;
  position: fixed;
  z-index: 50;
  background: var(--paper);
  color: var(--ink);
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--rule);
}

/* ---------- Masthead ---------- */

.masthead {
  padding-top: 2.25rem;
  padding-bottom: 1.1rem;
}

.masthead__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.0625rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.35rem;
}

@media (max-width: 26rem) {
  .nav { gap: 0.9rem 1.1rem; }
}

.nav a {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}

.nav a:hover { color: var(--ink); border-bottom-color: var(--bronze); }

.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::before {
  content: "";
  display: inline-block;
  width: 4px; height: 4px;
  margin-right: 0.5rem;
  vertical-align: 0.18em;
  background: var(--bronze);
}

/* ---------- Prose links ---------- */

.prose a, .link {
  color: var(--ink);
  border-bottom: 1px solid var(--bronze);
  padding-bottom: 1px;
  transition: color 160ms ease;
}
.prose a:hover, .link:hover { color: var(--bronze); }

/* ---------- Home ---------- */

.hero {
  padding: clamp(2.5rem, 7vw, 6rem) 0 clamp(2.5rem, 6vw, 4.5rem);
}

.hero__grid {
  display: grid;
  row-gap: clamp(1.75rem, 4vw, 3rem);
  column-gap: clamp(2rem, 5vw, 4.5rem);
}

.hero__name {
  font-size: clamp(3rem, 11vw, 6.25rem);
  line-height: 0.94;
  font-weight: 250;
}

/* Banner: a row of frames across the full column, above the welcome text. */
.banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 0.5rem;
  margin: 0;
}

.banner img {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

/* Mobile order: name, portrait, welcome. */
.portrait { margin: 0; max-width: 26rem; }

@media (min-width: 62rem) {
  .hero__grid {
    grid-template-columns: 1fr 20rem;
    align-items: end;
  }
  .hero__name    { grid-column: 1 / -1; }
  .hero__welcome { grid-column: 1; grid-row: 2; }
  .portrait      { grid-column: 2; grid-row: 2; max-width: none; }
}

.hero__name em {
  font-style: italic;
  font-weight: 250;
}

.hero__welcome {
  max-width: 30rem;
  font-size: 1.1875rem;
  line-height: 1.62;
  color: var(--ink);
}

.hero__welcome p:last-child { margin-bottom: 0; }

.portrait figcaption {
  margin-top: 0.7rem;
  font-family: var(--sans);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- Index of rooms (home) ---------- */

.rooms {
  border-top: 1px solid var(--rule);
  padding-bottom: clamp(3rem, 8vw, 6rem);
}

.room {
  display: grid;
  gap: 0.35rem 2rem;
  padding: 1.9rem 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}

@media (min-width: 46rem) {
  .room { grid-template-columns: 12rem 1fr auto; }
}

.room__name {
  font-size: 1.5rem;
  line-height: 1.2;
  transition: color 160ms ease;
}

.room__note {
  color: var(--ink-soft);
  font-size: 1rem;
  margin: 0;
  max-width: 30rem;
}

.room__mark {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  transition: color 160ms ease, transform 160ms ease;
}

.room:hover .room__name { color: var(--bronze); }
.room:hover .room__mark { color: var(--bronze); }

/* ---------- Page heads ---------- */

.pagehead {
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(1.75rem, 4vw, 3rem);
}

.pagehead__title {
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  line-height: 1.05;
  font-weight: 250;
  margin-bottom: 1.25rem;
}

.pagehead__intro {
  color: var(--ink-soft);
  font-size: 1.125rem;
}

.pagehead__intro p:last-child { margin-bottom: 0; }

/* ---------- Notes ---------- */

.notes-section {
  font-size: 1.0625rem;
  font-weight: 400;
  font-family: var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 0.5rem;
}

.notes-section__note {
  color: var(--ink-soft);
  font-size: 0.9375rem;
  max-width: 34rem;
  margin: 0 0 1.5rem;
}

.entries {
  border-top: 1px solid var(--rule);
  margin-bottom: clamp(3rem, 7vw, 4.5rem);
}

.entry {
  display: grid;
  gap: 0.3rem 2.5rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 46rem) {
  .entry { grid-template-columns: 8rem 1fr; }
}

.entry__date {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: 0.55rem;
}

.entry__title {
  font-size: 1.5rem;
  line-height: 1.25;
  margin-bottom: 0.35rem;
  transition: color 160ms ease;
}

.entry:hover .entry__title { color: var(--bronze); }

.entry__dek {
  color: var(--ink-soft);
  font-size: 1rem;
  margin: 0;
  max-width: 34rem;
}

/* Article */

.article { padding-bottom: clamp(2.5rem, 6vw, 4rem); }

.article__head {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.5rem, 3vw, 2.25rem);
  max-width: var(--measure);
}

.article__date { margin-bottom: 1.1rem; }

.article__title {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.08;
  font-weight: 250;
}

.standfirst {
  max-width: var(--measure);
  margin: 1.25rem 0 0;
  font-size: 1.25rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* Ink device at the head of a note: a printer's ornament, not an illustration. */
.device {
  max-width: 26rem;
  margin: 0 0 clamp(2rem, 5vw, 2.75rem);
}

.device img { width: 100%; }

.entry__lang {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.625rem;
  letter-spacing: 0.14em;
}

.prose {
  max-width: var(--measure);
  font-size: 1.125rem;
  line-height: 1.72;
}

.prose > p:first-of-type { margin-top: 0; }

.prose h2 {
  font-size: 1.375rem;
  margin: 2.25rem 0 0.75rem;
}

.prose blockquote {
  margin: 2rem 0;
  padding-left: 1.25rem;
  border-left: 1px solid var(--bronze);
  font-style: italic;
  color: var(--ink-soft);
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
  width: 4rem;
}

.prose ul, .prose ol { padding-left: 1.2rem; margin: 0 0 1.1em; }
.prose li { margin-bottom: 0.4em; }

.article__foot {
  max-width: var(--measure);
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

/* ---------- Newsletter ---------- */

.signup {
  max-width: var(--measure);
  margin: 0 0 clamp(3rem, 7vw, 5rem);
  padding: 1.75rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.signup__line {
  font-size: 1.0625rem;
  color: var(--ink);
  margin-bottom: 1.1rem;
}

.signup__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: stretch;
}

.signup input[type="email"] {
  flex: 1 1 14rem;
  min-width: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 0.5rem 0;
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink);
  border-radius: 0;
}

.signup input[type="email"]::placeholder { color: var(--ink-faint); }
.signup input[type="email"]:focus {
  outline: none;
  border-bottom-color: var(--bronze);
}

.signup button {
  background: none;
  border: 1px solid var(--rule);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.7rem 1.15rem;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease;
}

.signup button:hover { border-color: var(--bronze); color: var(--bronze); }

.signup__fine {
  margin: 0.9rem 0 0;
  font-family: var(--sans);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

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

.contact { padding-bottom: clamp(3rem, 7vw, 5rem); }

.contact__mail {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  line-height: 1.2;
  font-weight: 250;
  display: inline-block;
  border-bottom: 1px solid var(--bronze);
  padding-bottom: 0.15rem;
  margin-bottom: 1.1rem;
  transition: color 160ms ease;
  word-break: break-word;
}
.contact__mail:hover { color: var(--bronze); }

.contact__location {
  margin: 0 0 clamp(2rem, 5vw, 3rem);
}

.channels {
  border-top: 1px solid var(--rule);
  max-width: 34rem;
}

.channel {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 1.0625rem;
  transition: color 160ms ease;
}

.channel span:last-child {
  font-family: var(--sans);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.channel:hover { color: var(--bronze); }

/* ---------- From Notes (home preview) ---------- */

.notes-preview {
  border-top: 1px solid var(--rule);
  padding: clamp(2rem, 5vw, 3rem) 0 clamp(3rem, 7vw, 5rem);
}

.notes-preview__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.notes-preview__title {
  font-size: 1.5rem;
  font-weight: 250;
}

.notes-preview__list {
  display: grid;
  gap: 0;
}

.notes-preview__item {
  display: grid;
  gap: 0.3rem 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 46rem) {
  .notes-preview__item { grid-template-columns: 8rem 1fr; }
}

.notes-preview__item time { padding-top: 0.15rem; }

.notes-preview__item h3 {
  font-size: 1.1875rem;
  line-height: 1.3;
  margin-bottom: 0.3rem;
  transition: color 160ms ease;
}

.notes-preview__item:hover h3 { color: var(--bronze); }

.notes-preview__item p {
  color: var(--ink-soft);
  font-size: 0.9375rem;
  margin: 0;
  max-width: 34rem;
}

/* ---------- Colophon ---------- */

.colophon {
  padding: 2rem 0 3rem;
  margin-top: auto;
}

.colophon__inner {
  border-top: 1px solid var(--rule);
  padding-top: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  justify-content: space-between;
}

.colophon a { border-bottom: 1px solid var(--rule); }
.colophon a:hover { border-bottom-color: var(--bronze); color: var(--ink); }

/* ---------- Layout scaffold ---------- */

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1 0 auto; }
