/* Safehoster Intranet: the plan of your building, with your own locks. */

:root {
  --paper: #f3f5f2;
  --paper-2: #e9eee9;
  --ink: #0f1f1b;
  --ink-2: #3d4f49;
  --line: #b9c6c0;
  --line-2: #d3ddd8;
  --zone: #0e5a47;
  --zone-deep: #0a3f33;
  --zone-tint: #dceae3;
  --on-zone: #eaf3ef;
  --on-zone-2: #a9c9bc;
  --signal: #d9531e;
  --signal-ink: #b2400f;

  --display: "Archivo", "Public Sans", system-ui, sans-serif;
  --body: "Public Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; }

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

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

.skip {
  position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper);
  padding: 8px 14px; z-index: 10; text-decoration: none;
}
.skip:focus { left: 8px; }

/* ---------- type ---------- */

h1, h2, h3 {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.04;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 5.6vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; line-height: 1.2; font-stretch: 106%; }

p { margin: 0; text-wrap: pretty; }

.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--ink-2); max-width: 38ch; }

.annot {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: var(--body); font-weight: 600; font-size: 1rem;
  text-decoration: none; line-height: 1;
  padding: 0.95em 1.3em;
  border: 1.5px solid var(--zone);
  background: var(--zone); color: var(--on-zone);
  border-radius: 3px;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn:hover { background: var(--zone-deep); box-shadow: 0 6px 18px -8px rgba(10, 63, 51, 0.55); transform: translateY(-1px); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }

.btn--quiet { background: transparent; color: var(--zone); }
.btn--quiet:hover { background: var(--zone-tint); box-shadow: none; }

.btn--light { background: var(--on-zone); color: var(--zone-deep); border-color: var(--on-zone); }
.btn--light:hover { background: #fff; }

/* ---------- header ---------- */

.top {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line-2);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; }
.brand svg { width: 30px; height: 30px; }
.brand span { font-family: var(--display); font-stretch: 112%; letter-spacing: -0.01em; font-size: 1.05rem; }
.brand small { font-weight: 500; color: var(--ink-2); font-family: var(--body); font-stretch: 100%; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a { text-decoration: none; font-size: 0.95rem; color: var(--ink-2); }
.nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.nav .btn { padding: 0.7em 1.05em; font-size: 0.92rem; color: var(--on-zone); }
.nav .btn:hover { color: var(--on-zone); text-decoration: none; }

@media (max-width: 860px) {
  .nav a:not(.btn) { display: none; }
}

/* ---------- the journey: hero + how it works, one pinned plan ---------- */

.journey .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 72px); }
.journey .intro { min-height: calc(100svh - 68px); display: flex; flex-direction: column; justify-content: center; padding: 40px 0 72px; }
.journey h1 { max-width: 13ch; }
.journey .lead { margin-top: 22px; }
.journey .who { margin-top: 18px; font-weight: 600; color: var(--zone); }
.journey .actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; }
.journey .mail { margin-top: 16px; }

.how-head { padding-top: 24px; border-top: 2px solid var(--ink); scroll-margin-top: 90px; }
.how-head p { color: var(--ink-2); margin-top: 16px; max-width: 40ch; }

.steps { list-style: none; margin: 0; padding: 0 0 18vh; position: relative; }
.steps::before { content: ""; position: absolute; left: 15px; top: 20vh; bottom: 30vh; border-left: 2px dashed var(--zone); }
.steps li { min-height: 72vh; display: flex; flex-direction: column; justify-content: center; padding-left: 58px; position: relative; }
.steps .stop {
  position: absolute; left: 0; top: 50%; translate: 0 -50%; margin-top: -2.4em;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--zone); color: var(--zone);
  display: grid; place-items: center; font-family: var(--mono); font-size: 0.85rem; font-weight: 500;
  transition: background 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease), scale 0.4s var(--ease);
}
.steps li.is-on .stop { background: var(--signal); border-color: var(--signal); color: #fff; scale: 1.12; }
.steps h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin-bottom: 12px; }
.steps p { color: var(--ink-2); max-width: 36ch; }
.steps .annot { display: block; margin-top: 16px; }

.stage { margin: 0; position: sticky; top: 76px; height: calc(100svh - 92px); display: flex; flex-direction: column; justify-content: center; }
.stage figcaption { margin-top: 6px; }

