/* Real Friends, a creative agency
   One typeface: Helvetica. White ground, black type, generous air. */

:root{
  --ink:      #111111;
  --ink-2:    #5c5c61;   /* small secondary text, 6.6:1 */
  --ink-3:    #76767b;   /* labels, meta, 4.6:1 */
  --mute:     #8e8e94;   /* large display text only, 3.3:1 */
  --rule:     #e6e6e6;
  --white:    #ffffff;
  --nav-h:    64px;
  --font: Helvetica, "Helvetica Neue", "Nimbus Sans", Arial, sans-serif;
}

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

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

body{
  margin:0;
  background:var(--white);
  color:var(--ink);
  font-family:var(--font);
  font-size:16px;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
}

.wrap{
  max-width:1060px;
  margin:0 auto;
  padding-left:32px;
  padding-right:32px;
}

/* ── trademark ──────────────────────────────────────────────
   Scaling a ™ down also drops it below the cap line, so it is
   shifted back up. Keep font-size and top in step if either moves. */
.tm{
  font-size:.6em;
  letter-spacing:0;
  margin-left:.08em;
  position:relative;
  top:-.45em;
}

/* ── nav ────────────────────────────────────────────────── */
/* full-bleed white bar: a centred background would let the hero
   show through at the edges once the page scrolls under it */
.nav{
  position:sticky; top:0; z-index:10;
  background:var(--white);
  border-bottom:1px solid var(--rule);
}
.nav-inner{
  height:var(--nav-h);
  display:flex; align-items:center; justify-content:space-between;
  gap:24px;
  max-width:1060px;
  margin:0 auto;
  padding:0 32px;
}

.wordmark{
  font-size:17px; font-weight:bold;
  letter-spacing:-.02em;
  color:var(--ink);
  text-decoration:none;
}

.nav nav{ display:flex; align-items:center; gap:26px; }
.nav nav a{
  font-size:14px;
  color:var(--ink);
  text-decoration:none;
}
.nav nav a:hover{ color:#000; }

/* ── hero ───────────────────────────────────────────────── */
.hero{
  position:relative;
  height:min(76vh, 640px);
  min-height:320px;
  /* painted before the video decodes */
  background:#0d0d0f;
  overflow:hidden;
}

.hero-video{
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit:cover;
  display:block;
}

.hero-overlay{
  position:relative;
  height:100%;
  max-width:1060px;
  margin:0 auto;
  padding:0 32px 46px;
  display:flex; align-items:flex-end; justify-content:flex-end;
}
/* scrim only where the type sits, so the footage stays readable */
.hero::after{
  content:"";
  position:absolute; inset:0;
  background:linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.42) 26%, rgba(0,0,0,.10) 55%, rgba(0,0,0,0) 78%);
  pointer-events:none;
}
.hero-overlay{ z-index:1; }

.hero-title{
  margin:0;
  text-align:right;
  color:#fff;
  font-size:clamp(30px, 5.4vw, 62px);
  line-height:1.1;
  font-weight:bold;
  letter-spacing:-.03em;
  text-shadow:0 1px 3px rgba(0,0,0,.45), 0 2px 26px rgba(0,0,0,.35);
}
.hero-title .line{ display:block; }

/* ── blocks ─────────────────────────────────────────────── */
.thesis-block{ padding-top:90px; padding-bottom:20px; }

/* subpages open straight into a heading, with no hero above it */
.page-head{
  padding-top:76px;
  padding-bottom:8px;
}

.block{
  padding-top:90px;
  padding-bottom:20px;
  scroll-margin-top:var(--nav-h);
}

.label{
  margin:0 0 20px;
  font-size:12px; font-weight:bold;
  letter-spacing:.11em; text-transform:uppercase;
  color:var(--ink-3);
}

.thesis{
  margin:0 0 64px;
  max-width:19ch;
  font-size:clamp(30px, 4.6vw, 54px);
  line-height:1.14;
  font-weight:bold;
  letter-spacing:-.03em;
  color:var(--mute);
}
.thesis em{ font-style:normal; color:var(--ink); }

.lede{
  margin:0 0 26px;
  max-width:20ch;
  font-size:clamp(24px, 3.1vw, 36px);
  line-height:1.2;
  font-weight:bold;
  letter-spacing:-.025em;
}

.prose p{
  margin:0 0 16px;
  max-width:60ch;
  font-size:17px;
  line-height:1.68;
  color:#3d3d40;
}
.prose em{ font-style:italic; }

/* ── call to action ─────────────────────────────────────── */
.cta{
  display:flex; flex-wrap:wrap; gap:12px;
  margin:0 0 64px;
}

