@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=IBM+Plex+Serif:ital,wght@0,400;0,500;1,400&family=Montserrat:wght@400;500;600&display=swap');

:root {
  --plum-dark: #421928;
  --plum: #7c3855;
  --plum-soft: #9c5570;
  --rose: #d9a6af;
  --rose-dark: #9e4f69;
  --cream: #f8f1ea;
  --cream-2: #fffaf6;
  --ink: #2f2020;
  --gold: #ead8b2;
  --line: #dec6bf;
}

* { box-sizing: border-box; }


 
html {
  font-size: 14px;
  min-width: 1164px;
}

body {
 min-width: 1164px;
  margin: 0;
  background-color: var(--cream);
  background-image: url("assets/kandykane-paper-texture.png");
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: cover;
  background-attachment: fixed;
  color: var(--ink);
  font-family: "IBM Plex Serif", Georgia, serif;
  font-variant-numeric: lining-nums;
  line-height: 1.6;
  letter-spacing: 0.02em;
}

header {
  position: relative;
  background: none;
  z-index: 1;
  height: 120px;
}

header::before {
  content: "";
  position: absolute;
  inset: 0 0 -40px;

  background:
    linear-gradient(
      rgba(117, 64, 78, .85),
      rgba(117, 64, 78, .78)
    ),
    url("assets/horse-header.png") center / cover no-repeat;

  -webkit-mask:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 0 H100 V75 H55 C52 75 50 76 47 78 L18 98 C12 100 6 100 0 100 Z' fill='black'/%3E%3C/svg%3E")
  center / 100% 100% no-repeat;
  mask:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 0 H100 V75 H55 C52 75 50 76 47 78 L18 98 C12 100 6 100 0 100 Z' fill='black'/%3E%3C/svg%3E")
  center / 100% 100% no-repeat;

  z-index: -1;
}


/* LOGO */

header .logo {
  position: absolute;
  top: 85px;
  transform: translateY(-60%);
  display: flex;
  align-items: center;
  z-index: 2;
}

header .logo img {
  display: block;
  width: auto;
  height: 130px;
  margin-left: 30px;
}

/* NAVI */

header .nav {
  z-index: 3;
  position: absolute;
  top: 50%;
  left: 50%;
  padding: 10px; 
  transform: translate(-50%, -50%);
  border-top: 1px solid rgba(234,216,178,.45);
  border-bottom: 1px solid rgba(234,216,178,.30);
background: linear-gradient(
  90deg,
  transparent 0%,
  rgba(50, 18, 31, .2) 18%,
  rgba(50, 18, 31, .2) 82%,
  transparent 100%
);
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 30px);
  white-space: nowrap;
}

header .nav a {
  color: var(--gold);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .24em;
  font-size: .82rem;
  font-weight: 100;
}

header .nav a:hover, footer a:hover {
  color: var(--rose);
}

header .nav span {
  color: var(--rose);
  font-size: .4rem;
}

/*  MAIN */


main {
  width: 1120px;
max-width: none;
  background: rgb(241 231 214 / 80%); 
  margin: 0 auto;
  border-left: 1px solid rgba(124, 56, 85, .22);
  border-right: 1px solid rgba(124, 56, 85, .22);
}

main > section {
  margin: 0 44px;
  padding-bottom: 60px; 
}

/* Space between content sections, not between the final section and footer. */
main > section:not(:last-child) {
  padding-bottom: 60px;
}

/*  FOOTER */

footer {
  position: relative;
  width: 100%;
  min-height: 100px;
  margin: 0; 
  padding: 28px 6%;
  background: none;
  color: var(--gold);
  letter-spacing: 0.1rem;
  font-size: 0.82rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  align-items: center;
  z-index: 1;
}

footer::before {
  content: "";
  position: absolute;
  inset: -40px 0 0;

  background:
    linear-gradient(
      rgba(117, 64, 78, .78),
      rgba(117, 64, 78, .78)
    ),
    url("assets/horse-header.png") center / cover no-repeat;

  -webkit-mask:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 25 H45 C48 25 50 24 53 22 L82 2 C88 0 94 0 100 0 V100 H0 Z' fill='black'/%3E%3C/svg%3E")
  center / 100% 100% no-repeat;

mask:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 25 H45 C48 25 50 24 53 22 L82 2 C88 0 94 0 100 0 V100 H0 Z' fill='black'/%3E%3C/svg%3E")
  center / 100% 100% no-repeat;

  z-index: -1;
}

