/* carlamonteiro.eu
   A theatre programme for a psychologist who came from the stage:
   plum velvet, warm programme paper, one crayon line that starts as a
   child's tangle and settles into a calm path. Square corners throughout. */

@font-face { font-family: 'Gambetta'; src: url('/fonts/Gambetta-Variable.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'General Sans'; src: url('/fonts/GeneralSans-Variable.woff2') format('woff2'); font-weight: 200 700; font-display: swap; }

:root {
  --paper: #f6f0e6;
  --paper-2: #ede4d5;
  --ink: #221a22;
  --ink-2: #463b44;          /* secondary text, still ~9:1 on paper */
  --plum: #4b2140;
  --plum-2: #3a1832;
  --on-plum: #f6f0e6;
  --on-plum-2: #e6d6e0;      /* secondary on plum, ~9:1 */
  --crayon: #e3893a;
  --crayon-ink: #9a4a12;     /* the crayon colour when it has to be text on paper */
  --rule: #cdbfab;
  --rule-plum: rgba(246, 240, 230, .28);
  --serif: 'Gambetta', 'Iowan Old Style', Georgia, serif;
  --sans: 'General Sans', 'Helvetica Neue', Arial, sans-serif;
  --pad: clamp(20px, 5vw, 64px);
  --max: 1260px;
  --sec: clamp(80px, 11vw, 150px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 18px/1.65 var(--sans); font-feature-settings: 'ss01';
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--crayon); outline-offset: 3px; }
p { margin: 0 0 1.1em; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -.012em; text-wrap: balance; }
h1 { font-size: clamp(46px, 7.4vw, 108px); line-height: 1; letter-spacing: -.02em; }
h2 { font-size: clamp(38px, 4.8vw, 66px); line-height: 1.06; }
h3 { font-size: clamp(25px, 2.3vw, 31px); line-height: 1.2; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 12px 18px; z-index: 10; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--pad); }

/* ------------------------------------------------------------ header */
.top { color: var(--on-plum); background: var(--plum); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 26px; }
.brand { text-decoration: none; display: grid; line-height: 1.1; }
.brand b { font: 400 27px/1.05 var(--serif); letter-spacing: -.01em; }
.brand span { font-size: 16px; color: var(--on-plum-2); margin-top: 3px; }
.nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 34px); font-size: 17px; font-weight: 500; }
.nav a { text-decoration: none; padding-block: 6px; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current] { border-bottom-color: currentColor; }
.nav .lang { border: 1px solid var(--rule-plum); padding: 7px 12px; }
.nav .lang:hover { border-color: var(--on-plum); }
.menu-btn { display: none; background: none; color: inherit; border: 1px solid var(--rule-plum); font: 600 17px var(--sans); padding: 10px 16px; cursor: pointer; }

@media (max-width: 920px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 5; background: var(--plum-2);
         flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--pad) 28px; font-size: 22px; }
  .nav a { padding-block: 16px; border-bottom: 1px solid var(--rule-plum); }
  .nav .lang { border: 0; border-bottom: 1px solid var(--rule-plum); padding: 16px 0; }
  .top { position: relative; }
  .top.open .nav { display: flex; }
}

/* ------------------------------------------------------------ hero */
.hero { background: var(--plum); color: var(--on-plum); overflow: hidden; }
.hero .wrap { padding-top: clamp(40px, 7vw, 96px); padding-bottom: 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(32px, 6vw, 96px); align-items: end; }
.hero .role { font-size: 18px; color: var(--on-plum-2); margin-bottom: 28px; }
.hero h1 { max-width: 11ch; }
.hero .lede { font-size: clamp(19px, 1.6vw, 22px); line-height: 1.6; max-width: 36em; margin: 34px 0 40px; color: var(--on-plum); }
.actions { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; }
.btn { display: inline-block; font: 600 17px/1 var(--sans); padding: 19px 28px; text-decoration: none; border: 2px solid var(--plum);
       background: var(--plum); color: var(--on-plum); cursor: pointer; transition: background .2s, color .2s; }
