@font-face {
  font-family: 'ALTotalGrotesk';
  src: url('ALTotalGrotesk-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'ALTotalGroteskItalic';
  src: url('ALTotalGrotesk-Italic.woff2') format('woff2');
}

@font-face {
  font-family: 'ALTotalGroteskMono';
  src: url('ALTotalGrotesk-Monospace.woff2') format('woff2');
}

@font-face {
  font-family: 'Geselle Fine';
  src: url('SkGeselle-Fine.woff2') format('woff2');
}

@font-face {
  font-family: 'Geselle Light';
  src: url('SkGeselle-Light.woff2') format('woff2');
}

@font-face {
  font-family: 'Geselle Regular';
  src: url('SkGeselle-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Geselle Medium';
  src: url('SkGeselle-Medium.woff2') format('woff2');
}

@font-face {
  font-family: 'Geselle Text';
  src: url('SkGeselle-Text.woff2') format('woff2');
}

@font-face {
  font-family: 'Geselle Bold';
  src: url('SkGeselle-Bold.woff2') format('woff2');
}

@font-face {
  font-family: 'Geselle Extra Bold';
  src: url('SkGeselle-ExtraBold.woff2') format('woff2');
}

@font-face {
  font-family: 'Geselle Semispace';
  src: url('SkGeselle-Semispace.woff2') format('woff2');
}

@font-face {
  font-family: 'Geselle Typewriter';
  src: url('SkGeselle-Monospace.woff2') format('woff2');
}

@font-face {
  font-family: 'Geselle Bold Typewriter';
  src: url('SkGeselle-BoldMonospace.woff2') format('woff2');
}

@font-face {
  font-family: 'Geselle Italic';
  src: url('SkGeselle-Italic.woff2') format('woff2');
}

@font-face {
  font-family: 'Voynich Regular';
  src: url('SkVoynich-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Voynich Italic';
  src: url('SkVoynich-Italic.woff2') format('woff2');
}

select,
input,
button {
  font-family: inherit;
}

/* Body and global styles */

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  caret-color: black;
}

body {
  display: flex;
  flex-direction: column;
  font-family: 'ALTotalGroteskMono', monospace;
  font-size: 14px;
  background: white; /* #F6F6F6; */
  color: #111;  
  overflow-x: hidden;
  opacity: 0;
  transition: opacity 0.4s ease-in;
}

body.page-loaded {
  opacity: 1;
}




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

/* Push footer to the bottom */
#footer {
  margin-top: auto;
}

/* Header styles */

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem 1rem;
  z-index: 2;
}

.site-nav {
  display: flex;
  gap: 5rem;
  font-size: 14px;
  align-items: left;
  justify-content: flex-start;
}

.site-nav a {
  text-decoration: none;
  color: black; 
}


.site-nav a:hover {
  text-decoration: underline;
}

@media (max-width: 800px) {
  .site-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .dropdown-parent {
    align-self: flex-start;
  }
}

/* ===================== */
/* DROPDOWN MENU         */
/* ===================== */

.dropdown-parent {
  position: relative;
}

.dropdown-toggle {
  all: unset;
  cursor: pointer;
  font-size: 14px;
  color: black;
  line-height: 1;
  padding: 0.2rem 0;
}

.dropdown-toggle:hover {
  text-decoration: none;
}

.dropdown-menu {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1000;
  padding: 0.5rem 0; /* padding for dropdown background */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: max-content;
}

.dropdown-menu a {
  font-size: 14px;
  color: black;
  text-decoration: none;
  line-height: 1.4;
  padding: 0.25rem 0; /* no left/right padding — aligns flush left */
}

.dropdown-menu a:hover {
  text-decoration: underline;
}

.dropdown-parent:hover .dropdown-menu,
.dropdown-parent.open .dropdown-menu {
  opacity: 1;
  pointer-events: auto;
}



/* Page title styles */

.page-title {
  font-size: 14px;
  font-weight: normal;
  color: black;
  margin: 0;
  margin-top: 10rem; 
  margin-bottom: 2.5rem;
  padding-left: 20px; 
}

/* Design info */
.design-info {
  font-size: 14px;
  color: black;
  margin: 0;
  margin-top: 3rem; /* adjust spacing as needed */
  padding-left: 20px; /* align with nav */
}

@media (max-width: 1200px) {
  .design-info {
    padding-left: 20px; /* equal left & right padding */
  }
}

