/* mathiasiversen.dk. Values follow the design "Primary (latest) executive coach". */

:root {
  /* Colours */
  --bg: #e7e9e6;
  --surface: #eef0ed;
  --placeholder: #dfe4e1;
  --dark: #1a2629;
  --ink: #1f2326;
  --ink-body: #26333d;
  --ink-muted: #4b5a56;
  --accent: #2f6a65;
  --cream: #ece7df;
  --cream-muted: rgba(236, 231, 223, 0.55);
  --highlight: #e8894a;
  --rule: rgba(31, 35, 38, 0.1);

  /* Type */
  --serif: "Gloock", Georgia, serif;
  --sans: "Figtree", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  /* Layout: --gutter is the one left edge all text shares. A box sits --box-margin
     in from the page edge and pads the rest, so its text lines up with the gutter. */
  --gutter: 88px;
  --box-margin: 24px;
  --box-pad: calc(var(--gutter) - var(--box-margin));
  --box-pad-y: 96px;
  --radius: 32px;
}

@media (max-width: 1100px) {
  :root { --gutter: 56px; --box-margin: 16px; --box-pad-y: 80px; }
}

@media (max-width: 600px) {
  :root { --gutter: 24px; --box-margin: 8px; --box-pad-y: 56px; --radius: 24px; }
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p { margin: 0; }
a { color: inherit; }
a:hover { opacity: 0.8; }
img { display: block; max-width: 100%; }

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

.page {
  max-width: 1440px;
  margin: 0 auto;
  padding-bottom: var(--box-margin);
  display: flex;
  flex-direction: column;
}

.display {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1;
}

.h2 { font-size: clamp(40px, 5.3vw, 76px); }

.box {
  margin: var(--box-margin) var(--box-margin) 0;
  border-radius: var(--radius);
  padding: var(--box-pad-y) var(--box-pad);
  display: flex;
  flex-direction: column;
  gap: 56px;
}
.box--light { background: var(--surface); color: var(--ink); }
.box--dark { background: var(--dark); color: var(--cream); }

/* Radios that drive the CSS-only toggles: hidden, but still reachable by keyboard. */
.toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  opacity: 0;
}

/* Hero */

.hero {
  min-height: 700px;
  display: grid;
  grid-template-columns: 7fr 5fr;
}

.hero-main {
  display: flex;
  flex-direction: column;
  padding: 0 64px 72px var(--gutter);
}

