/* Company: the origin map (real coastline, GSHHG) and a quiet European motif. */
.company-head {
  display: grid;
  gap: clamp(36px, 5vw, 76px);
  align-items: center;
}
.company-head__copy { min-width: 0; }
.company-head .t-lead { max-width: 47ch; }
@media (min-width: 980px) {
  .company-head { grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); }
}

.company-origin {
  min-width: 0; margin: 0; overflow: hidden;
  border: 1px solid #3a3242; border-radius: 4px; background: #110f15;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 22px 70px rgba(0,0,0,.2);
}
.company-origin__meta, .company-origin figcaption {
  display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap;
  gap: 6px 20px; padding-inline: clamp(14px, 2vw, 22px);
}
.page-head .company-origin__meta { display: flex; margin-bottom: 0; }
.company-origin__meta { padding-block: 4px; border-bottom: 1px solid #2c2633; font-size: 11px; }
.company-origin__meta span:first-child { color: var(--accent-2); }
.company-origin figcaption {
  padding-block: 11px 13px; border-top: 1px solid #2c2633;
  color: var(--fg-3); font-family: var(--font-mono); font-size: 10px; letter-spacing: .04em; line-height: 1.5;
}
.company-origin figcaption span:first-child { color: var(--fg-2); }

/* 01 / Origin and 02 / New HQ */
.company-origin__tabs { display: flex; gap: 4px 18px; flex-wrap: wrap; align-items: center; }
.company-origin__tabs button {
  position: relative; display: inline-flex; align-items: center; min-height: 44px;
  padding: 8px 0; border: 0; background: none; cursor: pointer; white-space: nowrap;
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--fg-3);
  transition: color .25s var(--ease);
}
.company-origin__tabs button::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 3px; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.company-origin__tabs button:hover { color: var(--fg-2); }
.company-origin__tabs button[aria-selected="true"] { color: var(--accent-2); }
.company-origin__tabs button[aria-selected="true"]::after { transform: scaleX(1); }
.company-origin__tabs button[data-view="europe"]:not([aria-selected="true"])::before {
  content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 7px; vertical-align: 1px;
  border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(217,166,208,.6);
  animation: origin-tab-hint 2.4s ease-out infinite;
}
@keyframes origin-tab-hint { 0% { box-shadow: 0 0 0 0 rgba(217,166,208,.55); } 70%, 100% { box-shadow: 0 0 0 7px rgba(217,166,208,0); } }
.company-origin__where { color: var(--fg-3); }
.company-origin__stage { position: relative; overflow: hidden; cursor: pointer; background: #0c0a0f; }
.company-origin__stage .origin-map { position: relative; z-index: 1; transform-origin: 50% 50%; will-change: transform, opacity; }
.company-origin__globe { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .company-origin__tabs button[data-view="europe"]::before { animation: none; }
}

.origin-map { display: block; width: 100%; height: auto; }
.origin-map text { font-family: var(--font-mono); letter-spacing: .08em; }
.om-water { fill: #09080b; }
.om-grat { stroke: #2a2430; stroke-width: .6; stroke-dasharray: 1 5; }
.om-iso { fill: none; stroke: #86708c; stroke-width: .7; }
.om-iso--0 { opacity: .5; } .om-iso--1 { opacity: .3; } .om-iso--2 { opacity: .17; } .om-iso--3 { opacity: .09; }
.om-land { fill: #231d2a; }
.om-land-dots { fill: url(#om-dots); }
#om-dots circle { fill: #564a61; }
.om-coast { fill: none; stroke: #bba6b6; stroke-width: 1; stroke-linejoin: round; }
.om-bridge { fill: none; stroke: #8d7b93; stroke-width: 1.3; stroke-linecap: round; }
.om-place { fill: #c9bccd; font-size: 11px; letter-spacing: .22em !important; paint-order: stroke; stroke: #231d2a; stroke-width: 4px; stroke-linejoin: round; }
.om-water-label { fill: #7a6e82; font-size: 9px; letter-spacing: .3em !important; }
.om-feature { fill: #8a7e92; font-size: 8.5px; paint-order: stroke; stroke: #09080b; stroke-width: 3px; }
.om-tick { fill: #6a6072; font-size: 8px; }

.om-link { fill: none; stroke: #d9a6d0; stroke-width: 1.2; opacity: .35; }
.om-link-flow { fill: none; stroke: #ecd4e7; stroke-width: 1.4; stroke-dasharray: 3 7; stroke-linecap: round; }
.om-dist { fill: #ecd4e7; font-size: 9px; paint-order: stroke; stroke: #09080b; stroke-width: 4px; stroke-linejoin: round; }

.om-mark .om-ring { fill: none; stroke: #ecd4e7; stroke-width: 1.2; }
.om-mark .om-dot { fill: #f6e3f2; }
.om-mark .om-pulse { fill: none; stroke: #d9a6d0; stroke-width: 1.2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.om-mark--hq .om-ring { stroke: #d9a6d0; }

.om-leader { fill: none; stroke: #bfa3ba; stroke-width: .8; }
.om-callout text { paint-order: stroke; stroke-linejoin: round; }
.om-callout--origin text { stroke: #231d2a; stroke-width: 4px; }
.om-callout--hq text { stroke: #231d2a; stroke-width: 4px; }
.om-call-title { fill: #f6ecf4; font-size: 12.5px; font-weight: 500; }
.om-call-sub { fill: #d9a6d0; font-size: 8.5px; letter-spacing: .06em !important; }
.om-call-coord { fill: #938799; font-size: 8px; letter-spacing: .02em !important; }

.om-callout--narrow { display: none; }
.om-north path { fill: #8a7e90; }
.om-north text { fill: #8a7e90; font-size: 8px; }
.om-scale text { fill: #8a7e90; font-size: 8px; }
.om-scale-a { fill: #a8949f; } .om-scale-b { fill: #3a3242; }

/* motion: the coast draws in, then the link from Berkeley to San Francisco */
@media (prefers-reduced-motion: no-preference) {
  .om-coast { stroke-dasharray: 1; stroke-dashoffset: 1; animation: om-draw 2.6s cubic-bezier(.4,.1,.2,1) .1s forwards; }
  .om-land, .om-land-dots, .om-bridge, .om-place, .om-water-label, .om-feature { opacity: 0; animation: om-fade 1.2s ease .9s forwards; }
  .om-iso { animation: om-iso-in 1.6s ease both; }
  .om-iso--0 { animation-delay: 1.2s; } .om-iso--1 { animation-delay: 1.4s; } .om-iso--2 { animation-delay: 1.6s; } .om-iso--3 { animation-delay: 1.8s; }
  .om-mark, .om-callout { opacity: 0; animation: om-fade .7s ease forwards; }
  .om-mark--origin, .om-callout--origin { animation-delay: 1.9s; }
  .om-link { stroke-dasharray: 1; stroke-dashoffset: 1; animation: om-draw 1.4s cubic-bezier(.5,0,.2,1) 2.3s forwards; }
  .om-link-flow { opacity: 0; animation: om-fade .6s ease 3.5s forwards, om-flow 1.6s linear 3.5s infinite; }
  .om-dist { opacity: 0; animation: om-fade .6s ease 3.3s forwards; }
  .om-mark--hq, .om-callout--hq { animation-delay: 3.4s; }
  .om-mark--origin .om-pulse { animation: om-pulse 3.2s ease-out 2.4s infinite; }
}
@keyframes om-draw { to { stroke-dashoffset: 0; } }
@keyframes om-fade { to { opacity: 1; } }
@keyframes om-iso-in { from { opacity: 0; } }
@keyframes om-flow { to { stroke-dashoffset: -20; } }
@keyframes om-pulse { 0% { opacity: .7; transform: scale(.6); } 70%, 100% { opacity: 0; transform: scale(2.4); } }

@media (max-width: 599px) {
  .company-origin__meta { font-size: 11px; }
  .company-origin__tabs button { font-size: 12px; }
  .company-origin figcaption { font-size: 10px; }
  .om-minor, .om-tick, .om-call-coord, .om-north, .om-callout--wide { display: none; }
  .om-callout--narrow { display: inline; }
  .om-place { font-size: 15px; }
  .om-water-label { font-size: 12px; }
  .om-call-title { font-size: 16px; }
  .om-call-sub { font-size: 12px; }
  .om-dist { font-size: 12px; }
  .om-scale text, .om-north text { font-size: 12px; }
}

.company-europe { position: relative; overflow: hidden; }
.company-europe__heading { position: relative; min-height: 132px; isolation: isolate; }
.company-europe__heading h2 { position: relative; z-index: 1; max-width: 16ch; }
/* The EU ring at flag proportions (star = ring radius / 6), large and cropped so only an arc shows. */
.company-europe__stars {
  position: absolute; z-index: -1; pointer-events: none;
  width: 820px; height: 820px; max-width: none;
  left: -400px; top: 50%; transform: translateY(-46%);
}
.company-europe__ring use { fill: #e8cf7a; opacity: .2; }
.company-europe__ring { transform-box: view-box; transform-origin: 50% 50%; }
@media (prefers-reduced-motion: no-preference) {
  .eu-armed .company-europe__ring { opacity: 0; transform: rotate(-14deg); transition: opacity 1.2s var(--ease), transform 2.2s var(--ease); }
  .eu-armed.eu-in .company-europe__ring { opacity: 1; transform: none; }
}
@media (max-width: 899px) {
  .company-europe__heading { min-height: 88px; }
  .company-europe__stars { width: 640px; height: 640px; left: -380px; transform: translateY(-50%); }
}
@media (max-width: 599px) {
  .company-europe__heading { min-height: 72px; }
  .company-europe__stars { width: 520px; height: 520px; left: -300px; }
  .company-europe__ring use { opacity: .13; }
}

/* A cropped piece of Tespen's own mark gives Careers a quiet brand signature. */
.company-careers {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: radial-gradient(ellipse at 87% 37%, rgba(69, 29, 66, .24), transparent 62%);
}
.company-careers::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -125px;
  right: -115px;
  width: clamp(640px, 78vw, 1080px);
  aspect-ratio: 1;
  background: url("../img/logo-mark-light.png") center / contain no-repeat;
  opacity: .11;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 38%);
  mask-image: linear-gradient(90deg, transparent, #000 38%);
}
.company-careers > .wrap { position: relative; z-index: 1; }
@media (max-width: 899px) {
  .company-careers::before { top: -72px; right: -190px; width: 720px; opacity: .085; }
}
@media (max-width: 599px) {
  .company-careers::before { top: -35px; right: -250px; width: 590px; opacity: .075; }
}
