/* xenmendelsohn.com
   Built from the approved wireframes (Figma cgBMNUr0tiMX0OTfLkCmfw, frames 4648:1574 desktop / 4648:1913 mobile).
   Colours: Knit Local Figma colour styles. Brand blue is #4E5FF9 (never #5567FF).
   Layout: centred container, max content width 1124px (= 158px each side at 1440). Bands are full width. */

@font-face { font-family: "David Libre"; src: url("fonts/DavidLibre-Regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "David Libre"; src: url("fonts/DavidLibre-Bold.woff") format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Arbel Hagilda"; src: url("fonts/ArbelHagilda-Regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Arbel Hagilda"; src: url("fonts/ArbelHagilda-Bold.woff") format("woff"); font-weight: 700; font-display: swap; }

:root {
  --blue:  #4E5FF9;
  --pink:  #FF99C6;
  --orange:#FF5121;
  --grey:  #C7C4B5;
  --cream: #F7F4E6;
  --white: #FFFFFF;
  --ink:   #231F20;

  --serif: "David Libre", Georgia, serif;
  --mono:  "Arbel Hagilda", "Courier New", monospace;

  --container: 1124px;
  --gutter: 24px;
  --band-pad: 64px;
  --tile: 88px;
  --tile-scale: .55;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--mono); font-size: 17px; line-height: 1.5; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, ul, fieldset, legend { margin: 0; padding: 0; }
ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- header ---------- */
.header-inner { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-block: 24px 22px; }
.site-name { font-family: var(--serif); font-weight: 700; font-size: 22px; line-height: 1.2; text-decoration: none; white-space: nowrap; }
.site-nav { display: flex; gap: 40px; }
.site-nav a { font-size: 18px; text-decoration: none; white-space: nowrap; }
.site-nav a:hover, .site-footer a:hover, .talk-ig a:hover { text-decoration: underline; }
.site-nav a:not(.nav-talk) { display: none; }
.site-nav .nav-talk { font-size: 15px; font-weight: 700; color: var(--blue); }

/* ---------- hero ---------- */
.hero-inner { display: block; padding-inline: 0; }
.hero-text { padding: 36px var(--gutter) 35px; }
.hero-title { font-family: var(--serif); font-weight: 700; font-size: 42px; line-height: 1.06; letter-spacing: -0.012em; }
.hero-sub { margin-top: 22px; font-size: 21px; line-height: 1.3; color: var(--blue); }
.hero-photo { display: block; }
.hero-photo img { width: 100%; height: 472px; object-fit: cover; object-position: 50% 30%; }

/* ---------- bands ---------- */
.band { padding-block: var(--band-pad); }
.band--blue  { background: var(--blue); color: var(--white); }
.band--pink  { background: var(--pink); }
.band--cream { background: var(--cream); }

.label { font-family: var(--mono); font-weight: 700; font-size: 13px; line-height: 1.2; letter-spacing: .12em; text-transform: uppercase; }
.label--pink { color: var(--pink); }
.label--blue { color: var(--blue); }
.label--black { color: var(--ink); }

.split { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 24px; }
.who-body p { font-size: 18px; line-height: 1.55; }
.who-body p + p { margin-top: 24px; }
.intro { font-family: var(--serif); font-size: 25px; line-height: 1.32; }

/* ---------- what I build: areas (any number of items) ---------- */
.areas { margin-top: 40px; border-top: 2px solid var(--ink); }
.area {
  display: grid;
  grid-template-columns: var(--tile) minmax(0, 1fr);
  grid-template-areas: "tile title" "text text";
  column-gap: 20px; row-gap: 16px; align-items: center;
  padding-block: 28px 30px;
  border-bottom: 2px solid var(--ink);
}
.area .tile { grid-area: tile; }
.area-title { grid-area: title; font-family: var(--serif); font-weight: 700; font-size: 32px; line-height: 1.2; }
.area-text { grid-area: text; font-size: 17px; line-height: 1.55; }

/* Pattern tiles: drawn at 160px (desktop wireframe geometry) and scaled down on smaller screens. */
.tile { width: var(--tile); height: var(--tile); overflow: hidden; position: relative; }
.tile-art { position: absolute; left: 0; top: 0; width: 160px; height: 160px; transform: scale(var(--tile-scale)); transform-origin: 0 0; }
.tile-field { position: absolute; left: 0; width: 160px; overflow: hidden; background: var(--pink); }
.tile-field img { position: absolute; max-width: none; }
.tile--publishing .tile-field { top: -17.16px; height: 194.33px; }
.tile--publishing img { left: -214.28px; top: -125.38px; width: 588.567px; height: 445.091px; }
.tile--teaching .tile-field { top: -51.49px; height: 262.98px; }
.tile--teaching img { left: -172.65px; top: -136.09px; width: 505.309px; height: 535.156px; }
.tile--community .tile-field { top: -115.49px; height: 390.98px; }
.tile--community img { left: -155.11px; top: -39.36px; width: 470.225px; height: 469.702px; }
.tile--retreats .tile-field { top: 0; left: -8.61px; width: 177.21px; height: 160px; }
.tile--retreats img { left: -163.82px; top: -7.01px; width: 388.207px; height: 303.713px; }

/* ---------- selected patterns: 2 to 6 cards ---------- */
.cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 32px; }
.card { background: var(--cream); display: flex; flex-direction: column; }
.card-photo { aspect-ratio: 1 / 1; background: var(--grey); display: grid; place-items: center; padding: 24px; text-align: center; font-size: 18px; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; }
.card:has(.card-photo img) .card-photo { padding: 0; }
.card-body { padding: 20px; }
.card-name { font-family: var(--serif); font-weight: 700; font-size: 26px; line-height: 1.2; }
.card-line { margin-top: 2px; font-size: 16px; line-height: 1.45; }
.card-link picture, .send picture { display: block; }
.card-link { margin-top: 18px; display: inline-flex; align-items: center; gap: 14px; font-weight: 700; font-size: 16px; color: var(--blue); text-decoration: none; }
.card-link:hover { text-decoration: underline; }
.arrow-short { width: 41.41px; height: 19.41px; }

/* ---------- let's talk ---------- */
.talk { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 24px; }
.talk-text .label { margin-bottom: 24px; }
.talk-intro { font-family: var(--serif); font-size: 25px; line-height: 1.32; }
.talk-ig { margin-top: 24px; font-weight: 700; font-size: 16px; }
.talk-ig a { text-decoration: none; }

.contact-form { background: var(--cream); color: var(--ink); padding: 28px 20px; }
.field + .field { margin-top: 22px; }
.field > label, .field > legend { display: block; font-weight: 700; font-size: 14px; line-height: 1.2; margin-bottom: 9px; }
.field input[type="text"], .field input[type="email"], .field textarea {
  display: block; width: 100%; border: 0; border-bottom: 2px solid var(--ink); border-radius: 0;
  background: var(--white); color: var(--ink); font: 400 17px/1.4 var(--mono); padding: 12px 14px; appearance: none;
}
.field input[type="text"], .field input[type="email"] { height: 52px; }
.field textarea { height: 130px; resize: none; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span { display: flex; align-items: center; height: 48px; padding-inline: 12px; border: 2px solid var(--ink); background: var(--white); font-size: 15px; white-space: nowrap; }
.choice input:checked + span { background: var(--blue); border-color: var(--blue); color: var(--white); }
.choice input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.send { margin-top: 22px; width: 100%; height: 60px; display: flex; align-items: center; justify-content: space-between; padding-inline: 20px; border: 0; border-radius: 0; background: var(--ink); color: var(--white); font: 700 17px/1 var(--mono); cursor: pointer; }
.send:hover .arrow-long { transform: translateX(6px); }
.send:disabled { opacity: .6; cursor: wait; }
.form-status { margin-top: 18px; font-size: 16px; line-height: 1.5; }
.form-status.is-failed { font-weight: 700; }
.arrow-long { width: 71.41px; height: 19.41px; transition: transform .2s; }
.field input:invalid.touched, .field textarea:invalid.touched { border-bottom-color: var(--orange); }

/* ---------- footer ---------- */
.footer-inner { display: flex; flex-direction: column; gap: 6px; padding-block: 32px 40px; }
.footer-name { font-family: var(--serif); font-weight: 700; font-size: 18px; }
.footer-ig { font-size: 15px; text-decoration: none; }

/* =======================================================
   Tablet and up (768+): wireframe desktop structure, softer sizes
   ======================================================= */
@media (min-width: 768px) {
  :root { --gutter: 40px; --band-pad: 96px; --tile: 120px; --tile-scale: .75; }

  .header-inner { padding-block: 30px 34px; }
  .site-name { font-size: 24px; }
  .site-nav { gap: 28px; }
  .site-nav a:not(.nav-talk) { display: inline; }
  .site-nav a, .site-nav .nav-talk { font-size: 16px; font-weight: 400; color: var(--ink); }

  .hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) 40%; column-gap: 40px; padding-inline: var(--gutter); }
  .hero-text { padding: 64px 0 64px; }
  .hero-title { font-size: 52px; line-height: 1.04; letter-spacing: 0; }
  .hero-sub { font-size: 24px; }
  .hero-photo img { height: auto; aspect-ratio: 3 / 4; }

  .split { grid-template-columns: minmax(0, 380fr) minmax(0, 744fr); align-items: start; }
  .split > .label { padding-top: 6px; }
  .split-body { grid-column: 2; }
  .who-body p { font-size: 21px; line-height: 1.5; }
  .who-body p + p { margin-top: 28px; }
  .intro, .talk-intro { font-size: 28px; line-height: 1.3; }

  .areas { margin-top: 64px; }
  .area {
    grid-template-columns: minmax(0, 380fr) minmax(0, 744fr);
    grid-template-areas: "tile title" "tile text";
    grid-template-rows: auto 1fr;
    column-gap: 0; row-gap: 12px; align-items: start;
    padding-block: 38px 40px;
  }
  .area-title { font-size: 36px; }
  .area-text { font-size: 19px; line-height: 1.5; }

  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; margin-top: 64px; }
  .card-body { padding: 28px 28px 32px; }
  .card-name { font-size: 28px; }
  .card-line { margin-top: 8px; font-size: 18px; }
  .card-link { margin-top: 24px; font-size: 18px; }
  .arrow-short { width: 45.41px; }

  .talk { row-gap: 56px; }
  .talk-text { max-width: 560px; }
  .talk-ig { margin-top: 40px; font-size: 18px; }
  .contact-form { padding: 48px; max-width: 560px; }
  .field > label, .field > legend { font-size: 16px; margin-bottom: 15px; }
  .field + .field { margin-top: 28px; }
  .field.choices + .field { margin-top: 20px; }
  .field > legend { margin-bottom: 19px; }
  .field input[type="text"], .field input[type="email"] { height: 56px; font-size: 18px; }
  .field textarea { height: 140px; font-size: 18px; }
  .choice-grid { gap: 12px; }
  .choice span { height: 52px; padding-inline: 16px; font-size: 17px; }
  .send { margin-top: 28px; height: 64px; padding-inline: 32px; font-size: 20px; }
  .arrow-long { width: 91.41px; }

  .footer-inner { flex-direction: row; justify-content: space-between; align-items: baseline; padding-block: 40px 60px; }
  .footer-name { font-size: 20px; }
  .footer-ig { font-size: 17px; }
}

