/* ==========================================================================
   Kristina Hallfríður · kristinahallfridur.com
   One stylesheet for the whole site. Mobile first.
   Palette:
     --paper  warm off-white background
     --ink    text
     --north  cold North Atlantic accent (links, rules, falcon)
   ========================================================================== */

:root {
  --paper: #FAF7F2;
  --ink: #1C1C1C;
  --north: #3E5C6B;
  --faint: rgba(62, 92, 107, 0.35);   /* rules, borders */
  --muted: #6b675f;                   /* secondary text */
  --measure: 40rem;                   /* comfortable line length for prose */
}

/* ---- Reset, base ------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "EB Garamond", Garamond, Georgia, serif;
  font-size: 1.1875rem;
  line-height: 1.68;
  font-feature-settings: "liga", "kern";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

/* ---- Typography -------------------------------------------------------- */

h1,
h2,
h3 {
  font-family: "EB Garamond", Garamond, Georgia, serif;
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 1rem;
  letter-spacing: 0.005em;
}

h1 {
  font-size: clamp(2rem, 6vw, 2.75rem);
}

h2 {
  font-size: clamp(1.35rem, 4vw, 1.6rem);
  margin-top: 2.75rem;
}

p {
  margin: 0 0 1.25rem;
}

a {
  color: var(--north);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 0.15s ease;
}

a:hover,
a:focus-visible {
  color: var(--ink);
}

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

::selection {
  background: var(--north);
  color: var(--paper);
}

/* ---- The single rule motif -------------------------------------------- */

hr {
  border: 0;
  height: 1px;
  background: var(--faint);
  width: 5.5rem;
  margin: 3rem auto;
}

hr.full {
  width: 100%;
}

/* ---- Layout ------------------------------------------------------------ */

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.25rem;
}

main {
  padding: 2.5rem 0 4rem;
}

/* ---- Header and navigation --------------------------------------------- */

.site-header {
  padding-top: 2rem;
  text-align: center;
}

.brand {
  display: inline-block;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.14em;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover,
.brand:focus-visible {
  color: var(--north);
}

.site-nav {
  margin-top: 1.1rem;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1.6rem;
}

.site-nav a {
  font-variant-caps: all-small-caps;
  letter-spacing: 0.16em;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  padding: 0.15rem 0;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--north);
}

.site-nav a[aria-current="page"] {
  color: var(--north);
  border-bottom-color: var(--north);
}

.header-rule {
  margin-top: 2rem;
  margin-bottom: 0;
}

/* ---- Home page --------------------------------------------------------- */

.hero {
  text-align: center;
  padding-top: clamp(4rem, 14vh, 8rem);
}

.hero .falcon {
  width: 2.1rem;
  height: auto;
  color: var(--north);
  margin-bottom: 2.25rem;
}

.hero h1 {
  font-size: clamp(2.6rem, 9vw, 4.25rem);
  font-weight: 500;
  margin-bottom: 1.75rem;
}

.hero .tagline {
  font-style: italic;
  font-size: clamp(1.15rem, 3.5vw, 1.35rem);
  max-width: 34rem;
  margin: 0 auto 1.4rem;
  color: var(--ink);
}

.hero .now {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 auto;
}

.hero .now em {
  color: var(--ink);
}

.hero hr {
  margin: 2.5rem auto;
}

/* Restrained duotone horizon: pure SVG, no photograph.
   Replace the <svg class="horizon"> block in index.html with your own
   <img> when you have a photo you like. */
.horizon {
  display: block;
  width: 100%;
  max-width: var(--measure);
  margin: 3.5rem auto 0;
  color: var(--north);
  opacity: 0.55;
}

/* ---- Page headings ------------------------------------------------------ */

.page-title {
  margin-top: 1rem;
}

.lede {
  font-style: italic;
  font-size: 1.25rem;
  color: var(--ink);
}

.subtitle {
  font-variant-caps: all-small-caps;
  letter-spacing: 0.14em;
  font-size: 1.1rem;
  color: var(--muted);
  margin-top: -0.5rem;
}

/* ---- Field notes -------------------------------------------------------- */

.notes {
  list-style: none;
  margin: 0;
  padding: 0;
}

.notes li + li {
  margin-top: 0;
}

.notes li + li::before {
  content: "";
  display: block;
  height: 1px;
  width: 5.5rem;
  background: var(--faint);
  margin: 3rem auto;
}

.notes h2 {
  margin-top: 0;
  font-size: 1.4rem;
}

/* ---- Contact ------------------------------------------------------------ */

.contact-line {
  margin-top: 2rem;
}

.contact-email {
  font-size: 1.35rem;
}

/* ---- Footer -------------------------------------------------------------- */

.site-footer {
  padding-bottom: 3rem;
  text-align: center;
  font-size: 0.95rem;
  color: var(--muted);
}

.site-footer hr {
  margin-bottom: 2rem;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--north);
}

/* ---- Accessibility helpers ---------------------------------------------- */

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--paper);
  color: var(--north);
  padding: 0.5rem 1rem;
  z-index: 10;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* ---- Larger screens ------------------------------------------------------ */

@media (min-width: 44rem) {
  body {
    font-size: 1.25rem;
  }

  main {
    padding: 3.5rem 0 5rem;
  }

  .site-header {
    padding-top: 2.75rem;
  }

  .site-nav ul {
    gap: 0.35rem 2rem;
  }
}