/* ── services ───────────────────────────────────────────── */
.services{
  list-style:none;
  margin:0;
  padding:0;
  border-top:1px solid var(--rule);
  max-width:760px;
}
.services li{
  display:flex; align-items:baseline; justify-content:space-between;
  gap:24px;
  padding:17px 0;
  border-bottom:1px solid var(--rule);
}
.s-name{ font-size:18px; letter-spacing:-.01em; }
.s-kind{ font-size:14px; color:var(--ink-3); text-align:right; flex:none; }

/* ── form ───────────────────────────────────────────────── */
#contact-form{ max-width:620px; margin-top:34px; }

.row2{ display:grid; grid-template-columns:1fr 1fr; gap:22px; }

.field{ margin-bottom:22px; }
.field label{
  display:block;
  margin-bottom:7px;
  font-size:13px;
  color:var(--ink-2);
}

input,select,textarea{
  width:100%;
  font-family:var(--font);
  font-size:16px;
  color:var(--ink);
  background:transparent;
  border:0;
  border-bottom:1px solid #cfcfd3;
  border-radius:0;
  padding:8px 0;
}
textarea{ resize:vertical; line-height:1.6; }
select{ appearance:none; }

input:focus,select:focus,textarea:focus{
  outline:none;
  border-bottom-color:var(--ink);
}
input.invalid,textarea.invalid{ border-bottom-color:#c9372c; }

.note{
  margin:0 0 18px;
  min-height:18px;
  font-size:13px;
  color:var(--ink-2);
}
.note.err{ color:#c9372c; }

.btn{
  font-family:var(--font);
  font-size:15px;
  font-weight:bold;
  color:#fff;
  background:var(--ink);
  border:0;
  border-radius:100px;
  padding:13px 38px;
  cursor:pointer;
}
.btn:hover{ background:#000; }

/* anchors reuse .btn, so the padding has to survive being inline */
a.btn{
  display:inline-block;
  text-decoration:none;
  line-height:1.2;
}

.btn-line{
  background:transparent;
  color:var(--ink);
  box-shadow:inset 0 0 0 1px #c9c9cd;
}
.btn-line:hover{
  background:transparent;
  box-shadow:inset 0 0 0 1px var(--ink);
}

/* ── footer ─────────────────────────────────────────────── */
.foot{
  display:flex; align-items:baseline; justify-content:space-between;
  gap:20px; flex-wrap:wrap;
  margin-top:110px;
  padding-top:26px;
  padding-bottom:60px;
  border-top:1px solid var(--rule);
}
.foot-mark{
  margin:0;
  font-size:15px; font-weight:bold;
  letter-spacing:-.02em;
}
.foot-meta{
  margin:0;
  font-size:13px;
  color:var(--ink-3);
}
.foot-meta a{ color:var(--ink-2); text-decoration:none; }
.foot-meta a:hover{ color:var(--ink); text-decoration:underline; }

/* ── narrow ─────────────────────────────────────────────── */
@media (max-width:720px){
  .wrap, .nav-inner, .hero-overlay{ padding-left:22px; padding-right:22px; }
  .nav nav{ gap:18px; }
  .nav nav a{ font-size:13px; }
  .hero{ height:min(60vh, 460px); }
  .hero-overlay{ padding-bottom:30px; }
  .thesis-block, .block{ padding-top:62px; }
  .thesis{ max-width:none; margin-bottom:40px; }
  .cta{ margin-bottom:48px; }
  .cta .btn{ flex:1 1 100%; text-align:center; }
  .page-head{ padding-top:52px; }
  .lede{ max-width:none; }
  .row2{ grid-template-columns:1fr; gap:0; }
  .services li{ flex-direction:column; gap:3px; }
  .s-kind{ text-align:left; }
  .foot{ margin-top:80px; }
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  .hero-video{ display:none; }
}

/* ── portfolio & admin ──────────────────────────────────── */

.gate-form{ margin-top:34px; max-width:420px; }

.muted{ color:var(--ink-3); font-size:15px; max-width:60ch; }

.project{
  padding:26px 0;
  border-top:1px solid var(--rule);
  max-width:760px;
}
.project:last-child{ border-bottom:1px solid var(--rule); }
.p-title{ margin:0 0 6px; font-size:22px; letter-spacing:-.02em; }
.p-meta{ margin:0 0 12px; font-size:13px; color:var(--ink-3); }
.p-body{
  margin:0; max-width:60ch;
  font-size:16px; line-height:1.65; color:#3d3d40;
}

.warn{
  max-width:70ch;
  margin:0 0 18px;
  padding:14px 16px;
  border-left:2px solid var(--ink);
  background:#f7f7f7;
}
.warn p{ margin:0; font-size:14px; line-height:1.6; }
.warn code{ font-family:inherit; background:#e9e9e9; padding:0 4px; }

.card{
  max-width:620px;
  margin:0 0 20px;
  padding:18px 20px;
  border:1px solid var(--rule);
}
.card-head{
  display:flex; align-items:baseline; justify-content:space-between;
  gap:16px; margin-bottom:14px;
}
.card-head strong{ font-size:15px; letter-spacing:-.01em; }

.link-btn{
  border:0; background:transparent;
  font-family:var(--font); font-size:13px;
  color:var(--ink-3); cursor:pointer; padding:0;
}
.link-btn:hover{ color:#c9372c; text-decoration:underline; }

.checks{ display:flex; flex-wrap:wrap; gap:8px 18px; margin-top:6px; }
.check{
  display:flex; align-items:center; gap:7px;
  font-size:14px; color:var(--ink); margin:0;
}
.check input{ width:auto; margin:0; }

.pw-row{ display:flex; gap:10px; align-items:flex-end; }
.pw-row input{ flex:1; }

.btn-sm{ font-size:13px; padding:8px 18px; }

.new-account{
  max-width:620px;
  margin-top:24px; padding-top:22px;
  border-top:1px solid var(--rule);
}

/* the admin panel reuses .form for layout but is not a <form> */
.form .field:last-child{ margin-bottom:0; }

/* ── portfolio disc in the nav ──────────────────────────── */
.disc{
  position:relative;
  /* block + line-height:1 makes the box the glyph itself, so the flex
     centring on .nav nav lines it up with the text links rather than
     leaving it riding on their baseline */
  display:block;
  font-size:19px;
  line-height:1;
  text-decoration:none;
  /* the emoji carries its own colour; keep it off the link palette */
  color:inherit;
}
.disc::after{
  content:"Portfolio";
  position:absolute;
  top:calc(100% + 9px); right:0;
  padding:5px 9px;
  background:var(--ink); color:#fff;
  font-size:12px; line-height:1.3; letter-spacing:0;
  white-space:nowrap;
  border-radius:5px;
  opacity:0; pointer-events:none;
  transition:opacity .12s ease;
}
.disc:hover::after,
.disc:focus-visible::after{ opacity:1; }


/* ── honeypot ───────────────────────────────────────────── */
/* Off-screen rather than display:none, because some bots skip anything
   hidden. People never see it; script.js never reads it. */
.hp-wrap{
  position:absolute;
  left:-9999px; top:auto;
  width:1px; height:1px;
  overflow:hidden;
}

/* ── inquiries ──────────────────────────────────────────── */

.tabs{
  display:flex; flex-wrap:wrap; gap:8px;
  margin:0 0 26px;
}
.tab{
  display:inline-flex; align-items:baseline; gap:8px;
  font-family:var(--font); font-size:13px;
  color:var(--ink-2);
  background:transparent;
  border:0;
  box-shadow:inset 0 0 0 1px var(--rule);
  border-radius:100px;
  padding:7px 16px;
  cursor:pointer;
}
.tab:hover{ color:var(--ink); box-shadow:inset 0 0 0 1px #c9c9cd; }
.tab.on{
  color:#fff; background:var(--ink);
  box-shadow:none;
}
/* the total sits back; only the unread count is allowed to shout */
.tab-n{ opacity:.5; }
.tab-new{
  font-weight:bold;
  color:#c9372c;
}
.tab.on .tab-new{ color:#ff9b92; }

.inq{ max-width:760px; }
/* an unread one carries a rule down its edge, the only marker the palette
   allows without introducing a colour */
.inq-new{ border-left:2px solid var(--ink); }

.inq .card-head{ margin-bottom:6px; }
.inq-when{ font-size:13px; color:var(--ink-3); flex:none; }

.inq-meta{
  margin:0 0 14px;
  font-size:12px;
  letter-spacing:.04em; text-transform:uppercase;
  color:var(--ink-3);
}

.inq-field{
  margin:0 0 9px;
  font-size:15px; line-height:1.6;
  max-width:60ch;
  white-space:pre-wrap;
}
.inq-key{
  display:block;
  font-size:12px;
  letter-spacing:.04em;
  color:var(--ink-3);
}

.inq-acts{
  display:flex; flex-wrap:wrap; gap:18px;
  margin-top:16px; padding-top:14px;
  border-top:1px solid var(--rule);
}
.inq-acts .link-btn{ text-decoration:none; }
.inq-acts .link-btn:hover{ color:var(--ink); }
.inq-acts .inq-del:hover{ color:#c9372c; }