/* =======================================================
   Desktop (1100+): exact wireframe values (1440 frame)
   ======================================================= */
@media (min-width: 1100px) {
  :root { --gutter: 48px; --band-pad: 120px; --tile: 160px; --tile-scale: 1; }

  .header-inner { padding-block: 30px 40px; }
  .site-name { font-size: 26px; }
  .site-nav { gap: 40px; }
  .site-nav a, .site-nav .nav-talk { font-size: 18px; }

  .hero-inner { grid-template-columns: minmax(0, 1fr) 480px; column-gap: 44px; }
  .hero-text { padding: 86px 0 64px; }
  .hero-title { font-size: 68px; max-width: 600px; }
  .hero-sub { margin-top: 28px; font-size: 28px; }
  .hero-photo img { width: 480px; height: 640px; aspect-ratio: auto; }

  .label { font-size: 16px; }
  .who-body p { font-size: 26px; }
  .intro, .talk-intro { font-size: 34px; }
  .area-title { font-size: 44px; }
  .area-text { font-size: 22px; }
  .areas { margin-top: 80px; }

  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card-name { font-size: 30px; }
  .card-line { font-size: 19px; }
  .card-link { font-size: 19px; }

  .talk { grid-template-columns: minmax(0, 1fr) 560px; column-gap: 64px; align-items: start; }
  .talk-text { max-width: 440px; }
  .talk-text .label { margin-bottom: 24px; }
  .talk-ig { font-size: 20px; }
  .contact-form { width: 560px; }
}