.btn:hover { background: var(--plum-2); border-color: var(--plum-2); }
.btn.crayon { background: var(--crayon); border-color: var(--crayon); color: var(--ink); }
.btn.crayon:hover { background: #f09a4c; border-color: #f09a4c; }
.hero .plain { font-weight: 500; }

/* the programme credits, set like a ficha técnica */
.ficha { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule-plum); }
.ficha li { padding: 16px 0 15px; border-bottom: 1px solid var(--rule-plum); }
.ficha b { display: block; font: 400 21px/1.25 var(--serif); }
.ficha span { display: block; color: var(--on-plum-2); font-size: 16px; margin-top: 4px; }

.hero-line { margin-top: clamp(36px, 6vw, 72px); margin-inline: calc(var(--pad) * -1); }
.hero-line svg { width: 100%; height: auto; overflow: visible; }

/* ------------------------------------------------------------ the crayon line */
.line path { fill: none; stroke: var(--crayon); stroke-linecap: round; stroke-linejoin: round; }
.line .dot { fill: var(--crayon); }
.js .line.draw:not(.armed) { visibility: hidden; }
.line.armed path { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); }
.line.armed .dot { opacity: 0; }
.line.armed.drawn path { animation: draw var(--dur, 3.4s) cubic-bezier(.45, .05, .25, 1) forwards; }
.line.armed.drawn .dot { animation: dot .5s ease forwards; animation-delay: calc(var(--dur, 3.4s) - .15s); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes dot { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .line.armed path { stroke-dasharray: none; stroke-dashoffset: 0; animation: none !important; }
  .line.armed .dot { opacity: 1; animation: none !important; }
}
.divider { max-width: var(--max); margin: 0 auto; padding-inline: var(--pad); }
.divider svg { width: min(600px, 72%); height: auto; overflow: visible; }

/* ------------------------------------------------------------ sections */
.sec { padding-block: var(--sec); }
.sec.tint { background: var(--paper-2); }
.sec.plum { background: var(--plum); color: var(--on-plum); }
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(28px, 6vw, 96px); }
.split > header h2 { position: sticky; top: 32px; }
.intro { font-size: clamp(20px, 1.7vw, 23px); line-height: 1.6; max-width: 38em; }
.muted { color: var(--ink-2); }
.plum .muted { color: var(--on-plum-2); }
.prose { max-width: 40em; }
.prose p { margin-bottom: 1.2em; }
.more { font-weight: 600; }

.said { font: 400 clamp(28px, 3.1vw, 42px)/1.28 var(--serif); letter-spacing: -.01em; margin: 56px 0 56px; max-width: 24em; text-wrap: pretty; }
.said cite { display: block; font: 500 17px/1.4 var(--sans); font-style: normal; color: var(--ink-2); margin-top: 18px; letter-spacing: 0; }

/* how I help: three columns divided by rules, like a programme's three acts */
.acts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: clamp(48px, 6vw, 80px); border-top: 2px solid var(--ink); }
.act { padding: 32px clamp(20px, 2.6vw, 40px) 8px 0; }
.act + .act { padding-left: clamp(20px, 2.6vw, 40px); border-left: 1px solid var(--rule); }
.act .n { font: 400 20px/1 var(--serif); color: var(--crayon-ink); display: block; margin-bottom: 26px; }
.act h3 { margin-bottom: 8px; }
.act .for { color: var(--ink-2); font-size: 17px; margin-bottom: 22px; }
.act ul { list-style: none; margin: 0 0 26px; padding: 0; }
.act li { padding: 11px 0; border-top: 1px solid var(--rule); }
.act li:last-child { border-bottom: 1px solid var(--rule); }

/* how I work */
.ways { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(32px, 6vw, 96px); margin-top: clamp(44px, 5vw, 72px); }
.way { padding: 30px 0 34px; border-top: 1px solid var(--rule-plum); display: grid; grid-template-columns: 56px 1fr; gap: 0 12px; }
.way .n { font: 400 22px/1.3 var(--serif); color: var(--crayon); }
.way h3 { margin-bottom: 12px; }
.way p { color: var(--on-plum-2); margin: 0; max-width: 30em; }

