/* ---------------------------------------------------------------
   frankcunnane.com
   One visual world: archival paper, slate-green ink, broadcast teal
   for structure, brass for figures. Two dark bands per page.
   Every colour painted explicitly; no inherited browser theme.
   --------------------------------------------------------------- */

:root {
  color-scheme: light;

  /* paper side */
  --paper:        #F0F0EB;
  --surface:      #E5E7E0;
  --ink:          #161D1C;
  --ink-soft:     #4C5654;
  --ink-faint:    #5A6360;
  --rule:         #D2D5CD;
  --rule-strong:  #B4B9AF;

  /* accents */
  --accent:       #1B5A52;
  --accent-deep:  #103A34;
  --accent-wash:  #DCE5E0;
  --brass:        #78591B;

  /* dark side */
  --dark:         #0D1413;
  --dark-2:       #16201E;
  --dark-3:       #1E2B28;
  --dark-rule:    #2B3A36;
  --on-dark:      #F1F1E9;
  --on-dark-soft: #A3ADA7;
  --on-dark-accent: #7FC0AE;
  --on-dark-brass: #D9B25E;
  --on-dark-faint: #8A938E;

  /* film grain, sits over the dark bands only */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");

  --display: "Bodoni Moda", "Didot", "Times New Roman", serif;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --measure: 62ch;
  --gutter: clamp(1.25rem, 4vw, 3.25rem);
  --wrap: 1160px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

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

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-deep); }

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

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 60;
  background: var(--ink); color: var(--on-dark);
  padding: .75rem 1rem; font-family: var(--mono); font-size: .8rem;
}
.skip:focus { left: 0; }

/* ---------- layout primitives ---------- */

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 840px; }

.band { padding-block: clamp(3.5rem, 8vw, 6.5rem); position: relative; }
.band--tint { background: var(--surface); }
.band--tight { padding-block: clamp(2.5rem, 5vw, 3.75rem); }

.stack { display: flex; flex-direction: column; }
.stack--sm { gap: .75rem; }
.stack--md { gap: 1.5rem; }
.stack--lg { gap: clamp(2rem, 4vw, 3.25rem); }

/* ---------- dark surfaces ---------- */

/* Grain and glow are background layers on the element itself — no pseudo-elements,
   no stacking contexts, nothing that can composite over the content. */

.band--dark, .hero, .page-head, .masthead, .footer {
  background-color: var(--dark);
  color: var(--on-dark);
  position: relative;
}

.hero, .page-head {
  background-image:
    var(--grain),
    radial-gradient(115% 85% at 12% 0%, rgba(52, 94, 85, .55) 0%, rgba(13, 20, 19, 0) 62%),
    radial-gradient(75% 65% at 100% 100%, rgba(169, 130, 47, .16) 0%, rgba(13, 20, 19, 0) 70%);
  background-size: 180px 180px, auto, auto;
  background-blend-mode: soft-light, normal, normal;
}

.band--dark, .footer {
  background-image: var(--grain);
  background-size: 180px 180px;
  background-blend-mode: soft-light;
}

/* ---------- type ---------- */

.label {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}
.band--dark .label, .hero .label, .page-head .label { color: var(--on-dark-accent); }

.display {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.6rem, 6.6vw, 4.75rem);
  line-height: 1.03;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}
.display em {
  font-style: italic;
  font-weight: 500;
  color: var(--on-dark-accent);
}

h2.section-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.8rem, 3.5vw, 2.65rem);
  line-height: 1.12;
  letter-spacing: -0.012em;
  margin: 0;
  text-wrap: balance;
}

h3 {
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.005em;
  margin: 0;
}

p { margin: 0; max-width: var(--measure); }

.lead {
  font-size: clamp(1.075rem, 1.7vw, 1.3rem);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 56ch;
}
.band--dark .lead, .hero .lead, .page-head .lead { color: var(--on-dark-soft); }

.muted { color: var(--ink-soft); }
.band--dark .muted, .hero .muted, .page-head .muted { color: var(--on-dark-soft); }
.small { font-size: .92rem; }

