/* ==========================================================================
   VIRRYN LLC — virryn.com
   Design system: warm ivory ground, copper + olive duotone accents,
   brown-biased charcoal type. One serif voice (hero only), system fonts only.
   ========================================================================== */

:root {
  /* Ground */
  --ivory:        #F7F3EC;
  --ivory-deep:   #EFE8DC;
  --ivory-card:   #FBF9F4;

  /* Type */
  --charcoal:     #23201C;
  --ink:          #55504A;
  --ink-muted:    #6E675F;

  /* Copper: -ink is text-safe (5.15:1 on ivory), bare is decorative, -lit is for dark grounds */
  --copper:       #A75F33;
  --copper-ink:   #99552B;
  --copper-lit:   #C27A4A;

  /* Olive: -ink is text-safe (5.87:1) */
  --olive:        #6B7355;
  --olive-ink:    #5A6147;

  --rule:         rgba(35, 32, 28, 0.12);
  --rule-soft:    rgba(35, 32, 28, 0.07);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --container: 1140px;
  --gutter: clamp(20px, 5vw, 56px);
  --section-y: clamp(72px, 10vw, 136px);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background-color: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Paper tooth: a single low-opacity turbulence layer over the whole page. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='t'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23t)' opacity='0.055'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }

h1, h2, h3 { color: var(--charcoal); margin: 0; font-weight: 600; }
p { margin: 0; }
img, svg { max-width: 100%; height: auto; }

a { color: var(--copper-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--copper); }

:focus-visible {
  outline: 2px solid var(--copper-ink);
  outline-offset: 3px;
  border-radius: 2px;
}
/* The copper ink used for focus is only 2.85:1 against the charcoal footer,
   under the 3:1 that WCAG 1.4.11 requires of a focus indicator. Use the lighter
   copper there instead (4.77:1). */
.site-footer :focus-visible { outline-color: var(--copper-lit); }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--charcoal);
  color: var(--ivory);
  padding: 12px 20px;
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Header ---------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(247, 243, 236, 0.88);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 220ms ease;
}
.site-header[data-scrolled="true"] { border-bottom-color: var(--rule); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: 0.16em;
  color: var(--charcoal);
  text-decoration: none;
}
.wordmark:hover { color: var(--charcoal); }
.wordmark .mark { width: 26px; height: 26px; flex: none; }

.nav { display: flex; align-items: center; gap: 34px; }
.nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9375rem;
  position: relative;
  padding-block: 4px;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background-color: var(--copper);
  transition: width 220ms ease;
}
.nav a:hover { color: var(--charcoal); }
.nav a:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 9px 11px;
  cursor: pointer;
  color: var(--charcoal);
}
.nav-toggle span {
  display: block;
  width: 17px;
  height: 1.5px;
  background-color: currentColor;
}
.nav-toggle span + span { margin-top: 4px; }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background-color: var(--ivory);
    border-block: 1px solid var(--rule);
    padding: 8px var(--gutter) 18px;
  }
  .nav a { padding-block: 13px; border-bottom: 1px solid var(--rule-soft); }
  .nav a:last-child { border-bottom: 0; }
  .nav a::after { display: none; }
  .nav.is-open { display: flex; }
}

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

.hero {
  position: relative;
  padding-top: clamp(64px, 11vw, 136px);
  padding-bottom: clamp(56px, 7vw, 96px);
  overflow: hidden;
}

/* Two very soft washes — copper warm, olive cool — nothing more. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(58rem 32rem at 76% -6%, rgba(167, 95, 51, 0.13), transparent 68%),
    radial-gradient(44rem 28rem at 2% 14%, rgba(107, 115, 85, 0.11), transparent 70%);
}

.hero-inner { max-width: 52rem; }

.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.5rem, 6.4vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.022em;
  text-wrap: balance;
  margin-bottom: 28px;
}
/* The two sentences are the headline's structure, so set them as two lines
   once there is room; below that they reflow as ordinary text. */
@media (min-width: 900px) {
  .hero h1 { text-wrap: nowrap; }
  .hero h1 span { display: block; }
}

