@import './header.css';
@import './body.css';
@import './footer.css';

@font-face {
  font-display: swap;
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  src: url('/fonts/dm-sans/dm-sans-latin-400-normal.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  src: url('/fonts/dm-sans/dm-sans-latin-500-normal.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 600;
  src: url('/fonts/dm-sans/dm-sans-latin-600-normal.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 700;
  src: url('/fonts/dm-sans/dm-sans-latin-700-normal.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 700;
  src: url('/fonts/fraunces/fraunces-latin-700-normal.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 800;
  src: url('/fonts/fraunces/fraunces-latin-800-normal.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 700;
  src: url('/fonts/fraunces/fraunces-latin-700-italic.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 800;
  src: url('/fonts/fraunces/fraunces-latin-800-italic.woff2') format('woff2');
}

:root {
  --paper: #f7f3e9;
  --paper-deep: #ede6d6;
  --ink: #18221d;
  --muted: #667069;
  --line: #cfc8b9;
  --coral: #ff705d;
  --cobalt: #3156d3;
  --lime: #c9ee62;
  --butter: #ffd95a;
  --white: #fffdf8;
  --on-accent: #18221d;
  --link-hover: #233e9b;
  --paper-dots: rgb(24 34 29 / 7%);
  --soft-line: rgb(24 34 29 / 25%);
  --shadow: 0.35rem 0.35rem 0 var(--ink);
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
  color-scheme: light;
}

:root[data-theme='dark'] {
  --paper: #101713;
  --paper-deep: #18221d;
  --ink: #edf2ec;
  --muted: #a6b2aa;
  --line: #4a574f;
  --coral: #ff806f;
  --cobalt: #91a8ff;
  --lime: #b8dc57;
  --butter: #e9c94f;
  --white: #18211c;
  --link-hover: #bdcaff;
  --paper-dots: rgb(237 242 236 / 7%);
  --soft-line: rgb(237 242 236 / 22%);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 18rem;
  margin: 0;
  background-color: var(--paper);
  background-image: radial-gradient(var(--paper-dots) 0.7px, transparent 0.7px);
  background-size: 7px 7px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0 0 auto;
  height: 0.45rem;
  background: linear-gradient(90deg, var(--coral) 0 33%, var(--butter) 33% 66%, var(--cobalt) 66%);
  content: '';
}

a {
  color: var(--cobalt);
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--link-hover);
}

a:focus-visible {
  border-radius: 0.15rem;
  outline: 0.2rem solid var(--coral);
  outline-offset: 0.25rem;
}

h1,
h2,
h3 {
  margin-block: 0;
  font-family: var(--serif);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

h1 {
  font-size: clamp(3rem, 8vw, 6.8rem);
}

h2 {
  font-size: clamp(2.2rem, 5vw, 4rem);
}

h3 {
  font-size: clamp(1.35rem, 2vw, 1.8rem);
}

p,
ul,
ol {
  margin-block: 0 1.25rem;
}

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

::selection {
  background: var(--lime);
  color: var(--on-accent);
}