footer a {
	color: #fff3df;
  text-decoration: none;
  }
  
  
  
/* FONTIT */

h1, h2, h3 {
  margin-top: 0; 
  color: var(--plum);
  text-transform: uppercase;
}

h1 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 100;
  font-size: 2.2rem;
  margin: 0 0 30px 0; 
  line-height: 1.08;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.page-intro h1 {
	text-align: center;
	}

h2 {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 60px 0 24px;

  color: var(--plum);
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.65rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: .08em;
  text-transform: uppercase;
  clear: both;
}

h2::after {
  content: "";
  flex: 1;
  border-top: 1px solid rgba(124, 56, 85, .28);
}

h3 {
  font-family: "Montserrat", Arial, sans-serif;
  font-size: .9rem;
  letter-spacing: .16em;
}

aside h3 {
  margin: 50px 0 15px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(124, 56, 85, .22);
}

aside h3:first-child {
  margin-top: 20px;
}

a {
	color: var(--rose-dark);
	text-decoration: none; 
}

a:hover, .generations a:hover {
	color: var(--plum-dark);
}

.text {
  max-width: 700px;
  margin: 60px auto
} 

.ranch-plan {
  width: 72%;
  margin: 30px auto 36px;
}

.ranch-plan img {
  display: block;
  width: 100%;
  height: auto;
  opacity: .9;
}
	
.text p {
	margin: 20px auto;
	text-align: justify;
	}


/* HORSE LISTINGS */

.horse-section > h2 {
  text-align: center;
  margin-bottom: 35px;
}

.horse-listings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

/* CARD */

.horse-card {
  display: grid;
  grid-template-columns: 45% 55%;
	border: 5px solid #fffaf6;
  min-width: 0;
  min-height: 270px;

  background: #f7e8df;
  color: #2f2020;
  text-decoration: none;

  overflow: hidden;
  border-radius: 5px;

  transition: transform 0.25s ease,
              box-shadow 0.25s ease;
}

.horse-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(66, 25, 40, 0.12);
}

/* IMAGE */

.horse-card-image {
  position: relative;
  min-width: 0;
  overflow: visible;
}

.horse-card-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* INFO */

.horse-card-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: visible;

  min-width: 0;
  padding: 22px 18px;
  text-align: center;
  position: relative;
  z-index: 1;
  background: none;
}

.horse-card-info::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 0 -45px;
  
  background: url("assets/paper-bg.png") left 45% / auto 125% no-repeat;
  }

.horse-card-info h3 {
  margin: 0 0 6px;
  font-size: 1.3rem;
  line-height: 1.1;
  color: #421928;
  font-weight: normal;
  overflow-wrap: anywhere;
  font-family: "Fraunces", serif;
  min-height: 2.2em;
display: flex;
align-items: center;
justify-content: center;
}

.horse-card-discipline {
  font-size: 13px;
  font-style: italic;
  color: #7c3855;
}

.horse-card-pedigree {
  margin: 18px 0;
  font-size: 14px;
  line-height: 1.7;
}

.horse-card-award {
  width: 100%;
  padding-top: 12px;
  margin-top: auto;

  border-top: 1px solid #d9a6af;

  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #7c3855;
}




/* FRONT PAGE */

.page-intro {
  position: relative; 
  display: grid;
  grid-template-columns: 54% 46%;
  min-height: 360px;
  margin-bottom: 40px;
  overflow: hidden;
}

.page-intro > div {
  position: relative;
  z-index: 2;
  align-self: center;
  padding: 55px 0 55px 55px;
}
 
.page-intro p {
  max-width: 500px;
  margin: 0 0 20px;
  text-align: center;
}
 
.page-intro img {
  position: absolute;
  top: 0;
  right: 0;
  width: 90%;
  height: 100%;
  object-fit: cover;
  opacity: .8;

  -webkit-mask-image:
    linear-gradient(
      to right,
      transparent 0%,
      rgba(0,0,0,.15) 10%,
      black 80%
    );

  mask-image:
    linear-gradient(
      to right, 
      transparent 0%,
      rgba(0,0,0,.15) 10%,
      black 80%
    );
}


/* ACTIVITIES */

.activities {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 44px;
  padding-top: 270px;
}

.activity-photos {
  position: absolute;
  top: 0;
  left: 50%;
  width: 720px;
  height: 270px;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
}  
 
