/* ==========================================================================
   May'r Development
   The brand is a signature: a calligraphic surname in navy-to-royal ink.
   The page follows it — one confident stroke, quiet everything else.
   ========================================================================== */

@font-face {
  font-family: 'Newsreader';
  src: url('/fonts/newsreader-latin.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Sans';
  src: url('/fonts/instrument-sans-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Sampled from the logo gradient, dark end to light end. */
  --ink:        #0C1733;
  --navy:       #1B2C57;
  --royal:      #3A5CA3;
  --steel:      #7E9AD4;
  --mist:       #A9BDE4;
  --pale:       #E8EEFA;
  --paper:      #F4F6FA;
  --ink-muted:  #4C5C84;
  --rule:       rgba(12, 23, 51, .13);
  --rule-light: rgba(168, 193, 236, .18);

  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --sans:  'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--navy);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: inherit; }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 50;
  background: var(--pale);
  color: var(--ink);
  padding: .75rem 1.25rem;
  font-size: .9375rem;
}
.skip:focus { left: 1rem; top: 1rem; }

.wrap {
  width: min(1160px, 100% - 3rem);
  margin-inline: auto;
}

/* --- Sections ------------------------------------------------------------ */

section.paper,
section.ink {
  padding-block: clamp(4.5rem, 8vw, 7.5rem);
}

section.paper { background: var(--paper); color: var(--navy); }

section.ink {
  background: var(--ink);
  color: var(--mist);
}

section.ink h2, section.ink h3 { color: var(--pale); }
section.paper h2, section.paper h3 { color: var(--ink); }

h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: -.012em;
  max-width: 21ch;
}

h3 {
  font-size: 1.3125rem;
  line-height: 1.25;
  letter-spacing: -.005em;
}

.section-lede {
  margin-top: 1.1rem;
  max-width: 48ch;
  color: var(--ink-muted);
}
section.ink .section-lede { color: var(--mist); }

.ink :focus-visible,
.bar :focus-visible { outline-color: var(--pale); }

/* --- Top bar ------------------------------------------------------------- */

.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--ink);
}

.bar-inner {
  width: min(1160px, 100% - 3rem);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: .85rem;
}

.bar-mark img { height: 32px; width: auto; }

.bar-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  font-size: .9375rem;
}

.bar-nav a {
  color: var(--mist);
  text-decoration: none;
  transition: color .18s ease;
}
.bar-nav a:hover { color: var(--pale); }

.bar-cta {
  border: 1px solid rgba(168, 193, 236, .4);
  border-radius: 4px;
  padding: .45rem 1rem;
  transition: border-color .18s ease, background-color .18s ease;
}
.bar-cta:hover { border-color: var(--mist); background: rgba(168, 193, 236, .1); }

/* --- Hero ---------------------------------------------------------------- */

.hero {
  background: var(--ink);
  color: var(--mist);
  padding-block: clamp(4rem, 9vw, 8rem) clamp(4.5rem, 9vw, 8rem);
  overflow: hidden;
}

.hero-inner {
  width: min(1160px, 100% - 3rem);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
  align-items: center;
  gap: clamp(2.5rem, 5vw, 4.5rem);
}

.hero h1 {
  color: var(--pale);
  font-size: clamp(2.5rem, 5.4vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: -.022em;
  max-width: 17ch;
}

.lede {
  margin-top: 1.5rem;
  max-width: 48ch;
  font-size: 1.125rem;
  line-height: 1.62;
  color: var(--mist);
}

.actions {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: .85rem 1rem;
}

.btn {
  display: inline-block;
  background: var(--pale);
  color: var(--ink);
  text-decoration: none;
  font-size: .9375rem;
  font-weight: 500;
  padding: .85rem 1.6rem;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: background-color .18s ease;
}
.btn:hover { background: #fff; }

.btn-quiet {
  background: transparent;
  color: var(--pale);
  border-color: rgba(168, 193, 236, .38);
}
.btn-quiet:hover { background: rgba(168, 193, 236, .1); border-color: var(--mist); }

/* The one piece of motion on the page: the mark draws itself in. */
.hero-mark {
  position: relative;
  justify-self: center;
}

.hero-mark img {
  position: relative;
  width: 100%;
}

.hero-bloom {
  position: absolute;
  inset: -45% -30%;
  background: radial-gradient(closest-side, rgba(58, 92, 163, .55), rgba(58, 92, 163, 0) 72%);
}

/* Motion is the enhancement, never the prerequisite: if the animation never runs,
   the mark is already on screen. */
@media (prefers-reduced-motion: no-preference) {
  .hero-mark img { animation: stroke 1.8s cubic-bezier(.33, .68, .36, 1) .25s both; }
  .hero-bloom    { animation: bleed 2.4s ease-out .1s both; }
}

@keyframes stroke {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 -2% 0 0); }
}

@keyframes bleed {
  from { opacity: 0; transform: scale(.9); }
  to   { opacity: 1; transform: scale(1); }
}

