:root {
    --background-blue: #9DDCFF;
    --background-orange: #FF7F0F;
    --background-yellow: #FFFFA5;
    --background-lavender: #FFD9FC;
    --background-red: #FFD5D6;
    --svg-yellow: var(--background-yellow);
    --svg-white: #FFF;
    --svg-pink: #FFD5D6;
    --yellow: var(--background-yellow);
    --blue: #050060;
    --red: #7F0002;
    --purple: #4A0094;
    --text: var(--blue);
    --svg-colour: var(--svg-yellow);
    --font-regular: 400;
    --font-bold: 700;
    --text-size: 1.875rem;
    --gradient-top: var(--background-blue);
    --gradient-bottom: var(--background-orange);
}

/* Regular — 400 */
@font-face {
  font-family: "Plouv-ara";
  src: url("/assets/fonts/PLOUV-ARA/Plouv-ara-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Italic — 400 */
@font-face {
  font-family: "Plouv-ara";
  src: url("/assets/fonts/PLOUV-ARA/Plouv-ara-Italique.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* Medium — 500 */
@font-face {
  font-family: "Plouv-ara";
  src: url("/assets/fonts/PLOUV-ARA/Plouv-ara-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* Medium Italic — 500 */
@font-face {
  font-family: "Plouv-ara";
  src: url("/assets/fonts/PLOUV-ARA/Plouv-ara-MediumItalique.otf") format("opentype");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

/* Bold — 700 */
@font-face {
  font-family: "Plouv-ara";
  src: url("/assets/fonts/PLOUV-ARA/Plouv-ara-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Bold Italic — 700 */
@font-face {
  font-family: "Plouv-ara";
  src: url("/assets/fonts/PLOUV-ARA/Plouv-ara-BoldItalique.otf") format("opentype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

body {
    background: linear-gradient(180deg, var(--gradient-top) 60%, var(--gradient-bottom) 100%);
    margin: 0;
    padding: 0;
    color: var(--text);
    font-family: "Plouv-ara", sans-serif;
    font-weight: var(--font-regular);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}

header {
    width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
}

.header-bird {
    position: absolute;
}

.header-bird--left {
    left: 13rem;
    bottom: 7rem;
    width: 14.5rem;
    height: 17.4rem; /* robin.svg 210:251 */
}

.header-bird--right {
    right: 8rem;
    bottom: -12.6rem;
    width: 40rem;
    height: 26.6rem; /* eagle.svg 540:358 */
    transform: scaleX(-1);
}

header h1 {
    margin: 0;
    margin-top: 0.3em;
    line-height: 1.3em;
}

section {
    width: 60%;
}

a {
    background: transparent;
    border: none;
    font-family: "Plouv-ara";
    color: var(--text);
    font-size: var(--text-size);
    font-weight: 700;
    font-feature-settings: 'ss01' off;
    text-decoration: none;
    text-align: center;
}

a:hover {
    text-decoration: underline;
    cursor: pointer;
}

h1 {
    font-size: 21rem;
    font-weight: 500;
    text-align: center;
    font-feature-settings: 'ss01' on;
    line-height: normal;
}

p {
    text-align: center;
    font-size: 1.875rem;
    line-height: 2.125rem;
    margin: 0;
    text-box-trim: trim-both;
    text-box-edge: cap alphabetic;
}

.icon {
  display: inline-block;
  height: 4em;
  width: 4em;
  background-color: var(--text);
  -webkit-mask: var(--icon) center / contain no-repeat;
          mask: var(--icon) center / contain no-repeat;
}

.icon-heart {
    --icon: url("/assets/svg/heart.svg");
    width: 3em;
    height: 3em;
}
.icon-star-5 {
    --icon: url("/assets/svg/star-5.svg");
}

.svg-icon {
  display: block;
  background-color: var(--svg-colour);
  -webkit-mask: var(--icon) center / contain no-repeat;
          mask: var(--icon) center / contain no-repeat;
}

.svg-flower          { --icon: url("/assets/svg/flower.svg"); }
.svg-flamingo        { --icon: url("/assets/svg/flamingo.svg"); }
.svg-star-4          { --icon: url("/assets/svg/star-4.svg"); }
.svg-circle          { --icon: url("/assets/svg/circle.svg"); }
.svg-heart           { --icon: url("/assets/svg/heart.svg"); }
.svg-star-5          { --icon: url("/assets/svg/star-5.svg"); }
.svg-star-8          { --icon: url("/assets/svg/star-8-.svg"); }
.svg-parrot          { --icon: url("/assets/svg/parrot.svg"); }
.svg-seagull         { --icon: url("/assets/svg/seagull.svg"); }
.svg-eagle           { --icon: url("/assets/svg/eagle.svg"); }
.svg-twit            { --icon: url("/assets/svg/twit.svg"); }
.svg-jay             { --icon: url("/assets/svg/jay.svg"); }
.svg-magpie          { --icon: url("/assets/svg/magpie.svg"); }
.svg-reversed-magpie { --icon: url("/assets/svg/reversed-magpie.svg"); }
.svg-falcon          { --icon: url("/assets/svg/falcon.svg"); }
.svg-goose           { --icon: url("/assets/svg/goose.svg"); }
.svg-dove            { --icon: url("/assets/svg/dove.svg"); }
.svg-robin           { --icon: url("/assets/svg/robin.svg"); }
.svg-blackbird       { --icon: url("/assets/svg/blackbird.svg"); }
.svg-ara             { --icon: url("/assets/svg/ara.svg"); }
.svg-flower-small    { --icon: url("/assets/svg/flower-small.svg"); }

.deco {
    position: absolute;
    pointer-events: none;
}

.svg-icon.deco--dark {
    background-color: var(--text);
}

.introduction {
    margin-top: 16rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3.125rem;
    font-feature-settings: 'ss01' on;
}

.button-container {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    column-gap: 3.5rem;
    align-items: center;
}

.button-group {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.button-group:first-child {
    justify-content: flex-end;
}

.button-group:last-child {
    justify-content: flex-start;
}

/* === Footer === */

footer {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 14.375rem;
    gap: 1.5625rem;
    position: relative;
}

.twit-container {
    margin: 5rem 0;
}

.twit-container + .glyph-section {
    margin-top: 0;
}

.twit-icon {
    width: 10rem;
    height: 10rem;
    margin-left: 5rem;
}

.footer-plant {
    position: absolute;
    left: 3rem;
    bottom: 5rem;
    width: 5rem;
    height: 18.75rem;
}

.footer-goose {
    position: absolute;
    right: 2rem;
    bottom: 5rem;
    width: 8rem;
    height: 9.375rem;
}

.footer-credits {
    width: 96.5%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3.75rem;
    padding: 4rem 0;
    font-size: 1.25rem;
    font-weight: 400;
    text-align: center;
}

.credits-columns {
    display: flex;
    justify-content: center;
    gap: 8rem;
    width: 70%;
}

.credits-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    flex: 1;
    min-width: 0;
}

.credits-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-width: 18rem;
}

.credits-role {
    margin-bottom: 10px;
    font-weight: 400;
    font-size: 1.25rem;
    line-height: 1.5rem;
    font-feature-settings: 'ss01' on;
}

.credits-names {
    font-weight: 400;
    font-size: 1.25rem;
    line-height: 1.5rem;
}

.credits-thanks {
    width: 55%;
    font-weight: 400;
    font-size: 1.25rem;
    line-height: 1.5rem;
}

.footer-flower {
    width: calc(100% - 3rem);
    height: 2rem;
    margin: 0 1.5rem 1.5rem;
    background-color: var(--text);
    -webkit-mask: url('/assets/svg/flower-small.svg') repeat-x left center / auto 100%;
    mask: url('/assets/svg/flower-small.svg') repeat-x left center / auto 100%;
}

/* === Glyph sections === */

section.glyph-section {
    width: 96.5%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14.375rem;
    margin-top: 14.375rem;
}

.glyph-section:nth-of-type(2) .bird-story {
    position: relative;
}

.glyph-falcon {
    position: absolute;
    bottom: -13.7rem;
    left: -12rem;
    width: 12rem;
    height: 9.5rem;
}

.glyph-section:nth-of-type(3) {
    position: relative;
}

.glyph-section:nth-of-type(3) .bird-story {
    position: relative;
}

.glyph-dove {
    position: absolute;
    bottom: -9rem;
    left: -9rem;
    width: 5.5rem;
    height: 16rem;
    transform: scaleX(-1);
}

.glyph-ara {
    position: absolute;
    top: -9rem;
    right: calc(8.5% + 4.75rem);
    width: 14.5rem;
    height: 11.75rem;
}

.glyph-section:last-of-type {
    position: relative;
}

.glyph-magpie {
    position: absolute;
    top: -6.5rem;
    left: 11rem;
    width: 10.5rem;
    height: 8.1rem;
    transform: scaleX(-1);
}

.glyph-section:last-of-type .glyph-table {
    position: relative;
}

.glyph-flamingo {
    position: absolute;
    top: -15rem;
    right: 4rem;
    width: 14.5rem;
    height: 16rem;
    transform: scaleX(-1);
}

.introduction + .glyph-section {
    margin-top: 24.1875rem;
}

.bird-story {
    width: 66%;
}


.bird-story__title {
    font-weight: 700;
    font-feature-settings: 'ss02' on;
}

.bird-story__author {
    margin-top: 1rem;
    margin-bottom: 2.5rem;
    font-feature-settings: 'ss02' off;
}

.bird-story__text {
    font-feature-settings: 'fwid' on;
}

.bird-story__text--italic {
    font-style: italic;
}

.glyph-table {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.75rem;
}

.weight-labels {
    display: flex;
    justify-content: space-between;
    width: 40%;
    font-size: var(--text-size);
}

.weight-labels span { cursor: pointer; }

.weight-labels .weight-regular { font-weight: 400; }
.weight-labels .weight-regular--active { text-decoration: underline; }

.weight-labels .weight-medium {
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}
.weight-labels .weight-medium--active .weight-medium__label { text-decoration: underline; }


.weight-labels .weight-bold { font-weight: 700; }
.weight-labels .weight-bold--active { text-decoration: underline; }

.weight-labels .weight-italic { font-style: italic; }
.weight-labels .weight-italic--active { text-decoration: underline; }

.glyph-table[data-weight="regular"] .glyph-cell { font-weight: 400; }
.glyph-table[data-weight="medium"] .glyph-cell  { font-weight: 500; }
.glyph-table[data-weight="bold"] .glyph-cell    { font-weight: 700; }
.glyph-table[data-italic="true"] .glyph-cell    { font-style: italic; }

.glyph-grid {
    display: grid;
    width: 100%;
}

.glyph-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem;
    text-align: center;
    text-box-trim: trim-both;
    text-box-edge: cap alphabetic;
}

/* 13-col: full character set, 44px */
.glyph-grid--13 { grid-template-columns: repeat(13, 1fr); }
.glyph-grid--13 .glyph-cell {
    font-size: 2.75rem;
}

/* 9-col: simplified alphabet + digits, 72px ss02 */
.glyph-grid--9 { grid-template-columns: repeat(9, 1fr); }
.glyph-grid--9 .glyph-cell {
    font-size: 4.5rem;
    font-feature-settings: 'ss02' on;
}

/* 6-col: large decorative A–Z, 216px ss01 */
.glyph-grid--6 { grid-template-columns: repeat(6, 1fr); }
.glyph-grid--6 .glyph-cell {
    font-size: 13.5rem;
    font-feature-settings: 'ss01' on;
}

.seagull-container {
    margin-top: 10rem;
    height: 24rem;
}

.footer-seagull {
    width: 4em;
    height: 4em;
    transform: scaleX(-1) scale(25);
    box-sizing: border-box;
}

/* === Decorative constellations === */

#decor-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    pointer-events: none;
}

.decor-shape {
    position: absolute;
}