.activity-photos figure {
  position: relative;
  width: 360px; 
  height: 250px;
  margin: 0;
}
 
/* piirrokset */
.activity-photos figure::before {
  content: "";
  position: absolute;
  top: 20px;
  bottom: auto;
  height: 280px;
  width: 450px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain; 
  opacity: .3;
}

.activity-photos figure:first-child::before {
  right: 0;
  background-image: url("assets/breeding-sketch.png");
}

.activity-photos figure:last-child::before {
  left: 0;
  background-image: url("assets/showing-sketch.png");
}

/* valokuvat */
.activity-photos img {
  position: absolute;
  z-index: 1; 
  top: 35px;
  width: 300px;
  height: 190px;
  object-fit: cover;

  border: 5px solid var(--cream-2); 
  box-shadow: 0 4px 12px rgba(47, 32, 32, .10);
}

.activity-photos figure:first-child img {
  right: 30px;
  transform: rotate(-.7deg);
}

.activity-photos figure:last-child img {
  left: 30px;
  transform: rotate(.7deg);
}


/* tekstit */

.activities article {
  position: relative;
  padding: 8px 38px 0;
}

.activities article:first-of-type {
  border-right: 1px solid var(--line);
  text-align: right;
}

.activities article:last-of-type {
  text-align: left;
}