/* dot-leader lists, like the credits at the back of a programme */
.leaders { list-style: none; margin: 0; padding: 0; }
.leaders li { display: flex; align-items: baseline; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--rule); }
.leaders li:first-child { border-top: 1px solid var(--rule); }
.leaders .t { flex: 0 1 auto; }
.leaders .t small { display: block; color: var(--ink-2); font-size: 16px; margin-top: 2px; }
.leaders .d { flex: 1 1 24px; min-width: 24px; border-bottom: 2px dotted var(--rule); transform: translateY(-6px); }
.leaders .h { flex: none; font-variant-numeric: tabular-nums; font-weight: 600; }
.total { margin-top: 18px; font-weight: 600; }

.schools { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); margin-top: clamp(40px, 5vw, 64px); align-items: start; }
.schools .btn { margin-top: 10px; }

/* community */
.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 6vw, 96px); margin-top: clamp(44px, 5vw, 72px);
           padding-top: 34px; border-top: 2px solid var(--ink); }
.feature .place { font: 400 clamp(56px, 8vw, 120px)/.92 var(--serif); letter-spacing: -.03em; }
.feature .place span { display: block; font: 500 18px/1.4 var(--sans); letter-spacing: 0; color: var(--ink-2); margin-top: 18px; }
.feature h3 { margin-bottom: 16px; }
.feature blockquote { margin: 26px 0 0; font: 400 24px/1.4 var(--serif); }
.notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 56px); margin-top: clamp(48px, 6vw, 80px); }
.note { border-top: 1px solid var(--rule); padding-top: 24px; }
.note h3 { font-size: 25px; margin-bottom: 12px; }
.note p { margin: 0; }

/* places */
.places { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: clamp(44px, 5vw, 72px); border-top: 2px solid var(--ink); }
.place-c { padding: 30px clamp(20px, 2.6vw, 40px) 0 0; }
.place-c + .place-c { padding-left: clamp(20px, 2.6vw, 40px); border-left: 1px solid var(--rule); }
.place-c .town { font: 400 clamp(30px, 3vw, 40px)/1.1 var(--serif); margin-bottom: 18px; }
.place-c p { margin: 0 0 14px; }
.place-c .tel { font-weight: 600; font-size: 20px; text-decoration: none; border-bottom: 1px solid currentColor; }