/* Design info Grid */
.design-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  font-size: 14px;
  padding: 2rem 40px 4rem 46px;
  width: calc(50vw - 20px); /* left-aligned, ending 20px before center */
  margin-left: 20px;
}


.info-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1.5px solid black;
  padding-bottom: 0.25rem;
}

.info-label {
  text-align: left;
}

.info-value {
  text-align: right;
}

.info-value a {
  color: #757d00;
  text-decoration: none;
}

.info-value a:hover {
  text-decoration: underline;
}

@media (max-width: 1200px) {
  .design-info-grid {
    grid-template-columns: 1fr;
    width: 100%;
    margin-left: 0;
    padding: 2rem 20px 4rem 20px; /* equal left & right padding */
  }
}

@media (max-width: 1200px) {
  .design-description {
    width: 100% !important;
    max-width: 100%; 
    margin: 0;
    padding: 0 40px 4rem 0px !important; /* Top, Right, Bottom, Left */
    box-sizing: border-box;
  }
}


/* Description */

.design-description {
  line-height: 1.6;
  width: calc(50vw - 66px); /* 66 = 46 (left padding) + 20 (margin-left) */
  margin-left: 20px;
  padding-left: 46px;
  padding-right: 0;
  padding-bottom: 15rem;
}



/* Contact for licensing */
#licensePrompt {
  position: fixed;
  top: 70%;
  left: 50%;
  transform: translate(-50%, 20px); /* starts lower */
  font-size: 24px;
  background: black; /* #8A82FF; */
  color: white;
  padding: 10px 20px;
  border: 1.5px solid black;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.4s ease;
  z-index: 9999;
  text-align: center;
}

#licensePrompt a {
  color: white;
  text-decoration: none;
}

#licensePrompt a:hover {
  text-decoration: underline;
}

/* Layout wrapper with horizontal padding */
#typeTestersContainer {
  padding: 0px 40px;
  box-sizing: border-box;
}

/* Main typetester container */
.type-tester {
  border: 1.5px solid black;
  background: white;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: padding-bottom 0.4s ease; /* Animate padding change on focus */
}

/* CONTROLS as Flex */
.type-tester__controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}


#typeTestersContainer > .type-tester + .type-tester {
  margin-top: 1.5rem;
}

@media (max-width: 1200px) {
  #typeTestersContainer {
    padding: 0 20px;
  }
}



/* ===================== */
/* TEXT PREVIEW EFFECTS  */
/* ===================== */

.type-tester__preview {
  transition: transform 0.15s ease;
  column-gap: 1.75rem;
/*  caret-color: #757d00; */
/*  max-height: 1000px; */
  overflow: hidden;
  word-wrap: break-word;
  padding-left: 1ch;
  margin-left: -1ch;
}

@media (max-width: 800px) {
  .type-tester__preview {
    margin-left: 0;
    padding-left: 1rem;
    box-sizing: border-box;
    max-width: 100%;
    overflow-x: hidden;
  }
}

@media (max-width: 800px) {
  .type-tester {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }
}

.type-tester:hover .type-tester__preview {
  transform: translateY(-2px);
  transition: transform 0.15s ease;
}

.type-tester:hover .type-tester__preview:focus,
.type-tester__preview:focus {
  transform: translateY(10px);
  transition: transform 0.4s ease;
  outline: none;
}

.type-tester__preview:not(:focus) {
  transition: transform 0.4s ease;
}

.type-tester__preview::selection {
  background: black;
  color: white;
}

.type-tester__preview::-moz-selection {
  background: black;
  color: white;
}

/* ===================== */
/* FEATURE TOGGLES       */
/* ===================== */
.type-tester__features-button {
  font-size: 0.85rem;
  padding: 0.25rem 0.6rem;
  background: white;
  border: 1.5px solid black;
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 1;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s ease, transform 0.2s ease-out;
}

.type-tester__features {
  column-count: 4;
  column-width: 10ch;
  max-height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
  width: 100%;
  box-sizing: border-box;
  transition: margin 0.25s ease;
}

.type-tester__features--visible {
  max-height: 300px;
  margin: 0.5rem 0;
  transition: margin 0.25s ease;
}

.feature-toggle {
  break-inside: avoid;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  margin-bottom: 0.25rem;
  min-width: max-content;
}



@media (max-width: 1200px) {
  .type-tester__features-button, .type-tester__features--visible {
    display: none !important;
  }
}