.hero-body {
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
  line-height: 1.68;
  max-width: 44rem;
  color: var(--ink);
}

/* The three disciplines, as a measured row rather than a run-on string. */
.disciplines {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 34px;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  color: var(--olive-ink);
}
.disciplines li { display: inline-flex; align-items: center; gap: 16px; }
.disciplines li + li::before {
  content: "";
  width: 4px;
  height: 4px;
  flex: none;
  background-color: var(--copper);
  transform: rotate(45deg);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 44px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 28px;
  border-radius: 3px;
  font-size: 0.96875rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease, transform 200ms ease;
}
.btn-primary {
  background-color: var(--copper-ink);
  color: #FBF9F4;
  border-color: var(--copper-ink);
}
.btn-primary:hover {
  background-color: #85481F;
  border-color: #85481F;
  color: #FBF9F4;
  transform: translateY(-1px);
}
.btn-secondary {
  color: var(--charcoal);
  /* 0.52 alpha -> 3.25:1 on ivory; WCAG 1.4.11 needs 3:1 for a control boundary. */
  border-color: rgba(35, 32, 28, 0.52);
}
.btn-secondary:hover {
  border-color: var(--charcoal);
  background-color: rgba(35, 32, 28, 0.04);
  color: var(--charcoal);
  transform: translateY(-1px);
}

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

.section { padding-block: var(--section-y); }
.section--deep { background-color: var(--ivory-deep); }

/* Structural signature: a hairline break with a copper square at its origin. */
.section-head { margin-bottom: clamp(40px, 5vw, 64px); }
.section-rule {
  position: relative;
  height: 1px;
  background-color: var(--rule);
  margin-bottom: 30px;
}
.section-rule::before {
  content: "";
  position: absolute;
  left: 0;
  top: -2.5px;
  width: 6px;
  height: 6px;
  background-color: var(--copper);
}

.section-head h2 {
  font-size: clamp(1.75rem, 3.3vw, 2.5rem);
  line-height: 1.14;
  letter-spacing: -0.016em;
  text-wrap: balance;
  max-width: 34rem;
}
.section-head .lead {
  margin-top: 20px;
  max-width: 40rem;
  font-size: 1.0625rem;
}

.prose p { max-width: 38rem; }
.prose p + p { margin-top: 22px; }

/* ---------- What we build: three refined cards ------------------------ */

.build-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.4vw, 32px);
}
@media (max-width: 900px) { .build-grid { grid-template-columns: 1fr; } }

.card {
  position: relative;
  background-color: var(--ivory-card);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: clamp(28px, 3vw, 38px);
  transition: border-color 240ms ease;
}
/* Copper bar on the top edge; it extends on hover. No drop shadows anywhere. */
.card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 30px;
  height: 2px;
  background-color: var(--copper);
  transition: width 280ms ease;
}
.card:hover { border-color: rgba(167, 95, 51, 0.4); }
.card:hover::before { width: 68px; }

.card h3 {
  font-size: 1.1875rem;
  letter-spacing: -0.008em;
  margin-bottom: 14px;
}
.card p { font-size: 1rem; color: var(--ink); }

/* ---------- Business OS ----------------------------------------------- */

.os-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}
@media (max-width: 940px) { .os-layout { grid-template-columns: 1fr; } }

.capabilities { padding-top: 6px; }
.capabilities h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--olive-ink);
  margin-bottom: 18px;
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.tag-list li {
  background-color: var(--ivory-card);
  border: 1px solid rgba(107, 115, 85, 0.36);
  border-radius: 2px;
  padding: 9px 15px;
  font-size: 0.90625rem;
  color: var(--olive-ink);
}

/* ---------- Brands ---------------------------------------------------- */

.brand-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 2.6vw, 34px);
}
@media (max-width: 820px) { .brand-grid { grid-template-columns: 1fr; } }