.activities h3 {
  margin: 0 0 12px;
  color: var(--plum);
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.activities p {
  max-width: 360px;
  margin: 0;
}

.activities article:first-of-type p {
  margin-left: auto;
}


/* JOURNAL */

.journal {
  display: grid;
  grid-template-columns: 30% 70%;
  margin: 70px 44px;
}

.journal > h2 {
  grid-column: 1 / -1;
  margin-top: 0;
}

.journal-links {
  padding: 8px 34px 0 0;
}

.journal-links h3 {
  margin: 0 0 12px;
  color: var(--plum);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.journal-links h3:not(:first-child) {
  margin-top: 30px;
}

.journal-links ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.journal-links li {
  margin: 5px 0;
}

.journal a {
  color: inherit;
  text-decoration: none;
}

.journal-links a {
  color: var(--plum);
}

.entries {
  padding-left: 40px;
  border-left: 1px solid var(--line);
}

.entries article {
  padding: 0 0 16px;
}

.entries article + article {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.entries time {
  color: var(--plum);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: .65rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.entries h3 {
  margin: 3px 0 4px;
  color: var(--plum);
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: .04em;
}

.entries p {
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}






/* ABOUT PAGE ADDITIONS */

.journal-feature.ranch {
  min-height: 350px;
}

.journal-feature.ranch > img {
	object-position: center top;
  width: 78%;
  height: 350px;
}

.journal-feature.ranch article {
  top: 50%;
  width: 46%;
  padding: 34px 36px;
  transform: translateY(-50%) rotate(.5deg);
}

.journal-feature.ranch h3 {
  font-size: 1.6rem;
}

.journal-feature.ranch p {
  line-height: 1.65;
}


/*  BREEDING  */

.breeding {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.breeding h2 {
  margin-top: 0;
}

.breeding h3 {
  margin-top: 32px;
}

.breeding ul {
  padding-left: 20px;
}

.breeding li {
  margin-bottom: 12px;
}

/* Yleiskäyttöinen karuselli */

.carousel {
	position: relative;
	}

.carousel-slide[hidden] {
  display: none;
}

.carousel-slide img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.carousel-controls {
  position: static;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin-top: 16px;
  pointer-events: auto;
}

.carousel-controls button {
  position: absolute;
  top: 0;
  z-index: 2;
  width: 34px;
  height: 42px;
  border: 0;
  background: var(--plum);
  color: var(--cream);
  font-size: 1.5rem;
  cursor: pointer;
}

.carousel-prev {
  left: 0;
  transform: translate(-50%, 200px);
}

.carousel-next {
  right: 0;
  transform: translate(50%, 200px);
}

.carousel-count {
  position: static;
  transform: none;
  margin: 0;
}

.gallery-carousel {
    position: relative;
}

.gallery-carousel .gallery a[hidden] {
    display: none;
}

.gallery-carousel .carousel-controls {
    margin-top: 16px;
}

.gallery-carousel .carousel-prev,
.gallery-carousel .carousel-next {
    top: 50%;
    transform: translateY(-50%);
}

.gallery-carousel .carousel-prev {
    left: -17px;
}

.gallery-carousel .carousel-next {
    right: -17px;
}


/* Facebook */

.fb-feed {
  padding: 24px;
  background: rgba(255,250,246,.68);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(100,60,60,.08);
}

.fake-fb-post {
  margin-bottom: 18px;
  padding: 14px;
  text-align: left;
  background: #fff;
  border: 1px solid #ddd6d3;
  border-radius: 7px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  font-family: Arial, sans-serif;
  color: #1f1f1f;
}

.fb-header {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.fb-header img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.fb-header h3 {
  margin: 0;
  color: #1f1f1f;
  font-size: .92rem;
  text-transform: none;
  letter-spacing: 0;
}

.fb-header p {
  margin: 0;
  color: #65676b;
  font-size: .75rem;
}

.fb-text {
  margin: 8px 0 12px;
  font-size: .92rem;
  line-height: 1.45;
}

.fb-image {
  width: 100%;
  display: block;
  max-height: 230px;
  object-fit: cover;
  border-radius: 4px;
}

.fb-stats {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0;
  color: #65676b;
  font-size: .75rem;
}

.fb-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid #ddd;
  padding-top: 8px;
  text-align: center;
  color: #65676b;
  font-size: .82rem;
  font-weight: bold;
}

/* Full tab layouts */

.full-diary {
  max-width: 760px;
  margin: 0 auto;
}

.full-facebook {
  max-width: 560px;
  margin: 0 auto;
}

/* Milestones */

.milestone-timeline {
  max-width: 760px;
  margin: 0 auto;
  text-align: left;
}

.milestone {
  position: relative;
  padding: 0 0 28px 34px;
  border-left: 1px solid var(--line);
}

.milestone::before {
  content: "◇";
  position: absolute;
  left: -8px;
  top: 0;
  color: var(--rose-dark);
  background: var(--cream);
}

.milestone-date {
  margin: 0 0 4px;
  color: var(--rose-dark);
  font-style: italic;
}

.milestone h3 {
  margin: 0 0 6px;
  color: var(--plum);
  text-transform: uppercase;
  letter-spacing: .08em;
}






/* ---------- COMMON HEADINGS ---------- */

.horse-section-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 30px;
}

.horse-section-heading h2,
.horse-side-section h2 {
  margin: 0;
  color: var(--plum);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.horse-section-heading span {
  flex: 1;
  height: 1px;
  background:
    linear-gradient(
      to right,
      var(--line),
      transparent
    );
}


/* =========================================================
   INTRO
   ========================================================= */

.intro {
  display: grid;
  grid-template-columns: 55% 1fr;
  height: 400px;
}

.intro > img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  object-position: center 35%;
  filter: sepia(0%);
  opacity: 0.8;
}
 
.intro article {
  padding: 35px 55px;
  letter-spacing: .12em;
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(rgb(255 252 233 / 100%), rgb(222 197 172 / 0%)), 
    url("assets/stalldoor-sketch-1.png") right 120px / 450px auto no-repeat;
}

.intro h1 {
  margin: 5px 0 25px 0;
  font-size: 3rem;
  line-height: .95;
  color: var(--plum);
  font-weight: normal;
}

.details {
    margin: 8px 0;
    color: var(--ink);
    font-size: .9rem;
    text-transform: uppercase;
}

.details span {
    margin: 0 10px;
    color: var(--plum-soft);
    font-size: .3rem;
}

.people {
  margin-top: 24px;
  font-size: .9rem;
}

.people em {
  color: var(--plum-soft);
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-right: 8px;
	font-weight: bold; 
}


/* =========================================================
   EDITORIAL BODY
   ========================================================= */

.horse-editorial-layout {
  display: grid;
  grid-template-columns: minmax(175px, 22%) minmax(0, 1fr);
  gap: clamp(44px, 6vw, 78px);
  align-items: stretch;
} 

.horse-content {
    padding-right: 40px;
    padding-top: 40px;
    padding-bottom: 60px;
}


/* =========================================================
   LONG SIDEBAR
   ========================================================= */

aside {
  position: relative;
	isolation: isolate;
  padding: 5px 29px 40px 22px;
  border-right: 1px solid rgba(124, 56, 85, .22);
  background: #dcc5b4;
}

aside::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 35%;
  height: 850px;
  opacity: 0.2;
  background:
    url("assets/kk-monogram.png")
    center top / 100% auto no-repeat;
  pointer-events: none;
  z-index: -1;
}

aside::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 900px;

  background-image:
    url("assets/saddle-sketch.png"),
    url("assets/kk-landscape.png");

  background-size:
    150% auto,
    150% auto;

  background-position:
    left bottom -70px,
    center bottom 250px;

  background-repeat: no-repeat;
  opacity: 0.4;
  pointer-events: none;
  z-index: -1;
}

aside h2 {
	font-size: 1.3rem;
	color: var(--plum);
  margin: 50px 0 15px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(124, 56, 85, .22);
}

aside h2:first-child {
  margin-top: 20px;
}

aside ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

aside li {
  margin-bottom: 10px;
  font-size: .9rem;
  line-height: 1.5;
}

aside strong {
  float: right;
  color: var(--plum);
}

aside img {
  max-height: 70px;
  width: auto;
	opacity: 0.7;
	margin: 5px; 
}

aside img:hover {
	opacity: 1;
}


/* =========================================================
   MAIN SECTIONS
   ========================================================= */


/* ---------- ABOUT ---------- */



.about {
  font-size: .98rem;
  margin: 40px auto;
}

.about p {
  margin: 0 0 18px;
}

.about > img {
  float: right;
  width: 235px;
  aspect-ratio: 4 / 5;
  object-fit: cover;

  margin: 15px 0 20px 42px;
  padding: 8px 8px 20px;
  background: rgba(255,255,255,.58);
  box-shadow: 0 8px 20px rgba(60,30,35,.11);
  transform: rotate(1.6deg);
}

.horse-lead {
  color: var(--plum);
  font-size: 1.18rem;
  font-style: italic;
}


/* ---------- FAMILY ---------- */

.family {
  display: block;
}

.family h2 {
  margin: 0 0 20px;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
}


/* ---------- PEDIGREE ---------- */

.pedigree {
  margin-bottom: 0;
}

.pedigree-paper {
  position: relative;
  z-index: 2;

  width: calc(108% + 18px);
  margin-left: -80px;

  transform: rotate(-2deg); 
  transform-origin: center;

  padding: 24px 32px 30px;

  background:
    linear-gradient(
      rgb(255 245 221 / 80%),
      rgba(255, 250, 244, .80)
    ),
    url("assets/paper-texture-3.jpg") center / 900px;

  box-shadow:
    2px 5px 5px rgba(60, 30, 35, .13);
}

.pedigree-title {
  margin-bottom: 25px;
  text-align: center;
}

.pedigree-title span {
  display: block;
  color: var(--plum);
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.pedigree-title strong {
  display: block;
  margin-top: 3px;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: .58rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.generations {
	position: relative;
  display: grid;
  grid-template-columns: .8fr 1fr 1.15fr;
  gap: 28px;
  align-items: stretch;
  height: 300px;
}

.pedigree-horse,
.pedigree-parents,
.pedigree-grandparents {
  display: grid;
  position: relative;
}

.pedigree-horse {
  align-content: center;
}

.pedigree-horse::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 100%;
  width: 14px;
  border-top: 1px solid rgba(124, 56, 85, .35);
}

.pedigree-parents {
  grid-template-rows: 1fr 1fr;
  padding-left: 5px;
}

.pedigree-parents::after {
  content: "";
  position: absolute;
  left: -14px;
  top: 25%;
  width: 14px;
  height: 50%;
  border-top: 1px solid rgba(124, 56, 85, .35);
  border-bottom: 1px solid rgba(124, 56, 85, .35);
}

.pedigree-parents > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.pedigree-parents > div::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 100%;
  width: 14px;
  border-top: 1px solid rgba(124, 56, 85, .35);
}

.pedigree-grandparents {
  grid-template-rows: repeat(4, 1fr);
}

.pedigree-grandparents > div {
	position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 7px 0;
}

.pedigree-grandparents > div::before {
  content: "";
  position: absolute;
  top: 50%;
  right: calc(100% + 6px);
  width: 8px;
  border-top: 1px solid rgba(124, 56, 85, .35);
}

/* hevonen → vanhemmat: pystysuora haara */
.pedigree-parents::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 25%;
  bottom: calc(25% - 1px);
  border-left: 1px solid rgba(124, 56, 85, .35);
}

/* vanhemmat → isovanhemmat: pystysuorat haarat */
.pedigree-parents > div::before {
  content: "";
  position: absolute;
  left: calc(100% + 14px);
  top: 25%;
  height: 50%;
  border-left: 1px solid rgba(124, 56, 85, .35);
}

.generations a,
.pedigree-horse strong,
.pedigree-grandparents > div > span {
	color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.generations small {
  display: block;
  margin-top: 1px;
  font-size: .73rem;
}

.generations em {
  display: block;
  margin-top: 2px;
  color: var(--plum-soft);
  font-size: .68rem;
}


/* extended pedigree */

.extended-pedigree-toggle {
  display: block;
  margin: 10px 0 0 auto;
  padding: 0;
  border: 0;
  background: none;
  color: var(--plum);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: .65rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
}

#extended-pedigree {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 50px;
  margin-top: 28px;
}

#extended-pedigree[hidden] {
  display: none;
}

