/* Fairleads Advisors. The run of a line: salt ground, one oxblood line that
   snakes down the page through alternating legs and turns through a ring at
   every bend. Condensed uppercase display, centred masthead. */

:root {
  --ox: #801F24;
  --ox-deep: #5E161A;
  --pewter: #8E8A82;
  --salt: #F6F4EF;
  --lime: #EAE6DD;
  --ink: #1E1B1B;
  --muted: #57524D;
  --display: "Barlow Condensed", "Arial Narrow", "Segoe UI", sans-serif;
  --text: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(16px, 5vw, 64px);
  --max: 1120px;
  --bend: 64px;
  --line: 2px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }

body {
  margin: 0;
  background: var(--salt);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.68;
  overflow-x: hidden;
}

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

a { color: var(--ox); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--ox-deep); text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--ox); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.02;
  margin: 0 0 0.5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.5rem, 6.2vw, 4.6rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.45rem; font-weight: 600; margin-bottom: 0.3em; }
p { margin: 0 0 1.05em; }
strong { font-weight: 600; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.2em; }
li { margin-bottom: 0.4em; }
address { font-style: normal; }

/* the ring before each section heading */
h2.ringed::before {
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  margin: 0 0.35em 0.09em 0;
  border: 3px solid var(--ox);
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--salt), inset 0 0 0 3px var(--pewter);
}

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

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--ox); color: var(--salt); padding: 10px 14px; text-decoration: none;
}
.skip:focus { top: 12px; }

main:focus { outline: none; }

/* ------------------------------------------------------------ masthead */

.mast { border-bottom: 1px solid var(--lime); }
.mast-in {
  max-width: var(--max); margin: 0 auto; padding: 26px var(--gutter) 0;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px; min-height: 44px;
  color: var(--ink); text-decoration: none;
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(1.6rem, 3.2vw, 2.1rem); letter-spacing: 0.04em; line-height: 1;
}
.brand:hover { color: var(--ox); }
.brand .mark { width: 40px; height: 40px; flex: none; }
.mast-sub { margin: 6px 0 14px; font-size: 0.86rem; color: var(--muted); letter-spacing: 0.02em; }

.menu {
  display: none;
  font: 600 0.95rem var(--text); color: var(--ox);
  background: none; border: 2px solid var(--ox); border-radius: 2px;
  min-height: 44px; padding: 0 22px; margin-bottom: 14px; cursor: pointer;
}

.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; }
.nav li { margin: 0; }
.nav a {
  display: flex; align-items: center; min-height: 48px; padding: 0 18px;
  color: var(--ink); text-decoration: none;
  font-family: var(--display); font-weight: 600; text-transform: uppercase;
  font-size: 1.08rem; letter-spacing: 0.08em;
  border-bottom: 3px solid transparent;
}
.nav a:hover { color: var(--ox); }
.nav a[aria-current="page"] { color: var(--ox); border-bottom-color: var(--ox); }

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

.hero { padding: clamp(40px, 7vw, 84px) 0 clamp(36px, 5vw, 60px); text-align: center; }
.kicker {
  font-family: var(--display); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.14em; font-size: 0.98rem; color: var(--ox); margin-bottom: 0.9em;
}
.hero h1 { max-width: 17em; margin-left: auto; margin-right: auto; }
.hero .lead { max-width: 40em; margin: 0 auto 1.6em; }
.lead { font-size: 1.16rem; color: var(--muted); }

/* the line enters from the viewport edge, runs through the fairlead ring,
   passes behind the name and leaves on the other side */
.rope {
  display: flex; align-items: center; gap: clamp(10px, 2vw, 22px);
  margin: clamp(28px, 5vw, 48px) calc(50% - 50vw) clamp(26px, 4vw, 40px);
}
.rope::before, .rope::after { content: ""; flex: 1 1 0; min-width: 18px; border-top: var(--line) solid var(--ox); }
.rope-ring {
  flex: none; width: clamp(26px, 4vw, 42px); height: clamp(26px, 4vw, 42px);
  margin-right: calc(-1 * clamp(4px, 1vw, 10px));
  border: 4px solid var(--ox); border-radius: 50%;
  box-shadow: inset 0 0 0 3px var(--salt), inset 0 0 0 4px var(--pewter);
  background: var(--salt);
}
.rope-name {
  flex: none;
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(2.6rem, 11vw, 9.4rem); line-height: 0.9; letter-spacing: 0.005em;
  color: var(--ink);
}
.rope-name span { color: var(--ox); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 26px;
  background: var(--ox); color: var(--salt); border: 2px solid var(--ox); border-radius: 2px;
  font-family: var(--display); font-weight: 600; text-transform: uppercase;
  font-size: 1.1rem; letter-spacing: 0.08em; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--ox-deep); border-color: var(--ox-deep); color: var(--salt); }
