/* Fonts are served from here, so no visitor's browser contacts a font CDN (SIL Open Font License 1.1) */
@font-face { font-family: "Atkinson"; src: url("assets/fonts/atkinson-hyperlegible-next-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("assets/fonts/atkinson-hyperlegible-next-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Familjen"; src: url("assets/fonts/familjen-grotesk-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
	--ink: #10302e;       /* text: deep teal, not grey-black */
	--ink-soft: #46605d;
	--paper: #f6f9f8;
	--white: #ffffff;
	--teal: #0f766e;      /* brand, active shifts */
	--teal-dark: #0b5b55;
	--night: #1e40af;     /* sleepovers */
	--marigold: #d9930d;  /* two workers together, things waiting */
	--mint: #d6f0e4;
	--line: #d3dfdc;

	--display: "Familjen", "Arial Narrow", system-ui, sans-serif;
	--body: "Atkinson", system-ui, -apple-system, "Segoe UI", sans-serif;

	--step-0: 1.0625rem;
	--step-1: 1.3125rem;
	--step-2: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem);
	--step-3: clamp(2.25rem, 1.4rem + 3.6vw, 4rem);
	--gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font: 400 var(--step-0)/1.6 var(--body);
}
img { max-width: 100%; display: block; }
a { color: var(--teal-dark); text-underline-offset: 3px; }
a:hover { color: var(--teal); }
:focus-visible { outline: 3px solid var(--marigold); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: var(--step-3); max-width: 19ch; letter-spacing: -0.025em; }
h2 { font-size: var(--step-2); max-width: 24ch; }
h3 { font-size: var(--step-1); }
p { margin: 0; }

.wrap { width: min(1120px, 100%); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* Buttons */
.btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 48px; padding: 0 22px; border-radius: 999px;
	font: 700 1rem/1 var(--body); text-decoration: none; cursor: pointer;
	border: 2px solid transparent; transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--teal); color: var(--white); }
.btn-primary:hover { background: var(--teal-dark); color: var(--white); }
.btn-line { border-color: var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--white); }
.btn-quiet { min-height: 40px; padding: 0 16px; border-color: var(--line); color: var(--ink); background: var(--white); }
.btn-quiet:hover { border-color: var(--teal); color: var(--teal-dark); }

/* Header */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 600 1.15rem/1 var(--display); }
.brand img { border-radius: 9px; }
.top-nav { display: flex; align-items: center; gap: 22px; }
.top-nav a:not(.btn) { color: var(--ink); text-decoration: none; font-size: .98rem; }
.top-nav a:not(.btn):hover { color: var(--teal); }