.pedigree-line h3 {
  margin: 0 0 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--plum);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.pedigree-line article {
  padding: 15px 0;
  border-bottom: 1px solid rgba(124, 56, 85, .14);
}

.pedigree-line h4 {
  margin: 0;
  font-family: "IBM Plex Serif", Georgia, serif;
  font-size: 1rem;
  font-weight: 500;
}

.pedigree-line h4 a {
  color: var(--plum);
  text-decoration: none;
}

.pedigree-line article > p {
  margin: 2px 0 0;
  font-size: .75rem;
  font-style: italic;
  opacity: .65;
}

.pedigree-line ul {
  margin: 7px 0 0;
  padding: 0;
  list-style: none;
  font-size: .78rem;
  line-height: 1.5;
}

.pedigree-line li + li {
  margin-top: 2px;
}


/* ---------- OFFSPRING ---------- */

.offspring {
  margin-top: 30px;
}

.offspring ul {
  margin: 0;
  padding: 0;
  padding-bottom: 10px;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 28px;
  border-bottom: 1px solid rgba(124, 56, 85, .15);
}

.offspring li {
  display: block;
  padding: 15px 0; 
}

.offspring li:first-child {
  padding-left: 0;
}

.offspring li:last-child {
  padding-right: 0;
}

.offspring li + li {
  position: relative;
}