.plan { width: 100%; height: auto; max-height: 100%; overflow: visible; }
.plan .wall { fill: url(#hatch); stroke: var(--zone); stroke-width: 2; }
.plan .room { fill: var(--paper); stroke: var(--ink); stroke-width: 1.4; transition: fill 0.6s var(--ease); }
.plan .room--hall { fill: var(--zone-tint); }
.plan .door { fill: none; stroke: var(--ink); stroke-width: 1; }
.plan .rname { font-family: var(--body); font-size: 13px; font-weight: 700; letter-spacing: 0.09em; fill: var(--ink); }
.plan .rnote { font-family: var(--mono); font-size: 10.5px; fill: var(--ink-2); }
.plan .rnote--on { fill: var(--ink); }
.plan .lead-line { stroke: var(--ink-2); stroke-width: 1; fill: none; }
.plan .callout { font-family: var(--mono); font-size: 11px; fill: var(--ink); }
.plan .callout--zone { fill: var(--zone); font-weight: 500; }
.plan .wire { stroke: var(--zone); stroke-width: 1.6; stroke-dasharray: 5 5; fill: none; }
.plan .titleblock rect { fill: var(--paper); stroke: var(--ink); stroke-width: 1.4; }
.plan .titleblock path { stroke: var(--ink); stroke-width: 1; }
.plan .titleblock text { font-family: var(--body); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; fill: var(--ink); }
.plan .titleblock .tb-small { font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: 0.02em; fill: var(--ink-2); }
.plan .hs { fill: var(--paper); stroke: var(--ink); stroke-width: 1.6; }
.plan .screen { fill: var(--paper-2); transition: fill 0.5s var(--ease); }
.plan .buzz { fill: none; stroke: var(--signal); stroke-width: 2; opacity: 0; transition: opacity 0.4s var(--ease); }

.plan .stamp { opacity: 0; transform: scale(1.35); transform-box: fill-box; transform-origin: center; transition: opacity 0.35s var(--ease), transform 0.5s var(--ease); }
.plan .stamp rect { fill: none; stroke: var(--signal); stroke-width: 2; }
.plan .stamp > text:not(.rnote) { font-family: var(--mono); font-size: 14px; font-weight: 500; fill: var(--signal-ink); letter-spacing: 0.04em; }
.plan .stamp .check { fill: var(--signal); stroke: none; }

.plan[data-step="1"] [data-s="1"],
.plan[data-step="2"] [data-s="1"], .plan[data-step="2"] [data-s="2"],
.plan[data-step="3"] [data-s="1"], .plan[data-step="3"] [data-s="2"], .plan[data-step="3"] [data-s="3"],
.plan[data-step="4"] .stamp, .plan[data-step="5"] .stamp,
.no-js .plan .stamp { opacity: 1; transform: none; }

.plan[data-step="1"] [data-r="1"], .plan[data-step="2"] [data-r="2"],
.plan[data-step="3"] [data-r="3"], .plan[data-step="4"] [data-r="4"] { fill: #fdeee7; }
.plan[data-step="5"] .screen { fill: var(--signal); }
.plan[data-step="5"] .buzz { opacity: 1; }

.plan .doc { offset-rotate: 0deg; }
.plan .doc rect { fill: var(--signal); }
.plan .doc path { stroke: #fff; stroke-width: 1.4; fill: none; }
.no-js .plan .doc { display: none; }

@media (max-width: 900px) {
  .journey .wrap { grid-template-columns: 1fr; gap: 0; }
  .stage { order: -1; top: 68px; height: auto; z-index: 2; background: var(--paper); padding: 10px 0 8px; border-bottom: 1px solid var(--line-2); }
  .plan { max-height: 42svh; }
  .plan .rname { font-size: 18px; letter-spacing: 0.02em; }
  .plan .rnote { font-size: 15px; }
  .plan .callout { font-size: 16px; }
  .plan .stamp > text:not(.rnote) { font-size: 16px; }
  .plan .minor, .plan .titleblock { display: none; }
  .stage figcaption { display: none; }
  .journey .intro { min-height: 0; padding: 28px 0 56px; }
  .journey h1 { max-width: 16ch; }
  .steps li { min-height: 58svh; }
}

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

.sec { padding: clamp(72px, 10vw, 128px) 0; }
.sec-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 72px); align-items: end; margin-bottom: clamp(40px, 6vw, 72px); }
.sec-head p { color: var(--ink-2); max-width: 52ch; }
@media (max-width: 900px) { .sec-head { grid-template-columns: 1fr; } }

/* security: the legend */

.secure { background: var(--zone-deep); color: var(--on-zone); position: relative; overflow: hidden; }
.secure::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 14px; pointer-events: none;
  background: repeating-linear-gradient(45deg, rgba(234, 243, 239, 0.55) 0 2px, transparent 2px 7px);
  border-bottom: 1.5px solid rgba(234, 243, 239, 0.55);
}
.secure .wrap { position: relative; }
.secure .sec-head p { color: var(--on-zone-2); }
.secure h2 { max-width: 14ch; }

.legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(32px, 6vw, 96px); }
.legend li { display: grid; grid-template-columns: 56px 1fr; gap: 18px; padding: 26px 0; border-top: 1px solid rgba(234, 243, 239, 0.18); }
.legend svg { width: 56px; height: 40px; }
.legend h3 { color: var(--on-zone); margin-bottom: 6px; }
.legend p { color: var(--on-zone-2); font-size: 0.98rem; }
.legend .sym-wall { fill: url(#hatch-light); stroke: var(--on-zone); stroke-width: 1.5; }
.legend .sym { fill: none; stroke: var(--on-zone); stroke-width: 1.5; }
.legend .sym-dash { fill: none; stroke: var(--on-zone); stroke-width: 1.5; stroke-dasharray: 4 4; }
.legend .sym-fill { fill: var(--on-zone); }
@media (max-width: 820px) { .legend { grid-template-columns: 1fr; } }

/* rooms: what is inside */

.rooms {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.5px; background: var(--ink);
  border: 14px solid transparent;
  border-image: repeating-linear-gradient(45deg, var(--zone) 0 2.2px, var(--zone-tint) 2.2px 7px) 14;
  outline: 2px solid var(--zone); outline-offset: 0;
}
.rooms article { background: var(--paper); padding: clamp(22px, 2.6vw, 34px); display: flex; flex-direction: column; gap: 10px; position: relative; }
.rooms article p { color: var(--ink-2); font-size: 0.98rem; max-width: 46ch; }
.rooms .annot { margin-top: auto; padding-top: 10px; }
.rooms h3 { font-family: var(--body); font-stretch: 100%; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; font-size: 0.92rem; }
/* door openings in shared walls: the gap and its swing, drawn like the hero plan */
.rooms .dr::after, .rooms .dl::after { content: ""; position: absolute; width: 40px; height: 40px; background: no-repeat center / 100% 100%; pointer-events: none; }
.rooms .dr::after { right: 30px; top: -1.5px; background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2040%2040%22%3E%3Crect%20x%3D%220%22%20y%3D%220%22%20width%3D%2237%22%20height%3D%223%22%20fill%3D%22%23f3f5f2%22%2F%3E%3Cpath%20d%3D%22M1.5%201.5V37.5%20M1.5%2037.5A36%2036%200%200%200%2037.5%201.5%22%20fill%3D%22none%22%20stroke%3D%22%230f1f1b%22%20stroke-width%3D%221%22%2F%3E%3C%2Fsvg%3E"); }
.rooms .dl::after { left: -1.5px; bottom: 64px; background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2040%2040%22%3E%3Crect%20x%3D%220%22%20y%3D%220%22%20width%3D%223%22%20height%3D%2237%22%20fill%3D%22%23f3f5f2%22%2F%3E%3Cpath%20d%3D%22M1.5%201.5H37.5%20M37.5%201.5A36%2036%200%200%201%201.5%2037.5%22%20fill%3D%22none%22%20stroke%3D%22%230f1f1b%22%20stroke-width%3D%221%22%2F%3E%3C%2Fsvg%3E"); }
.r-a { grid-column: span 7; }
.r-b { grid-column: span 5; }
.r-c { grid-column: span 4; }
.r-d { grid-column: span 4; }
.r-e { grid-column: span 4; }
.r-f { grid-column: span 5; }
.r-g { grid-column: span 7; }
@media (max-width: 860px) {
  .rooms article { grid-column: span 12 !important; min-height: 0; }
}

/* app */

.app .wrap { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.app ul { margin: 26px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.app li { display: grid; grid-template-columns: 18px 1fr; gap: 12px; color: var(--ink-2); }
.app li svg { width: 18px; height: 18px; margin-top: 4px; stroke: var(--zone); fill: none; stroke-width: 2; }
@media (max-width: 860px) { .app .wrap { grid-template-columns: 1fr; } }

.phone {
  width: min(320px, 100%); margin-inline: auto; aspect-ratio: 9 / 18.5;
  border: 10px solid var(--ink); border-radius: 42px; background: #fbfcfb;
  box-shadow: 0 30px 60px -30px rgba(15, 31, 27, 0.45);
  padding: 46px 18px 18px; position: relative; display: flex; flex-direction: column; gap: 14px;
  font-size: 0.82rem;
}
.phone::before { content: ""; position: absolute; top: 12px; left: 50%; width: 84px; height: 22px; translate: -50% 0; border-radius: 12px; background: var(--ink); }
.phone .hello { font-family: var(--display); font-stretch: 108%; font-weight: 700; font-size: 1.35rem; line-height: 1.1; }
.phone .hello small { display: block; font-family: var(--body); font-weight: 500; font-size: 0.78rem; color: var(--ink-2); margin-top: 4px; }
.phone .box { border: 1px solid var(--line-2); border-radius: 12px; background: #fff; padding: 12px 12px 4px; }
.phone .box h4 { margin: 0 0 6px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); }
.phone .row { display: grid; grid-template-columns: 8px 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-2); }
.phone .row:first-of-type { border-top: 0; }
.phone .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--zone); margin-top: 6px; }
.phone .dot--new { background: var(--signal); }
.phone .row b { display: block; font-weight: 600; line-height: 1.3; }
.phone .row span { font-family: var(--mono); font-size: 0.7rem; color: var(--ink-2); }
.phone .tabs { margin-top: auto; display: grid; grid-template-columns: repeat(5, 1fr); text-align: center; font-size: 0.66rem; color: var(--ink-2); border-top: 1px solid var(--line-2); padding-top: 10px; }
.phone .tabs .on { color: var(--zone); font-weight: 700; }
.phone-note { text-align: center; margin-top: 14px; }

/* embassies */

.emb { background: var(--paper-2); border-block: 1px solid var(--line-2); }
.emb .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); }
.emb p { color: var(--ink-2); margin-top: 18px; max-width: 46ch; }
.emb dl { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 clamp(24px, 4vw, 56px); }
.emb dl > div { padding: 22px 0; border-top: 1px solid var(--line); }
.emb dt { font-weight: 700; }
.emb dd { margin: 6px 0 0; color: var(--ink-2); font-size: 0.98rem; }
@media (max-width: 860px) { .emb .wrap, .emb dl { grid-template-columns: 1fr; } }

/* start */

.start ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.start li { padding: 28px 28px 0 0; }
.start li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.start .annot { display: block; margin-bottom: 14px; color: var(--zone); }
.start p { color: var(--ink-2); margin-top: 10px; }
@media (max-width: 820px) {
  .start ol { grid-template-columns: 1fr; }
  .start li, .start li + li { padding: 24px 0; border-left: 0; border-bottom: 1px solid var(--line); }
}

/* close */

.close { background: var(--zone); color: var(--on-zone); text-align: left; }
.close .wrap { display: grid; gap: 28px; }
.close h2 { max-width: 18ch; }
.close p a { color: #fff; font-weight: 600; text-underline-offset: 4px; text-decoration-color: var(--on-zone-2); }
.close p a:hover { text-decoration-color: #fff; }
.close p { color: var(--on-zone-2); max-width: 56ch; font-size: 1.15rem; }

/* footer */

.foot { background: var(--ink); color: #c9d5d0; padding: 40px 0; font-size: 0.92rem; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
.foot nav { display: flex; gap: 24px; flex-wrap: wrap; }
.foot a { color: #eaf3ef; text-decoration: none; }
.foot a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- reading pages (privacy, support) ---------- */

.doc-page { padding: clamp(48px, 8vw, 96px) 0 clamp(72px, 10vw, 120px); }
.doc-page .wrap { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: clamp(24px, 5vw, 72px); }
.doc-page aside { position: sticky; top: 100px; align-self: start; }
.doc-page aside .annot { display: block; margin-top: 12px; }
.doc-page h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); }
.prose { max-width: 68ch; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 1.35rem; margin-top: 2.2em; font-stretch: 108%; letter-spacing: -0.01em; padding-top: 18px; border-top: 1px solid var(--line); }
.prose p, .prose li { color: #22332e; }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: 0.45em; }
.prose a { color: var(--zone); text-underline-offset: 3px; }
.fill { background: #fbe3d8; color: var(--signal-ink); padding: 0 0.25em; border-radius: 2px; }
@media (max-width: 860px) {
  .doc-page .wrap { grid-template-columns: 1fr; }
  .doc-page aside { position: static; }
}