.btn.ghost { background: transparent; color: var(--ox); }
.btn.ghost:hover { background: var(--ox); color: var(--salt); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ------------------------------------------------------ the run of legs */

.run { max-width: var(--max); margin: 0 auto clamp(40px, 6vw, 72px); padding: 0 var(--gutter); }
.leg { position: relative; padding: clamp(40px, 5vw, 64px) calc(var(--bend) + 28px); }
.leg::before {
  content: ""; position: absolute; top: 0; left: var(--bend); right: var(--bend);
  border-top: var(--line) solid var(--ox);
}
.leg::after {
  content: ""; position: absolute; top: 0; bottom: calc(-1 * var(--line)); width: var(--bend);
  border: var(--line) solid var(--ox);
}
.leg.to-r::after { right: 0; border-left: 0; border-radius: 0 var(--bend) var(--bend) 0; }
.leg.to-l::after { left: 0; border-right: 0; border-radius: var(--bend) 0 0 var(--bend); }
/* the last leg lands the line and stops */
.leg.last::after { bottom: 50%; border-bottom: 0; }
.leg.to-r.last::after { border-radius: 0 var(--bend) 0 0; }
.leg.to-l.last::after { border-radius: var(--bend) 0 0 0; }

.leg .ring {
  position: absolute; top: 50%; width: 24px; height: 24px; margin-top: -12px;
  border: 3px solid var(--ox); border-radius: 50%; background: var(--salt);
  box-shadow: inset 0 0 0 3px var(--salt), inset 0 0 0 4px var(--pewter);
  z-index: 1;
}
.leg.to-r .ring { right: calc(-12px + var(--line) / 2); }
.leg.to-l .ring { left: calc(-12px + var(--line) / 2); }
.leg.last .ring { top: 50%; }

.leg-body { max-width: 640px; }
.leg.to-l .leg-body { margin-left: auto; }
.leg-body > :last-child { margin-bottom: 0; }

.leg .more {
  display: inline-flex; align-items: center; min-height: 44px;
  font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 1.05rem; text-decoration: none;
}
.leg .more::after { content: "\2192"; margin-left: 8px; }

/* ------------------------------------------------------- plain sections */

.band { background: var(--lime); }
.section { padding: clamp(44px, 6vw, 76px) 0; }
.section.tight { padding-top: 0; }
.cols { display: grid; gap: clamp(26px, 4vw, 56px); grid-template-columns: 1fr; }
@media (min-width: 860px) {
  .cols.two { grid-template-columns: 1fr 1fr; }
  .cols.aside { grid-template-columns: 1.55fr 1fr; }
}
.muted { color: var(--muted); }
.small { font-size: 0.93rem; }

/* steps hang from the line as rings, never numbers */
.hang { list-style: none; margin: 0; padding: 0 0 0 42px; position: relative; }
.hang::before {
  content: ""; position: absolute; left: 11px; top: 14px; bottom: 14px;
  border-left: var(--line) solid var(--ox);
}
.hang > li { position: relative; margin: 0 0 clamp(26px, 3vw, 36px); }
.hang > li:last-child { margin-bottom: 0; }
.hang > li::before {
  content: ""; position: absolute; left: -42px; top: 2px; width: 24px; height: 24px;
  border: 3px solid var(--ox); border-radius: 50%; background: var(--salt);
  box-shadow: inset 0 0 0 3px var(--salt), inset 0 0 0 4px var(--pewter);
}
.band .hang > li::before { background: var(--lime); box-shadow: inset 0 0 0 3px var(--lime), inset 0 0 0 4px var(--pewter); }
.hang h3 { margin-top: 0; }
.hang p { margin-bottom: 0.6em; }

/* two-column question list on notes */
.qa { border-top: var(--line) solid var(--ox); }
.qa > div { display: grid; gap: 6px 40px; padding: 26px 0; border-bottom: 1px solid #D6D0C4; }
@media (min-width: 860px) { .qa > div { grid-template-columns: 5fr 7fr; } }
.qa h3 { font-size: 1.35rem; margin: 0; }
.qa p:last-child { margin-bottom: 0; }

/* kinds of names on inventory */
.kinds { display: grid; gap: 0; grid-template-columns: 1fr; border-top: var(--line) solid var(--ox); }
@media (min-width: 760px) { .kinds { grid-template-columns: 1fr 1fr; column-gap: 48px; } }
.kinds > div { padding: 24px 0; border-bottom: 1px solid #D6D0C4; }
.kinds h3 { margin: 0 0 0.3em; }
.kinds .eg { font-family: var(--display); font-weight: 600; font-size: 1.2rem; letter-spacing: 0.03em; color: var(--ox); text-transform: lowercase; margin: 0 0 0.4em; }
.kinds p:last-child { margin-bottom: 0; }

.lookup { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.lookup label { flex-basis: 100%; margin: 0; }
.lookup input { flex: 1 1 240px; }

/* portrait in a fairlead */
.portrait {
  width: min(300px, 72vw); aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  border: 4px solid var(--ox);
  box-shadow: 0 0 0 7px var(--salt), 0 0 0 8px var(--pewter);
  margin: 8px auto 28px;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait-cap { text-align: center; }
.portrait-cap .who { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: 1.7rem; letter-spacing: 0.02em; margin: 0; line-height: 1.1; }
.portrait-cap .role { color: var(--muted); font-size: 0.95rem; }

/* close band */
.close { background: var(--ox); color: var(--salt); text-align: center; padding: clamp(46px, 6vw, 76px) 0; }
.close h2 { color: var(--salt); }
.close p { max-width: 36em; margin-left: auto; margin-right: auto; }
.close .btn { background: var(--salt); color: var(--ox); border-color: var(--salt); }
.close .btn:hover { background: transparent; color: var(--salt); }
.close :focus-visible { outline-color: var(--salt); }

/* ------------------------------------------------------------- forms */

label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; }
.opt { font-weight: 400; color: var(--muted); }
input, select, textarea {
  width: 100%; font: 400 1rem var(--text); color: var(--ink);
  background: #FFFDF9; border: 1px solid #A9A398; border-radius: 2px;
  min-height: 48px; padding: 10px 12px;
}
textarea { min-height: 150px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--ox); outline: 2px solid var(--ox); outline-offset: 0; }
.fields { display: grid; gap: 18px; }
.pair { display: grid; gap: 18px; }
@media (min-width: 640px) { .pair { grid-template-columns: 1fr 1fr; } }
.hint { font-size: 0.88rem; color: var(--muted); margin: 6px 0 0; }
.status { margin: 0; padding: 12px 14px; border-left: 4px solid var(--ox); background: var(--lime); }
.status.bad { border-left-color: #9A1B10; background: #F5E1DD; }
.side h2 { font-size: 1.5rem; margin-top: 1.3em; }
.side h2:first-child { margin-top: 0; }

/* legal pages */
.legal { max-width: 760px; }
.legal h2 { font-size: 1.7rem; margin-top: 1.4em; }

/* 404 */
.lost { text-align: center; padding: clamp(60px, 10vw, 120px) 0; }

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

.foot { background: var(--ox-deep); color: var(--salt); }
.foot a { color: var(--salt); }
.foot a:hover { color: #FFFFFF; }
.foot :focus-visible { outline-color: var(--salt); }
.foot-in {
  max-width: var(--max); margin: 0 auto; padding: 52px var(--gutter) 30px;
  display: grid; gap: 30px; grid-template-columns: 1fr;
}
@media (min-width: 860px) { .foot-in { grid-template-columns: 1.4fr 1fr 0.8fr; } }
.foot-name { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: 1.6rem; letter-spacing: 0.04em; margin-bottom: 0.4em; }
.foot-h { font-family: var(--display); color: var(--salt); font-size: 1.1rem; letter-spacing: 0.1em; margin-bottom: 0.6em; }
.foot-links { list-style: none; padding: 0; margin: 0; }
.foot-links li { margin: 0; }
.foot-links a, .foot address a { display: inline-flex; align-items: center; min-height: 36px; }
.foot-base {
  max-width: var(--max); margin: 0 auto; padding: 16px var(--gutter) 26px;
  border-top: 1px solid rgba(246, 244, 239, 0.28);
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
  font-size: 0.88rem;
}

/* ------------------------------------------------------------- phones */

@media (max-width: 760px) {
  .menu { display: inline-flex; align-items: center; }
  .nav { display: none; width: 100%; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; border-top: 1px solid var(--lime); }
  .nav a { justify-content: center; border-bottom: 1px solid var(--lime); }
  .nav a[aria-current="page"] { border-bottom-color: var(--ox); }

  /* the snake straightens into one line down the left */
  .run { position: relative; padding-left: calc(var(--gutter) + 30px); }
  .run::before {
    content: ""; position: absolute; top: 0; bottom: 40px; left: calc(var(--gutter) + 8px);
    border-left: var(--line) solid var(--ox);
  }
  .leg { padding: 30px 0 34px; }
  .leg::before, .leg::after { display: none; }
  .leg .ring, .leg.to-r .ring, .leg.to-l .ring { top: 30px; margin-top: 0; left: -33px; right: auto; width: 20px; height: 20px; }
  .leg.to-l .leg-body { margin-left: 0; }
}

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