/* granbom.se, design A "Anteckningsbok": serif, paper and ink, one narrow column. */

:root,
[data-bs-theme="light"] {
  color-scheme: light;
  --bg: #f6f1e7;
  --bg-raised: #fbf8f1;
  --ink: #1d1b16;
  --muted: #6b6457;
  --rule: #d9d0bf;
  --accent: #b4532a;
  --accent-soft: rgba(180, 83, 42, 0.1);
  --cold: #3a6a8f;
}
[data-bs-theme="dark"] {
  color-scheme: dark;
  --bg: #16140f;
  --bg-raised: #1e1b15;
  --ink: #ece6d9;
  --muted: #a39b8b;
  --rule: #3a352b;
  --accent: #e08a5f;
  --accent-soft: rgba(224, 138, 95, 0.12);
  --cold: #8ab6d8;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
main {
  flex: 1 0 auto;
}
.wrap {
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}
a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover {
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  background: var(--bg-raised);
  padding: 0.5rem 1rem;
  z-index: 10;
}

/* Small capitals labels, sans for contrast */
.kicker,
.label,
.site-nav,
.theme-switch,
.site-footer,
.num {
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.kicker,
.label {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 1rem;
}
.kicker a {
  color: inherit;
  text-decoration: none;
}
.kicker a:hover {
  color: var(--accent);
}

/* Header */
.site-header {
  padding: 1.75rem 0 1.5rem;
}
.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.75rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.5rem;
  font-style: italic;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
  margin-right: auto;
}
.logo {
  width: 1.15em;
  height: 1.15em;
  flex: 0 0 auto;
  transition: color 0.15s ease, transform 0.3s ease;
}
.wordmark .logo {
  transform-origin: 50% 100%;
}
.wordmark:hover .logo {
  color: var(--accent);
  transform: rotate(-4deg);
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.footer-brand .logo {
  width: 1.1em;
  height: 1.1em;
}
.site-nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.95rem;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover {
  color: var(--ink);
}
.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}
.theme-switch {
  display: flex;
  gap: 0.15rem;
  font-size: 0.75rem;
}
.theme-switch button {
  font: inherit;
  color: var(--muted);
  background: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  cursor: pointer;
}
.theme-switch button:hover {
  color: var(--ink);
}
.theme-switch button.active {
  color: var(--ink);
  border-color: var(--rule);
}

/* Home */
.intro {
  padding-top: 4rem;
  padding-bottom: 3rem;
}
.intro h1,
.page-head h1 {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 1rem;
}
.intro h1 {
  font-size: clamp(2.5rem, 7vw, 4rem);
}
.standfirst {
  font-size: 1.3rem;
  font-style: italic;
  color: var(--muted);
  margin: 0;
  max-width: 34em;
}
.index {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.index li {
  border-bottom: 1px solid var(--rule);
}
.index a {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding: 1.25rem 0.25rem;
  color: var(--ink);
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.index a:hover {
  background: var(--accent-soft);
}
.index .num {
  font-size: 0.8rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.index .body {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.index .t {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.25;
}
.index .d {
  color: var(--muted);
}
.index .arrow {
  color: var(--accent);
  transition: transform 0.15s ease;
}
.index a:hover .arrow {
  transform: translateX(4px);
}
.more {
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.95rem;
}

/* Pages */
.page {
  padding-top: 3rem;
}
.page-head {
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}
.page-head h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}
.prose > :first-child {
  margin-top: 0;
}
.prose h2,
.prose h3 {
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 2.25rem 0 0.5rem;
}
.prose h3 {
  font-size: 1.35rem;
}
.prose ul {
  padding-left: 1.2rem;
}
.prose li::marker {
  color: var(--accent);
}
.prose img,
.img-fluid {
  display: block;
  max-width: 100%;
  height: auto;
}
.prose img {
  margin: 2rem 0;
  border-radius: 3px;
  box-shadow: 0 1px 0 var(--rule), 0 12px 30px -18px rgba(0, 0, 0, 0.45);
}
.lead {
  font-size: 1.3rem;
}

/* Weather page */
.w-actions {
  margin: 1rem 0 0;
}
.w-button {
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.85rem;
  color: var(--ink);
  background: var(--bg-raised);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
}
.w-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.is-cold {
  color: var(--cold);
}
.w-icon {
  display: block;
  flex: 0 0 auto;
}

/* Now */
.w-now {
  display: grid;
  gap: 1.5rem 2.5rem;
  align-items: center;
  margin-bottom: 3rem;
}
@media (min-width: 40rem) {
  .w-now {
    grid-template-columns: auto 1fr;
  }
}
.w-now-main {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.w-now-icon {
  width: 112px;
  height: 112px;
  margin: -0.5rem 0 -0.5rem -0.5rem;
}
.w-now-temp {
  font-size: 4.5rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0;
  font-variant-numeric: lining-nums;
}
.w-now-desc {
  font-size: 1.25rem;
  font-style: italic;
  margin: 0.4rem 0 0;
}
.w-now-feel {
  color: var(--muted);
  margin: 0;
  font-size: 1rem;
}
.w-now-feel:empty {
  display: none;
}
.w-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.5rem;
  margin: 0;
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.95rem;
}
.w-facts div {
  border-top: 1px solid var(--rule);
  padding-top: 0.5rem;
}
.w-facts dt {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.w-facts dd {
  margin: 0.15rem 0 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.w-arrow {
  width: 1.1em;
  height: 1.1em;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.w-section {
  margin-bottom: 3rem;
}

/* Hours: a strip you can scroll sideways */
.w-hours {
  list-style: none;
  margin: 0;
  padding: 0 0 0.75rem;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  scrollbar-width: thin;
  scrollbar-color: var(--rule) transparent;
}
.w-hours li {
  flex: 0 0 3.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.75rem 0 0;
  scroll-snap-align: start;
}
.w-hours li + li {
  border-left: 1px solid var(--rule);
}
.w-h-time {
  font-size: 0.75rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.w-h-temp {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
}
.w-h-rain {
  font-size: 0.75rem;
  color: var(--cold);
  min-height: 1.1em;
}

/* Days */
.w-days {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.w-days li {
  display: grid;
  grid-template-columns: minmax(6.5rem, 1.3fr) 40px 2.5rem minmax(3rem, 2fr) 2.5rem;
  align-items: center;
  gap: 0.25rem 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule);
}
.w-d-name {
  font-weight: 600;
  line-height: 1.2;
}
.w-d-name small {
  display: block;
  font-weight: 400;
  font-size: 0.8rem;
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.w-d-min,
.w-d-max {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.w-d-min {
  color: var(--muted);
}
.w-d-min.is-cold {
  color: var(--cold);
}
.w-d-max {
  text-align: left;
  font-weight: 600;
}
.w-d-bar {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: var(--accent-soft);
}
.w-d-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--cold), var(--accent));
}
.w-d-rain,
.w-d-wind {
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.8rem;
  white-space: nowrap;
}
.w-d-rain {
  color: var(--cold);
}
.w-d-wind {
  color: var(--muted);
}
.w-d-rain,
.w-d-wind {
  grid-column: 3 / -1;
  grid-row: 2;
  display: inline;
}
.w-d-rain {
  justify-self: start;
}
.w-d-wind {
  justify-self: end;
}
@media (min-width: 40rem) {
  .w-days li {
    grid-template-columns: 9rem 40px 2.5rem minmax(4rem, 1fr) 2.5rem 4.5rem 4rem;
  }
  .w-d-rain,
  .w-d-wind {
    grid-column: auto;
    grid-row: auto;
    justify-self: end;
  }
}
.w-credit {
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.8rem;
  color: var(--muted);
}
.w-credit a {
  color: inherit;
}
.text-body-secondary,
small {
  color: var(--muted);
}

/* Footer */
.site-footer {
  margin-top: 5rem;
  padding: 1.5rem 0 2.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
}
.site-footer a {
  color: inherit;
}
.site-footer a:hover {
  color: var(--accent);
}

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