.offspring li + li::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 0;
  bottom: 0;
  border-left: 1px solid rgba(124, 56, 85, .15);
}

.offspring li > span {
  padding-top: 2px;
  font-size: .68rem;
}

.offspring li div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.offspring a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.offspring small {
  margin-top: 2px;
  font-size: .72rem;
}


/* =========================================================
   RECORDS
   ========================================================= */
.tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.tab {
  padding: 7px 16px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--plum);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}

.tab:hover {
  background: rgba(124, 56, 85, .06);
}

.tab.active {
  background: var(--plum);
  border-color: var(--plum);
  color: var(--cream-2);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  padding: 13px 12px;
  color: var(--plum);
  font-size: .68rem;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 600;
}

td {
  padding: 12px;
  border-top: 1px solid rgba(124,56,85,.12);
  font-size: .84rem;
}

tbody tr:nth-child(even) {
  background: rgba(255,250,246,.27);
}

/* EMPTY COMPETITION RECORD */

.record-empty {
  display: flex;
  align-items: center;
  justify-content: left;
  gap: 30px;
  padding: 20px 30px 35px;
}

.record-empty-image {
  display: block;
  width: 105px;
  height: 155px;
  object-fit: contain;
  opacity: .55;
}

.record-empty-text h3 {
  margin: 0 0 8px;
  color: var(--plum);
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.record-empty-text p {
  margin: 0;
  color: var(--plum-soft);
  font-style: italic;
  font-size: .9rem;
}


/* =========================================================
   PHOTOS + JOURNAL
   ========================================================= */

.photos-journal {
  padding-top: 8px;
}

/* ---------- HEADING ---------- */

.photos-journal > .subtitle {
  margin: 5px 0 28px;
  font-style: italic;
  color: rgba(47, 32, 32, .68);
}


/* ---------- FEATURED ENTRY ---------- */

.journal-feature {
  position: relative;
  min-height: 315px;
  margin-bottom: 18px;
}

.journal-feature > img {
  display: block;
  width: 72%;
  height: 315px;
  object-fit: cover;
  padding: 7px;
  background: rgba(255, 255, 255, .65);
  box-shadow: 0 7px 18px rgba(60, 30, 35, .10);
  transform: rotate(-.4deg);
}

.journal-feature article {
  position: absolute;
  z-index: 1;
  top: 24px;
  right: 0;
  width: 37%;
  padding: 27px 28px 25px;
  background: rgba(250, 242, 236, .96);
  box-shadow: 0 7px 18px rgba(60, 30, 35, .10);
  transform: rotate(.5deg);
}

.journal-feature time {
  display: block;
  margin-bottom: 12px;
  color: var(--plum-soft);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: .72rem;
  letter-spacing: .17em;
}

.journal-feature h3 {
  margin: 0 0 14px;
  color: var(--plum);
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.journal-feature p {
  margin: 0 0 17px;
  line-height: 1.55;
}

.journal-feature article > a,
.gallery-link,
.latest-entries a {
  color: var(--plum);
  text-decoration: none;
}

.journal-feature article > a {
  font-family: "Montserrat", Arial, sans-serif;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}


/* ---------- PHOTOS ---------- */

.gallery {
  display: grid;
  grid-template-columns: 1fr .95fr 1.05fr .9fr;
  gap: 12px;
  align-items: center;
  margin: 0 4px;
}

.gallery img {
  display: block;
  width: 100%;
  height: 135px;
  object-fit: cover;
  padding: 5px;
  background: rgba(255, 255, 255, .58);
  box-shadow: 0 5px 13px rgba(60, 30, 35, .09);
}

.gallery img:nth-child(1) {
  transform: rotate(-1deg);
}

.gallery img:nth-child(2) {
  transform: rotate(.8deg);
}

.gallery img:nth-child(3) {
  transform: rotate(-.5deg);
}

.gallery img:nth-child(4) {
  transform: rotate(.7deg);
}

.gallery-link {
  display: table;
  margin: 18px auto 0;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
}


/* ---------- LATEST ENTRIES ---------- */

.latest-entries {
  margin-top: 42px;
}

.latest-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 4px;
}

.latest-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(124, 56, 85, .20);
}