/* contact form */
.contact { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(28px, 6vw, 96px); }
form { display: grid; gap: 30px; max-width: 760px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
label, legend { display: block; font-weight: 600; font-size: 18px; margin-bottom: 10px; padding: 0; }
.opt { font-weight: 400; color: var(--ink-2); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
input[type=text], input[type=email], input[type=tel], textarea {
  width: 100%; font: 400 19px/1.5 var(--sans); color: var(--ink); background: #fffdf9;
  border: 1.5px solid #8f8072; border-radius: 0; padding: 15px 16px; -webkit-appearance: none; appearance: none; }
input:focus, textarea:focus { outline: none; border-color: var(--plum); box-shadow: 0 0 0 3px rgba(75, 33, 64, .18); }
textarea { min-height: 190px; resize: vertical; }
.hint { color: var(--ink-2); font-size: 17px; margin: -2px 0 12px; }
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span { display: block; padding: 13px 18px; border: 1.5px solid #8f8072; background: #fffdf9; font-size: 17px; font-weight: 500; cursor: pointer; transition: background .15s, color .15s; }
.choice input:checked + span { background: var(--plum); border-color: var(--plum); color: var(--on-plum); }
.choice input:focus-visible + span { outline: 3px solid var(--crayon); outline-offset: 2px; }
.consent { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; font-weight: 400; font-size: 17px; margin: 0; }
.consent input { width: 22px; height: 22px; margin: 3px 0 0; accent-color: var(--plum); }
.hp { position: absolute; left: -5000px; }
.status { font-weight: 600; margin: 0; min-height: 1.6em; }
.status.err { color: #9b1c1c; }
.sent { border-top: 2px solid var(--ink); padding-top: 28px; }
.sent h3 { margin-bottom: 12px; }

/* ------------------------------------------------------------ inner pages */
.page-head { background: var(--plum); color: var(--on-plum); padding: clamp(48px, 7vw, 100px) 0 0; overflow: hidden; }
.page-head h1 { font-size: clamp(46px, 6.6vw, 96px); max-width: 14ch; }
.page-head .lede { font-size: clamp(19px, 1.6vw, 22px); max-width: 36em; margin: 28px 0 0; }
.page-head .hero-line { margin-top: clamp(28px, 5vw, 56px); }
.list-2 { columns: 2; column-gap: clamp(32px, 5vw, 72px); list-style: none; padding: 0; margin: 0; }
.list-2 li { break-inside: avoid; padding: 14px 0; border-top: 1px solid var(--rule); }
.skills { counter-reset: s; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(32px, 5vw, 72px); list-style: none; margin: 0; padding: 0; }
.skills li { padding: 20px 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 48px 1fr; }
.skills li::before { counter-increment: s; content: counter(s, decimal-leading-zero); font: 400 20px/1.4 var(--serif); color: var(--crayon-ink); }
.skills b { display: block; font-weight: 600; }
.skills span { color: var(--ink-2); }
.legal h2 { font-size: clamp(28px, 2.6vw, 36px); margin: 48px 0 14px; }
.legal { max-width: 46em; }

/* ------------------------------------------------------------ footer */
.foot { background: var(--plum-2); color: var(--on-plum); padding-block: clamp(56px, 7vw, 96px) 40px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 5fr) repeat(2, minmax(0, 3fr)); gap: 40px; }
.foot .name { font: 400 clamp(34px, 3.6vw, 48px)/1.05 var(--serif); margin-bottom: 14px; }
.foot p { color: var(--on-plum-2); margin: 0 0 8px; }
.foot h3 { font: 600 17px/1.4 var(--sans); margin-bottom: 12px; color: var(--on-plum); }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 8px; color: var(--on-plum-2); }
.foot a { color: var(--on-plum); }
.foot .base { margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--rule-plum); display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: space-between; font-size: 16px; color: var(--on-plum-2); }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1000px) {
  .hero-grid, .split, .contact, .schools, .feature { grid-template-columns: 1fr; }
  .split > header h2 { position: static; }
  .acts, .places { grid-template-columns: 1fr; border-top-width: 2px; }
  .act, .act + .act, .place-c, .place-c + .place-c { padding: 28px 0 10px; border-left: 0; }
  .act + .act, .place-c + .place-c { border-top: 1px solid var(--rule); }
  .notes { grid-template-columns: 1fr; gap: 28px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  body { font-size: 18px; }
  .ways, .skills, .row { grid-template-columns: 1fr; }
  .list-2 { columns: 1; }
  .way { grid-template-columns: 44px 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: none; }
  .divider svg { width: 86%; }
  .btn { padding: 18px 24px; }
}

/* ------------------------------------------------------------ three languages */
.langs { display: flex; gap: 0; border: 1px solid var(--rule-plum); }
.langs a { padding: 7px 11px; font-weight: 600; font-size: 16px; border-bottom: 0 !important; }
.langs a + a { border-left: 1px solid var(--rule-plum); }
.langs a[aria-current] { background: var(--on-plum); color: var(--plum); }
.langs a:not([aria-current]):hover { background: var(--plum-2); }
@media (max-width: 920px) {
  .langs { align-self: flex-start; margin-top: 22px; }
  .langs a { padding: 12px 18px; font-size: 18px; border-bottom: 0; }
}

/* the programme credits on paper (when the portrait takes the hero) */
.sec .ficha { margin-top: 40px; border-top-color: var(--rule); max-width: 420px; }
.sec .ficha li { border-bottom-color: var(--rule); }
.sec .ficha span { color: var(--ink-2); }

/* lists on plum */
.plum .list-2 li { border-top-color: var(--rule-plum); }
.list-h { margin: 44px 0 16px; }

/* portrait */
.portrait { margin: 0; align-self: stretch; }
.portrait img { width: 100%; height: 100%; max-height: 640px; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 18%; }
@media (max-width: 1000px) {
  .portrait img { max-height: 560px; }
}