/* --- What we build: a ruled ledger, not a deck of cards ------------------- */

.ledger {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 1px solid var(--rule);
}

.ledger li {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 11fr) minmax(0, 4fr);
  gap: clamp(.5rem, 3vw, 3rem);
  align-items: baseline;
  padding-block: clamp(1.6rem, 3vw, 2.4rem);
  border-bottom: 1px solid var(--rule);
}

.ledger p { color: var(--ink-muted); max-width: 54ch; }

.ledger .span {
  font-size: .8125rem;
  color: var(--royal);
  text-align: right;
  letter-spacing: .01em;
}

/* --- How it runs: phases strung along a single stroke --------------------- */

.phases {
  position: relative;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.phases::before {
  content: "";
  position: absolute;
  left: 8rem;
  top: 2.3rem;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, var(--royal), var(--steel));
}

.phases li:last-child::before {
  content: "";
  position: absolute;
  left: calc(8rem - 1px);
  top: 2.3rem;
  bottom: 0;
  width: 3px;
  background: var(--ink);
}

.phases li {
  position: relative;
  padding: 1.9rem 0 1.9rem calc(8rem + 2.25rem);
}

.phases li::after {
  content: "";
  position: absolute;
  left: calc(8rem - 3px);
  top: 2.15rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--steel);
}

.phases .when {
  position: absolute;
  left: 0;
  top: 1.95rem;
  width: 7rem;
  font-size: .875rem;
  letter-spacing: .01em;
  color: var(--steel);
}

.phases p {
  margin-top: .6rem;
  max-width: 50ch;
  color: var(--mist);
}

/* --- Founder note -------------------------------------------------------- */

.note-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .5fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.note h2 { max-width: 24ch; }

.note p {
  margin-top: 1.25rem;
  max-width: 50ch;
  color: var(--ink-muted);
}

.note .sign {
  margin-top: 1.9rem;
  font-family: var(--serif);
  font-size: 1.0625rem;
  color: var(--ink);
}

.note-mark {
  width: 100%;
  max-width: 280px;
  justify-self: center;
}

/* --- Contact ------------------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: start;
}

.aside {
  border-left: 1px solid var(--rule-light);
  padding-left: clamp(1.5rem, 3vw, 3rem);
  padding-top: .4rem;
}

.aside-head {
  font-family: var(--serif);
  font-size: 1.125rem;
  color: var(--pale);
}

.ask {
  margin-top: 1.25rem;
  display: grid;
  gap: .7rem;
  max-width: 52ch;
}

.ask li {
  position: relative;
  padding-left: 1.6rem;
}

.ask li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .78em;
  width: .7rem;
  height: 1px;
  background: var(--steel);
}

.mailto {
  display: inline-block;
  margin-top: 2.5rem;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 4.2vw, 2.6rem);
  line-height: 1.2;
  color: var(--pale);
  text-decoration: none;
  overflow-wrap: anywhere;
  border-bottom: 1px solid rgba(168, 193, 236, .45);
  padding-bottom: .1em;
  transition: border-color .18s ease;
}
.mailto:hover { border-bottom-color: var(--pale); }

.fineprint {
  margin-top: 1.5rem;
  font-size: .875rem;
  color: var(--steel);
}

/* --- Footer -------------------------------------------------------------- */

.foot {
  background: var(--ink);
  color: var(--steel);
  border-top: 1px solid var(--rule-light);
  padding-block: 2.5rem;
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2.5rem;
}

.foot img { height: 38px; width: auto; }

.foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: .9375rem;
}

.foot-nav a { color: var(--mist); text-decoration: none; }
.foot-nav a:hover { color: var(--pale); }

.foot .copy { font-size: .8125rem; }

/* --- Narrower screens ---------------------------------------------------- */

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 3rem; }

  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .aside { border-left: 0; padding-left: 0; }
  .hero h1 { max-width: 20ch; }
  /* Keep the tail of the M clear of the gutter once the 26rem cap stops binding. */
  .hero-mark { width: min(100% - 2.5rem, 26rem); justify-self: start; }

  .ledger li { grid-template-columns: 1fr; gap: .55rem; }
  .ledger .span { text-align: left; }

  .note-inner { grid-template-columns: 1fr; }
  .note-mark { max-width: 220px; justify-self: start; }
}

@media (max-width: 720px) {
  .phases::before { left: 0; }
  .phases li:last-child::before { left: -1px; }
  .phases li { padding-left: 1.75rem; }
  .phases li::after { left: -3px; top: 2.2rem; }
  .phases .when {
    position: static;
    display: block;
    width: auto;
    margin-bottom: .35rem;
  }
}

@media (max-width: 620px) {
  .wrap, .bar-inner, .hero-inner { width: min(1160px, 100% - 2rem); }
  .bar-nav { gap: 1rem; }
  .bar-nav a:not(.bar-cta) { display: none; }
  .bar-mark img { height: 27px; }
  .actions .btn { flex: 1 1 auto; text-align: center; }
}

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