.site-header {
  height: 96px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-name {
  font-family: var(--serif);
  font-size: 28px;
  text-decoration: none;
  white-space: nowrap;
}

.hero-copy {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 30px;
}

.hero-title { font-size: clamp(46px, 6.1vw, 88px); line-height: 0.98; }

.hero-lede {
  font-size: 18px;
  line-height: 1.5;
  max-width: 600px;
  color: var(--ink-muted);
}

.button {
  align-self: flex-start;
  background: var(--accent);
  color: var(--cream);
  padding: 18px 32px;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
}

.hero-media {
  /* Starts below the header line, so the photo never sits beside the name. */
  padding: 96px 24px 24px 0;
  display: flex;
}

.photo {
  position: relative;
  overflow: hidden;
  flex-grow: 1;
  border-radius: var(--radius);
  background: var(--placeholder);
}
.photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-media img { object-position: 45% 35%; }

/* Situations */

.situations { border-top: 1px solid var(--ink); list-style: none; margin: 0; padding: 0; }

.situation {
  display: grid;
  grid-template-columns: 64px 1fr;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}

.situation-number {
  font-family: var(--mono);
  font-size: 18px;
  color: var(--accent);
  padding-top: 6px;
}

.situation p {
  font-family: var(--serif);
  font-size: clamp(21px, 2vw, 28px);
  line-height: 1.3;
}

/* How I work */

.approach {
  padding: 112px var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.approach-text {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 900px;
}
.approach-text p { font-size: 20px; line-height: 1.6; color: var(--ink-body); }

/* Background */

.eyebrow { font-size: 15px; font-weight: 600; color: var(--highlight); }

.background-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 56px;
  row-gap: 40px;
}

.company { display: flex; flex-direction: column; gap: 12px; grid-row: 1; }

.company-name {
  font-family: var(--serif);
  font-size: clamp(32px, 2.8vw, 40px);
  line-height: 1;
  color: var(--cream);
}

.company-summary { font-size: 15px; line-height: 1.45; opacity: 0.8; }

.more {
  cursor: pointer;
  font-size: 13px;
  color: var(--cream-muted);
  letter-spacing: 0.02em;
  text-decoration: underline;
  text-underline-offset: 4px;
  align-self: flex-start;
}
.more:hover { color: var(--cream); }
.more--less { display: none; }

.company-detail {
  display: none;
  grid-row: 2;
  grid-column: 1 / -1;
  flex-direction: column;
  gap: 14px;
  max-width: 900px;
}
.company-detail p { font-size: 16px; line-height: 1.6; }
.company-detail .meta { font-size: 15px; opacity: 0.7; }

#bg-hemi:checked ~ .company--hemi .more--more,
#bg-reach:checked ~ .company--reach .more--more,
#bg-appmonk:checked ~ .company--appmonk .more--more { display: none; }

#bg-hemi:checked ~ .company--hemi .more--less,
#bg-reach:checked ~ .company--reach .more--less,
#bg-appmonk:checked ~ .company--appmonk .more--less { display: inline-block; }

#bg-hemi:checked ~ .company--hemi .company-name,
#bg-reach:checked ~ .company--reach .company-name,
#bg-appmonk:checked ~ .company--appmonk .company-name { color: var(--highlight); }

#bg-hemi:checked ~ .detail--hemi,
#bg-reach:checked ~ .detail--reach,
#bg-appmonk:checked ~ .detail--appmonk { display: flex; }

/* Keyboard focus on a hidden radio shows on its visible label. */
#bg-hemi:focus-visible ~ .company--hemi .more,
#bg-reach:focus-visible ~ .company--reach .more,
#bg-appmonk:focus-visible ~ .company--appmonk .more,
#bg-none:focus-visible ~ .company .more--more { outline: 2px solid var(--highlight); outline-offset: 4px; border-radius: 4px; }

/* About */

.about {
  min-height: 760px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.about-media { display: flex; padding: 72px 0 72px var(--box-margin); }
.about-media .photo { border-radius: 28px; }

.about-text {
  padding: 88px var(--gutter) 88px 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 26px;
}
.about-text .h2 { font-size: clamp(40px, 4.6vw, 66px); }
.about-text p { font-size: 19px; line-height: 1.65; color: var(--ink-muted); }

.text-link {
  align-self: flex-start;
  font-size: 18px;
  font-weight: 600;
  text-underline-offset: 6px;
}

/* Testimonials */

.testimonials-inner { position: relative; min-height: 420px; }

.testimonial { display: none; flex-direction: column; gap: 40px; margin: 0; }

#ts-1:checked ~ .ts-1,
#ts-2:checked ~ .ts-2,
#ts-3:checked ~ .ts-3 { display: flex; }

.testimonial-nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 24px;
  min-height: 32px;
}

.arrow {
  cursor: pointer;
  font-size: 32px;
  line-height: 1;
  color: var(--accent);
}

#ts-1:focus-visible ~ .ts-1 .arrow,
#ts-2:focus-visible ~ .ts-2 .arrow,
#ts-3:focus-visible ~ .ts-3 .arrow { outline: 2px solid var(--highlight); outline-offset: 4px; border-radius: 4px; }

.testimonial blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(28px, 3.9vw, 56px);
  line-height: 1.15;
}

.testimonial figcaption { font-size: 16px; font-weight: 600; }

/* Contact */

.contact { gap: 40px; }

.contact-lede {
  font-size: 19px;
  line-height: 1.65;
  opacity: 0.85;
  max-width: 760px;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 20px;
  overflow-wrap: anywhere;
}
.contact-list .place { opacity: 0.85; }

/* Tablet and phone */

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-main { padding: 0 var(--gutter) 48px; }
  .hero-copy { padding-top: 32px; }
  .hero-media { padding: 0 var(--box-margin); }
  .hero-media .photo { aspect-ratio: 4 / 5; max-height: 80vh; }

  .approach { padding: 88px var(--gutter); }

  .background-grid { grid-template-columns: 1fr; }
  .company, .company-detail { grid-row: auto; }
  .company-detail { padding-bottom: 8px; }

  .about { grid-template-columns: 1fr; min-height: 0; }
  .about-media { padding: 56px var(--box-margin) 0; }
  .about-media .photo { aspect-ratio: 8 / 7; }
  .about-text { padding: 48px var(--gutter) 56px; }

  .testimonials-inner { min-height: 0; }
}

@media (max-width: 600px) {
  .box { gap: 40px; }
  .site-header { height: 72px; }
  .site-name { font-size: 26px; }
  .hero-copy { gap: 24px; }
  .hero-lede { font-size: 17px; }
  .button { padding: 16px 28px; font-size: 17px; }
  .situation { grid-template-columns: 44px 1fr; padding: 18px 0; }
  .situation-number { font-size: 16px; padding-top: 3px; }
  .approach { padding: 64px var(--gutter); gap: 40px; }
  .approach-text p { font-size: 18px; }
  .about-text p, .contact-lede { font-size: 17px; }
  .testimonial { gap: 28px; }
  .contact-list { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