.band--dark a:not(.btn), .hero a:not(.btn), .page-head a:not(.btn) { color: var(--on-dark-accent); }
.band--dark a:not(.btn):hover, .hero a:not(.btn):hover, .page-head a:not(.btn):hover { color: #fff; }

.pull {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  line-height: 1.18;
  font-style: italic;
  margin: 0;
  max-width: 24ch;
}

/* ---------- masthead + wordmark lockup ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--dark-rule);
  background-color: rgba(13, 20, 19, .93);
  backdrop-filter: saturate(140%) blur(10px);
}
.masthead__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 2rem;
  padding-block: .95rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .85rem;
  text-decoration: none;
  color: var(--on-dark);
}
.wordmark__mark {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.85rem;
  line-height: 1;
  color: var(--on-dark-brass);
  padding: 0 .85rem .1rem 0;
  border-right: 1px solid var(--dark-rule);
  transition: color .18s ease;
}
.wordmark__j { font-size: .62em; position: relative; top: -.05em; margin: 0 .04em; }
.wordmark__text {
  font-family: "EB Garamond", Garamond, "Times New Roman", serif;
  font-weight: 500;
  font-size: 1.56rem;
  letter-spacing: .005em;
  line-height: 1;
}
.wordmark:hover { color: #fff; }
.wordmark:hover .wordmark__mark { color: #E8C67A; }

.nav { display: flex; flex-wrap: wrap; gap: 1.6rem; }
.nav a {
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--on-dark-soft);
  text-decoration: none;
  padding-block: .45rem;
  border-bottom: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.nav a:hover { color: var(--on-dark); }
.nav a[aria-current="page"] { color: var(--on-dark); border-bottom-color: var(--on-dark-brass); }

/* ---------- hero ---------- */

.hero { padding-block: clamp(3.75rem, 9vw, 7rem); overflow: hidden; }
.hero__grid {
  display: grid;
  gap: clamp(2.25rem, 5vw, 4.5rem);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 900px) {
  .hero__grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
}
.hero .display { color: var(--on-dark); }
.hero__figures { margin-top: clamp(2.5rem, 5vw, 3.5rem); }

.portrait {
  margin: 0;
  border: 1px solid var(--dark-rule);
  background: linear-gradient(160deg, var(--dark-3), var(--dark-2) 65%);
  display: flex;
  flex-direction: column;
}
.portrait__frame {
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}
.portrait__frame img { width: 100%; height: 100%; object-fit: cover; }
.portrait__mark {
  font-family: var(--display);
  font-size: clamp(3rem, 7vw, 4.25rem);
  line-height: 1;
  color: var(--on-dark-brass);
  letter-spacing: .02em;
}
.portrait figcaption {
  border-top: 1px solid var(--dark-rule);
  padding: .7rem .9rem;
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--on-dark-soft);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

/* ---------- buttons ---------- */

.actions { display: flex; flex-wrap: wrap; gap: .75rem 1rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--mono);
  font-size: .76rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: .85rem 1.45rem;
  border: 1px solid transparent;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
}
.btn:hover { transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) { .btn:hover { transform: none; } }