/* Show on hover or focus */
.type-tester:hover .type-tester__features-button,
.type-tester:focus-within .type-tester__features-button {
  opacity: 1;
  pointer-events: auto;
}

.type-tester__features-button:hover {
  background: black;
  color: white;
}


.feature-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  user-select: none;
}

.feature-toggle input[type="checkbox"] {
  appearance: none;
  width: 14px;
  height: 14px;
  border: 1.5px solid black;
  border-radius: 2px;
  background: white;
  cursor: pointer;
  position: relative;
}

.feature-toggle input[type="checkbox"]:checked::before {
  content: "";
  position: absolute;
  inset: 2px;
  background: black;
  border-radius: 1px;
}

.feature-spacer {
  flex-basis: 100%;
  height: 0;
}

/* ===================== */
/* DROPDOWN MENU         */
/* ===================== */

.dropdown {
  font-size: 0.85rem;
  padding: 0rem;
  border: none;
  background: transparent;
  color: black;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  width: auto;
  display: inline-block;
}

.dropdown:focus {
  outline: none;
}

.dropdown:hover {
  text-decoration: underline;
  background: transparent;
  color: inherit;
}

/* ===================== */
/* SLIDER GROUP          */
/* ===================== */

.slider-group {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 1.25rem;
  justify-content: flex-end;
  overflow: hidden;  
  min-width: 0;
  flex: 1;
}

.slider-group .slider-row.size {
  margin-left: auto;
  margin-right: 5px;
}



/* ===================== */
/* SLIDERS               */
/* ===================== */

.slider-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 1;
  min-width: 160px;       /* or whatever keeps it from disappearing */
  max-width: 100%;
  opacity: 0;
  transform: translateX(2px);
  pointer-events: none;
  transition: opacity 0.1s ease, transform 0.2s ease-out;
  overflow: visible;
  padding-top: 6px;
  padding-bottom: 6px;
}


input[type="range"] {
  width: 100%;
  max-width: 120px;
  flex-shrink: 1;
  height: 1.5px;
  background: black;
  border-radius: 1px;
  appearance: none;
  cursor: pointer;
  box-shadow: none;
}


.type-tester:hover .slider-row,
.type-tester:focus-within .slider-row {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.slider-label {
  font-size: 0.85rem;
  white-space: nowrap;
  display: flex;
  gap: 0.5rem;
}

.slider-value {
  font-feature-settings: "tnum";
  text-align: left;
}



input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  border: 1.5px solid black;
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  border: 1.5px solid black;
}


.type-tester__controls .slider-row:last-child {
  margin-left: auto;
  margin-right: 5px;
}


/* Footer styles */

.site-footer {
  background: white;
  padding: 4rem 0 2rem 1.5rem;
  font-size: 12px;
  color: black;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0rem;
}

.footer-about {
  grid-column: span 3;
  line-height: 1.5;
  padding-top: 1rem;
  padding-right: 20px;
}


.footer-about p {
  margin: 0;
}

.footer-section {
  display: flex;
  flex-direction: column;
  align-self: start;
  padding-top: 1rem;
}


.footer-section strong {
  font-weight: normal;
  text-transform: none;
  line-height: 1;        /* ensures tight heading height */
  margin: 0;             /* removes any stray vertical margin */
  padding: 0;
}

.footer-about::before,
.footer-section::before {
  content: "";
  display: block;
  height: 1.5px;
  width: calc(100% - 40px);
  background: black;
  margin-bottom: 1rem;
}


.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0 0; /* adds consistent top spacing */
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.footer-section a {
  text-decoration: none;
  color: black;
}

.footer-section a:hover {
  text-decoration: underline;
}

@media (max-width: 1200px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: auto;
  }

  .footer-about {
    grid-column: span 2;
  }

  .footer-about::before {
      width: 100%;
  }

  .footer-section::before {
      width: calc(100% - 20px);
  }
}


@media (max-width: 1000px) {
  .type-tester__preview {
    column-count: 1 !important;
  }
}
@media (max-width: 800px) {
  .slider-row.leading,
  .type-tester__features-button {
    display: none;
  }

  .type-tester__features {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  .slider-group .type-tester__features-button {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
  }
}

html {
  scroll-behavior: smooth;
}

/* Fallback */

@font-face {
  font-family: 'SkriftkontoretFallback';
  src: url('Skriftkontoret-Fallback.woff2') format('woff2');
  font-display: swap;
}