.brand-card {
  display: flex;
  flex-direction: column;
  background-color: var(--ivory-card);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: clamp(32px, 3.6vw, 48px);
  text-decoration: none;
  transition: border-color 240ms ease, transform 240ms ease;
}
.brand-card:hover {
  border-color: rgba(167, 95, 51, 0.45);
  transform: translateY(-2px);
}
.brand-card .brand-name {
  font-size: clamp(1.375rem, 2.2vw, 1.75rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--charcoal);
  margin-bottom: 16px;
}
.brand-card p {
  color: var(--ink);
  font-size: 1rem;
  margin-bottom: 26px;
}
.brand-card .brand-url {
  margin-top: auto;
  font-size: 0.9375rem;
  color: var(--copper-ink);
  border-bottom: 1px solid rgba(153, 85, 43, 0.35);
  align-self: flex-start;
  padding-bottom: 2px;
  transition: border-color 220ms ease;
}
.brand-card:hover .brand-url { border-bottom-color: var(--copper-ink); }

/* ---------- Company facts --------------------------------------------- */

.facts {
  display: grid;
  /* auto-fit rather than a fixed count: the four facts then rebalance to 4/3/2/1
     tracks as width allows, with no orphaned cell on the last row. */
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: clamp(24px, 3vw, 40px);
  margin: 0;
  margin-top: clamp(36px, 4vw, 52px);
  padding-top: 32px;
  border-top: 1px solid var(--rule);
}

.facts dt {
  font-size: 0.875rem;
  color: var(--ink-muted);
  margin-bottom: 7px;
}
.facts dd {
  margin: 0;
  font-size: 1.0625rem;
  color: var(--charcoal);
  font-weight: 500;
}

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

.site-footer {
  background-color: var(--charcoal);
  color: #B9B2A6;
  padding-block: clamp(48px, 6vw, 72px);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 40px;
  align-items: center;
  justify-content: space-between;
}
.site-footer .wordmark { color: var(--ivory); }
.site-footer .wordmark:hover { color: var(--ivory); }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.footer-nav a {
  color: #B9B2A6;
  text-decoration: none;
  font-size: 0.9375rem;
}
.footer-nav a:hover { color: var(--copper-lit); }

.copyright {
  width: 100%;
  margin-top: 8px;
  padding-top: 26px;
  border-top: 1px solid rgba(247, 243, 236, 0.13);
  font-size: 0.875rem;
  color: #8E887E;
}

/* No entrance animation by design. Hero copy is the most important content on
   the page and must never depend on an animation frame to become visible;
   motion here is reserved for hover/focus, which answers a user action.
   ------------------------------------------------------------------------ */

/* Section-head spacing variants (kept in CSS so the page needs no inline styles,
   which lets the CSP ship without 'unsafe-inline'). */
.section-head--tight { margin-bottom: 30px; }
.section-head--flush { margin-bottom: 0; }

/* The disciplines row only wraps below ~360px; past that a separator would be
   stranded at the start of the second line, so drop them and let spacing carry
   the grouping instead. Above this the diamonds still fit on one line. */
@media (max-width: 360px) {
  .disciplines { gap: 6px 18px; }
  .disciplines li + li::before { display: none; }
}

/* ---------- Brand lockup (header) -------------------------------------
   The supplied logo is a raster lockup on an opaque paper ground with no alpha,
   and the paper cannot be keyed out without eroding the artwork. So the V mark
   is presented as a deliberate chip at its own aspect ratio -- cropped from the
   official file, never redrawn or recoloured -- paired with the wordmark in
   type. max-height caps the size; width stays auto so it never distorts. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--charcoal);
}
.brand-mark {
  display: block;
  width: auto;
  height: auto;
  max-height: 38px;
  border-radius: 5px;
  /* The chip's paper is a touch darker than the page; a hairline keeps the
     edge deliberate rather than looking like a stray rectangle. */
  box-shadow: 0 0 0 1px rgba(35, 32, 28, 0.08);
}
.brand-name {
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: 0.16em;
  color: var(--charcoal);
}
@media (max-width: 820px) {
  .brand-mark { max-height: 32px; }
  .brand-name { font-size: 1rem; letter-spacing: 0.14em; }
}

/* Contact address in the company facts. */
.facts dd a {
  display: block;
  width: fit-content;
  color: var(--copper-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.facts dd a + a { margin-top: 5px; }
.facts dd a:hover { color: var(--copper); }