/* Hero */
.hero { padding: clamp(48px, 8vw, 96px) 0 0; }
.lede { margin-top: 22px; max-width: 60ch; font-size: var(--step-1); line-height: 1.5; color: var(--ink-soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* The day at a house: the page's one moving picture */
.day { margin: clamp(40px, 6vw, 64px) 0 0; background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: clamp(18px, 3vw, 32px); }
.day-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 22px; }
.day-head strong { font: 600 var(--step-1)/1.2 var(--display); }
.day-head span { color: var(--ink-soft); }
.day-grid { --who: 72px; display: grid; gap: 10px; }
.hours { display: flex; justify-content: space-between; margin-left: var(--who); font-size: .82rem; color: var(--ink-soft); }
.hours span { width: 0; display: flex; justify-content: center; white-space: nowrap; }
.lane { display: grid; grid-template-columns: var(--who) 1fr; align-items: center; }
.who { font-weight: 700; font-size: .95rem; }
.open-who { color: var(--marigold); }
.track {
	position: relative; height: 40px; border-radius: 10px;
	background: repeating-linear-gradient(90deg, var(--paper) 0 calc(100% / 6 - 1px), var(--line) calc(100% / 6 - 1px) calc(100% / 6));
}
.bar {
	position: absolute; top: 4px; bottom: 4px;
	left: calc(var(--from) / 24 * 100%); width: calc(var(--len) / 24 * 100%);
	border-radius: 8px; display: flex; align-items: center; padding-inline: 10px; overflow: hidden;
	font-style: normal; transform-origin: left center;
}
.bar b { font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar.active { background: var(--teal); color: var(--white); }
.bar.sleep { background: var(--night); color: var(--white); }
.bar.open { background: repeating-linear-gradient(-45deg, #fff4dc 0 8px, #fde9bd 8px 16px); border: 2px dashed var(--marigold); color: #7a5208; }
.pair {
	position: absolute; top: 50%; left: calc(var(--from) / 24 * 100% + 2 / 24 * 100% + 8px);
	transform: translateY(-50%); font-style: normal; font-weight: 700; font-size: .8rem; white-space: nowrap;
	background: var(--marigold); color: var(--white); padding: 4px 10px; border-radius: 999px;
}
.day-key { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; padding: 0; margin: 22px 0 0; font-size: .9rem; color: var(--ink-soft); }
.day-key li { display: inline-flex; align-items: center; gap: 8px; }
.sw { width: 18px; height: 12px; border-radius: 4px; display: inline-block; }
.sw.active { background: var(--teal); }
.sw.sleep { background: var(--night); }
.sw.open { border: 2px dashed var(--marigold); background: #fff4dc; }
.sw-pair { background: var(--marigold); border-radius: 999px; }

@media (prefers-reduced-motion: no-preference) {
	.bar { animation: draw .7s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(.25s + var(--from) * .06s); }
	.pair { animation: pop .4s ease-out 1.3s both; }
	.bar.open { animation-name: draw, wait; animation-duration: .7s, 1.6s; animation-delay: .45s, 1.6s; animation-iteration-count: 1, 2; animation-timing-function: cubic-bezier(.2, .7, .2, 1), ease-in-out; }
	@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
	@keyframes pop { from { opacity: 0; transform: translateY(-50%) scale(.6); } to { opacity: 1; transform: translateY(-50%) scale(1); } }
	@keyframes wait { 50% { border-color: #f2c35c; } }
	.ph-btn { animation: press 2.4s ease-in-out 2s 1; }
	@keyframes press { 40% { transform: scale(.96); } 60% { transform: scale(1); background: var(--teal-dark); } }
}

/* Sections */
.block { padding: clamp(56px, 8vw, 104px) 0; }
.block-tint { background: var(--mint); }
.intro { margin-top: 16px; max-width: 64ch; color: var(--ink-soft); font-size: 1.12rem; }
.split { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 5vw, 72px); margin-top: clamp(36px, 5vw, 56px); }
.side h3 { padding-bottom: 14px; border-bottom: 2px solid var(--ink); }
.facts { margin: 0; }
.facts dt { font-weight: 700; margin-top: 22px; }
.facts dd { margin: 4px 0 0; color: var(--ink-soft); max-width: 56ch; }

.worker-side { display: flex; flex-direction: column; }
.phone {
	align-self: center; margin: 28px 0; width: 230px; padding: 10px;
	border-radius: 34px; background: var(--ink);
}
.phone-screen { border-radius: 26px; background: var(--white); padding: 26px 18px 20px; display: grid; gap: 4px; }
.ph-small { font-size: .82rem; color: var(--ink-soft); }
.ph-big { font: 600 1.3rem/1.2 var(--display); }
.ph-btn { margin: 14px 0 10px; display: block; text-align: center; padding: 12px; border-radius: 999px; background: var(--teal); color: var(--white); font-weight: 700; }
.ph-row { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); font-size: .88rem; }
.ph-row b { background: var(--marigold); color: var(--white); border-radius: 999px; min-width: 22px; text-align: center; font-size: .78rem; padding: 1px 6px; }
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding: 10px 0 10px 30px; border-bottom: 1px solid var(--line); }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 17px; width: 12px; height: 7px; border-left: 2.5px solid var(--teal); border-bottom: 2.5px solid var(--teal); transform: rotate(-45deg); }

/* Getting started: a real sequence, so it's numbered */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 40px); }
.steps li { counter-increment: step; position: relative; padding-top: 58px; }
.steps li::before {
	content: counter(step); position: absolute; top: 0; left: 0;
	width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
	background: var(--ink); color: var(--white); font: 600 1.2rem/1 var(--display);
}
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 21px; left: 54px; right: -12px; height: 2px; background: var(--ink); opacity: .25; }
.steps p { margin-top: 8px; color: var(--ink-soft); }
.terms-line { margin-top: 40px; font-size: 1.12rem; max-width: 60ch; }

/* Contact */
.contact { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.contact-copy > p { margin-top: 14px; color: var(--ink-soft); max-width: 44ch; }
.details { margin: 28px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; }
.details dt { font-weight: 700; }
.details dd { margin: 0; }
.form { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 3vw, 32px); display: grid; gap: 6px; }
.form label { font-weight: 700; margin-top: 12px; }
.form label:first-child { margin-top: 0; }
.form input, .form textarea {
	width: 100%; font: inherit; color: var(--ink); background: var(--paper);
	border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px;
}
.form textarea { resize: vertical; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 25%, transparent); }
.form .btn { margin-top: 18px; justify-self: start; }
.form-note { margin-top: 10px; font-size: .92rem; color: var(--ink-soft); }
.form-note.sent { color: var(--teal-dark); }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 28px 0 36px; font-size: .92rem; color: var(--ink-soft); }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot a { color: var(--ink-soft); }

/* Phones and small tablets */
@media (max-width: 860px) {
	.top-nav a:not(.btn) { display: none; }
	.split, .contact { grid-template-columns: 1fr; }
	.steps { grid-template-columns: 1fr; gap: 26px; }
	.steps li { padding: 4px 0 0 60px; min-height: 42px; }
	.steps li:not(:last-child)::after { top: 52px; bottom: -22px; left: 20px; right: auto; width: 2px; height: auto; }
}
@media (max-width: 560px) {
	.day-grid { --who: 52px; }
	.who { font-size: .85rem; }
	.hours span:nth-child(even) { visibility: hidden; }
	.bar b { display: none; }
	.bar.sleep b { display: block; font-size: .75rem; }
	.pair { font-size: .72rem; padding: 3px 8px; }
	.hero-actions .btn { flex: 1 1 auto; }
}