.latest-heading > a {
  order: 3;
  white-space: nowrap;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
}


/* individual entry */

.latest-entries > article {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid rgba(124, 56, 85, .14);
}

.latest-entries > article time {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
  padding-right: 15px;
  border-right: 1px solid rgba(124, 56, 85, .18);
  font-family: "Montserrat", Arial, sans-serif;
}

.latest-entries > article time strong {
  color: var(--plum);
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1;
}

.latest-entries > article time span {
  font-size: .62rem;
  line-height: 1.25;
  letter-spacing: .08em;
}

.latest-entries h4 {
  margin: 0 0 3px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.latest-entries h4 a {
  color: var(--plum);
}

.latest-entries article p {
  margin: 0;
  line-height: 1.45;
  color: rgba(47, 32, 32, .78);
}

.latest-entries article > a {
  white-space: nowrap;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: .65rem;
  font-weight: 500;
  letter-spacing: .10em;
  text-transform: uppercase;
}

/* DIARY ENTRY */

.diary-entry {
  padding: 42px 45px;
  background: rgba(255, 250, 246, .55);
  border: 1px solid rgba(124, 56, 85, .14);
}

.diary-entry + .diary-entry {
  margin-top: 40px;
}

.diary-back {
  padding: 0;
  border: 0;
  background: none;
  color: var(--plum);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}

.diary-meta {
  margin: 25px 0 8px;
  text-align: center;
  color: var(--plum);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.diary-entry > h3 {
  margin: 0;
  text-align: center;
  color: var(--plum);
  font-size: 1.8rem;
  font-weight: 500;
  letter-spacing: .06em;
}

.diary-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 15px 0 28px;
  color: var(--plum);
  font-size: .55rem;
}

.diary-divider::before,
.diary-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--line);
}

.diary-entry figure {
  margin: 0;
}

.diary-entry figure img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
}

.diary-entry figcaption {
  margin-top: 4px;
  text-align: right;
  font-size: .7rem;
  font-style: italic;
  opacity: .55;
}

.diary-text {
  max-width: 620px;
  margin: 30px auto 0;
}

.diary-text p {
  margin: 0 0 18px;
}

.diary-text p:first-child {
  font-size: 1.08rem;
}

.diary-wordcount {
  max-width: 620px;
  margin: 30px auto 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: .7rem;
  font-style: italic;
  opacity: .6;
}

.diary-view {
  max-height: 850px;
  overflow-y: auto;
  margin-top: 30px;
}

.diary-view[hidden] {
  display: none;
}