.btn--primary { background: var(--on-dark-brass); color: var(--dark); }
.btn--primary:hover { background: #F0CE7C; color: var(--dark); }
.btn--ghost { border-color: var(--dark-rule); color: var(--on-dark); }
.btn--ghost:hover { border-color: var(--on-dark-accent); color: #fff; }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--accent-deep); color: #fff; }
.btn--outline { border-color: var(--rule-strong); color: var(--ink); }
.btn--outline:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }

/* ---------- figure strip ---------- */

.figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--dark-rule);
  border: 1px solid var(--dark-rule);
}
@media (min-width: 760px) { .figures { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.figures > div {
  background: var(--dark-2);
  padding: 1.35rem 1.3rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.figures dt {
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--on-dark-soft);
  margin: 0;
  order: 2;
}
.figures dd {
  margin: 0;
  order: 1;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  line-height: 1;
  color: var(--on-dark-brass);
  font-variant-numeric: tabular-nums;
}

/* ---------- record rail ---------- */

.record { border-top: 1px solid var(--rule-strong); }

.record__item {
  display: grid;
  grid-template-columns: 1fr;
  gap: .85rem 3rem;
  padding-block: clamp(1.9rem, 3.5vw, 2.75rem);
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 820px) {
  .record__item { grid-template-columns: 11rem minmax(0, 1fr); gap: 0 3.5rem; }
}

.record__rail { display: flex; flex-direction: column; gap: .35rem; align-self: start; }
.record__years {
  font-family: var(--display);
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
  color: var(--ink);
  line-height: 1.1;
}
.record__place {
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--brass);
}

.record__body { display: flex; flex-direction: column; gap: .9rem; }
.record__role { font-family: var(--mono); font-size: .8rem; letter-spacing: .03em; color: var(--ink-soft); }

.points { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .75rem; }
.points li { position: relative; padding-left: 1.5rem; max-width: var(--measure); }
.points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .72em;
  width: .7rem;
  height: 1px;
  background: var(--brass);
}
.band--dark .points li::before, .hero .points li::before { background: var(--on-dark-brass); }
.points .points { margin-top: .5rem; gap: .4rem; }
.points b { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- offers ---------- */

.offers { border-top: 1px solid var(--rule-strong); }
.offer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem 3rem;
  padding-block: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 860px) {
  .offer { grid-template-columns: 11rem minmax(0, 1fr) 15rem; gap: 0 3.5rem; }
}
.offer__no {
  font-family: var(--display);
  font-size: 2.25rem;
  line-height: 1;
  color: var(--brass);
  font-variant-numeric: lining-nums;
  align-self: start;
}
.offer__no span {
  display: block;
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: .5rem;
}
/* category label instead of a numeral, where the entries are not a sequence */
.offer__no--text {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--brass);
}

.offer__body { display: flex; flex-direction: column; gap: .85rem; }
.offer__buyers {
  border-left: 1px solid var(--rule-strong);
  padding-left: 1.35rem;
  font-size: .88rem;
  color: var(--ink-soft);
  display: flex; flex-direction: column; gap: .45rem;
  align-self: start;
}
.offer__buyers span {
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brass);
}
.offer__buyers .points { gap: .35rem; }
.offer__buyers .points li { padding-left: 1.1rem; }
@media (max-width: 859px) {
  .offer__buyers { border-left: 0; border-top: 1px solid var(--rule); padding-left: 0; padding-top: 1.15rem; }
}

/* ---------- panels (three events / case stories) ---------- */

.events {
  display: grid;
  gap: 1px;
  background: var(--dark-rule);
  border: 1px solid var(--dark-rule);
  grid-template-columns: 1fr;
}
@media (min-width: 820px) { .events { grid-template-columns: repeat(3, 1fr); } }

.events > div {
  background: var(--dark-2);
  padding: 1.75rem 1.6rem 1.9rem;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  position: relative;
  transition: background-color .2s ease;
}
.events > div::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--on-dark-brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .28s ease;
}
.events > div:hover { background: var(--dark-3); }
.events > div:hover::before { transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) {
  .events > div::before { transition: none; }
}
.events h3 { color: var(--on-dark); font-size: 1.05rem; }
.events p { color: var(--on-dark-soft); font-size: .92rem; }
.events .label { font-size: .64rem; color: var(--on-dark-brass); }

/* on paper bands the panels invert */
.band--tint .events, .band:not(.band--dark) .events { background: var(--rule-strong); border-color: var(--rule-strong); }
.band--tint .events > div, .band:not(.band--dark) .events > div { background: var(--paper); }
.band--tint .events > div:hover, .band:not(.band--dark) .events > div:hover { background: #FFF; }
.band--tint .events > div::before, .band:not(.band--dark) .events > div::before { background: var(--brass); }
.band--tint .events h3, .band:not(.band--dark) .events h3 { color: var(--ink); }
.band--tint .events p, .band:not(.band--dark) .events p { color: var(--ink-soft); }
.band--tint .events .label, .band:not(.band--dark) .events .label { color: var(--brass); }

/* ---------- writing list ---------- */

.pieces { border-top: 1px solid var(--rule-strong); }
.piece {
  display: grid;
  grid-template-columns: 1fr;
  gap: .6rem 3.5rem;
  padding-block: 1.9rem;
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 820px) { .piece { grid-template-columns: 11rem minmax(0, 1fr); gap: 0 3.5rem; } }
.piece__date {
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  align-self: start;
}
.piece__body { display: flex; flex-direction: column; gap: .6rem; }
.piece h3 {
  font-family: var(--display);
  font-size: clamp(1.45rem, 2.4vw, 1.8rem);
  font-weight: 500;
  letter-spacing: -0.008em;
  line-height: 1.18;
}
.status {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-deep);
  background: var(--accent-wash);
  border: 1px solid #C6D3CB;
  padding: .28rem .55rem;
}

/* ---------- contact ---------- */

.contact-grid { display: grid; grid-template-columns: 1fr; gap: 2.75rem 4.5rem; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } }

.details { display: flex; flex-direction: column; gap: 1.6rem; margin: 0; }
.detail { border-top: 1px solid var(--rule-strong); padding-top: 1rem; display: flex; flex-direction: column; gap: .3rem; }
.detail dt {
  font-family: var(--mono); font-size: .64rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--brass);
}
.detail dd { margin: 0; font-size: 1.05rem; }
.band--dark .detail, .hero .detail, .page-head .detail { border-top-color: var(--dark-rule); }
.band--dark .detail dt, .hero .detail dt, .page-head .detail dt { color: var(--on-dark-brass); }

/* ---------- quote band ---------- */

.quote-band { background: var(--surface); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.quote-band__inner { display: grid; gap: 1.5rem 3.5rem; grid-template-columns: 1fr; align-items: end; }
@media (min-width: 820px) { .quote-band__inner { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } }
.quote-band .pull { color: var(--ink); }
.attrib {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .15em;
  text-transform: uppercase; color: var(--brass);
}

/* ---------- page head ---------- */

.page-head { padding-block: clamp(3rem, 6.5vw, 5rem); overflow: hidden; }
.page-head .display { color: var(--on-dark); font-size: clamp(2.3rem, 5.2vw, 3.6rem); }

/* ---------- footer ---------- */

.footer { padding-block: clamp(2.75rem, 5vw, 4rem) 2.5rem; color: var(--on-dark-soft); }
.footer__brand { display: flex; flex-direction: column; gap: .9rem; }
.footer__line {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  color: var(--on-dark);
  margin: 0;
}
.footer__grid {
  display: grid; gap: 2.25rem 3.5rem; grid-template-columns: 1fr;
  border-top: 1px solid var(--dark-rule); padding-top: 2.25rem;
}
@media (min-width: 760px) { .footer__grid { grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr)); } }
.footer a { color: var(--on-dark); text-decoration: none; }
.footer a:hover { color: var(--on-dark-brass); }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; font-size: .92rem; }
.footer ul a { display: inline-block; padding-block: .38rem; }
.footer .label { color: var(--on-dark-brass); margin-bottom: .85rem; }
.colophon {
  font-family: var(--mono); font-size: .66rem; letter-spacing: .1em;
  color: var(--on-dark-faint); margin-top: 2.75rem;
}

/* ---------- small screens ----------
   The nav needs two rows below 780px. A sticky two-row masthead would eat
   nearly a quarter of a phone viewport for the whole scroll, so it stops
   being sticky there and the links grow to a proper touch size instead. */

@media (max-width: 780px) {
  .masthead { position: static; backdrop-filter: none; background-color: var(--dark); }
  .masthead__inner { padding-block: .8rem; gap: .35rem 1rem; }
  .nav { gap: .1rem 1.25rem; }
  .nav a { font-size: .7rem; padding-block: .68rem; }
  .footer ul a { padding-block: .5rem; }
  .footer__grid { gap: 2rem 3rem; }
}

@media (max-width: 560px) {
  /* keep the four menu links on one line under the name on phones */
  .nav { width: 100%; justify-content: space-between; gap: .1rem .25rem; }
  .nav a { letter-spacing: .03em; }
  /* cap the portrait so the hero's proof figures stay within reach of the fold */
  .portrait__frame { max-height: 62vh; }
  .hero { padding-block: 2.75rem 3rem; }
  .figures > div { padding: 1.15rem 1.1rem 1.25rem; }
  .quote-band__inner { align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
