/* =========================================================================
   romansafronov.com — static build
   Single stylesheet. No framework, no build step.
   ========================================================================= */

/* ---------- Fonts (self-hosted, subset to latin + latin-ext) ------------- */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/lato-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/lato-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/lato-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/lato-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../fonts/lato-900-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../fonts/lato-900-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Cyrillic, for the Ukrainian pages. Google Fonts subsets Cyrillic out of
   Lato, so these are cut from the upstream release — see tools/README. */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/lato-400-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116, U+20B4;
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/lato-700-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116, U+20B4;
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../fonts/lato-900-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116, U+20B4;
}

/* ---------- Design tokens ------------------------------------------------ */
:root,
[data-theme='dark'] {
  --bg: hsl(0 0% 9%);
  --bg-elevated: hsl(0 0% 13%);
  --fg: hsl(240 100% 99%);
  --fg-high: hsl(240 4% 81%);
  --fg-muted: hsl(240 1% 54%);
  --line: hsl(240 1% 37%);
  --surface: hsl(240 1% 20%);
  --float-bg: hsl(210 3% 44%);
  --float-icon: hsl(210 15% 90%);
  --primary: #fa5500;
  --primary-hover: #d94900;
  --shell: 1240px;
  --gutter: 15px;
  --header-h: 80px;
  --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
}

[data-theme='light'] {
  --bg: hsl(0 0% 100%);
  --bg-elevated: hsl(0 0% 97%);
  --fg: hsl(223 8% 17%);
  --fg-high: hsl(230 4% 30%);
  --fg-muted: hsl(225 2% 52%);
  --line: hsl(0 0% 84%);
  --surface: hsl(0 0% 95%);
  --float-bg: hsl(210 6% 82%);
  --float-icon: hsl(223 8% 22%);
}

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

html {
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--fg);
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.35s var(--ease-out), color 0.35s var(--ease-out);
}

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

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

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: 0; left: 50%;
  transform: translate(-50%, -120%);
  z-index: 100;
  padding: 12px 20px;
  background: var(--primary);
  color: #fff;
  border-radius: 0 0 6px 6px;
  transition: transform 0.2s var(--ease-out);
}
.skip-link:focus { transform: translate(-50%, 0); }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Header ------------------------------------------------------- */
.site-header {
  position: relative;
  z-index: 20;
  height: var(--header-h);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

@media (min-width: 1441px) {
  .site-header__inner { margin-inline: 100px; max-width: none; }
}

.site-header__end {
  display: flex;
  align-items: center;
  gap: 14px;
}

.site-header__logo {
  display: block;
  flex: none;
  line-height: 0;
}
.site-header__logo img {
  width: 56px;
  height: 56px;
}
[data-theme='dark'] .site-header__logo .logo--dark,
[data-theme='light'] .site-header__logo .logo--light { display: none; }

.site-nav__list {
  display: flex;
  align-items: center;
}
.site-nav__list a {
  display: block;
  padding: 18.6px 15.94px;
  font-size: 17px;
  color: var(--fg);
  transition: color 0.25s var(--ease-out);
}
.site-nav__list a:hover { color: var(--primary); }
/* The last item sits flush with the container edge, as on the original. */
.site-nav__list li:last-child a { padding-right: 0; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 22px;
  color: var(--fg);
}
.nav-toggle__bars {
  position: relative;
  width: 26px;
  height: 2px;
  background: currentColor;
  transition: background-color 0.2s var(--ease-out);
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: '';
  position: absolute;
  left: 0;
  width: 26px;
  height: 2px;
  background: currentColor;
  transition: transform 0.25s var(--ease-out);
}
.nav-toggle__bars::before { top: -8px; }
.nav-toggle__bars::after { top: 8px; }

[data-nav-open] .nav-toggle__bars { background: transparent; }
[data-nav-open] .nav-toggle__bars::before { transform: translateY(8px) rotate(45deg); }
[data-nav-open] .nav-toggle__bars::after { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 1023px) {
  /* The toggle is the only laid-out item to the right of the logo: the nav is
     a fixed overlay and the in-bar language switcher is hidden. Left to
     space-between it therefore lands mid-header, which is where the original
     theme put it. An auto start margin eats the free space first, so it sits
     flush right instead. A deliberate departure from the original. */
  .nav-toggle { display: flex; margin-inline-start: auto; }

  .site-nav {
    position: fixed;
    inset: 0;
    display: flex;
    /* The link list and the language switcher stack, both centred. */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #0d0e13;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s var(--ease-out), visibility 0.35s;
    z-index: 30;
  }
  [data-nav-open] .site-nav { opacity: 1; visibility: visible; }

  .site-nav__list {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  .site-nav__list li:last-child a { padding-right: 20px; }
  .site-nav__list a {
    padding: 12px 20px;
    font-size: 32px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fafaff;
  }
  .nav-toggle { position: relative; z-index: 40; }
  [data-nav-open] .nav-toggle { color: #fafaff; }
}

/* ---------- Language switcher -------------------------------------------- */
.lang {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 14px;
  letter-spacing: 0.06em;
}
.lang__item {
  padding: 6px 8px;
  border-radius: 4px;
  color: var(--fg-muted);
  transition: color 0.25s var(--ease-out), background-color 0.25s var(--ease-out);
}
a.lang__item:hover,
a.lang__item:focus-visible { color: var(--fg); background-color: var(--surface); }
.lang__item[aria-current] {
  color: var(--primary);
  font-weight: 700;
}
.lang--in-menu { display: none; }

@media (max-width: 1023px) {
  .lang--in-bar { display: none; }
  .lang--in-menu {
    display: flex;
    justify-content: center;
    margin-block-start: 32px;
    font-size: 18px;
  }
  .lang--in-menu .lang__item { padding: 10px 14px; color: #8a8a90; }
  .lang--in-menu .lang__item[aria-current] { color: var(--primary); }
}

/* ---------- Intro -------------------------------------------------------- */
.intro {
  padding-block: calc(8vh + 35px);
  text-align: center;
}
.intro__title {
  font-size: 7rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  margin-block-end: 36px;
}
.intro__tagline {
  overflow-wrap: break-word;
  font-size: 3.7rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 5.8px;
  text-transform: uppercase;
  margin-block: 0 32px;
}

@media (max-width: 1024px) {
  .intro__title { font-size: 10vw; }
  .intro__tagline { font-size: 10vw; }
}

/* "GRIANGHRAFADÓIR" is a single 15-character word; at 10vw it runs past the
   container in this band and gets clipped. Only Irish needs the trim. */
@media (min-width: 768px) and (max-width: 1024px) {
  html[lang='ga'] .intro__tagline { font-size: 8.4vw; }
}
@media (max-width: 767px) {
  .intro { padding-block: calc(1vh + 35px); }
  .intro__title { font-size: 9.2vw; line-height: 1.1; }
  .intro__tagline { font-size: 4.5vw; line-height: 1.3; }
}

/* ---------- Full-bleed parallax bands ------------------------------------ */
.band {
  position: relative;
  height: 60vh;
  overflow: hidden;
}
.band__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.band__media img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  /* JS sets the exact height; this is the no-JS / pre-script state. */
  height: 100%;
  object-fit: cover;
  will-change: transform;
}
/* Film-grain wash, matching the 4 % noise overlay on the original. */
.band::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: reduce) {
  .band__media img { height: 100% !important; transform: none !important; }
}

/* ---------- Gallery ------------------------------------------------------ */
.gallery-section {
  padding-block: calc(12vh + 35px) calc(14vh + 56px);
}

.gallery {
  position: relative;
  margin: -15px;
}
.gallery__item {
  padding: 15px;
}
.gallery__item a {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--bg-elevated);
}
.gallery__item img {
  width: 100%;
  height: auto;
  transition: transform 0.5s var(--ease-out), opacity 0.3s var(--ease-out);
}
.gallery__item a:hover img { transform: scale(1.04); }

/* JS lays the grid out as a true masonry; this is the no-JS / pre-JS state. */
.gallery:not([data-masonry='on']) {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.gallery[data-masonry='on'] .gallery__item {
  position: absolute;
  top: 0;
  left: 0;
}

@media (max-width: 767px) {
  .gallery:not([data-masonry='on']) { grid-template-columns: 1fr; }
}

/* ---------- About -------------------------------------------------------- */
.section-title {
  font-size: 50px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  padding-block-end: 50px;
  margin-block-end: 20px;
}
@media (max-width: 767px) {
  .section-title { font-size: 32px; padding-block-end: 32px; }
}

.about {
  padding-block: 0 calc(6vh + 20px);
}
.about__body {
  max-width: 68ch;
  margin-inline: auto;
}
.about__body p {
  margin-block-end: 1.4em;
  font-size: 18px;
  line-height: 1.8;
  color: var(--fg-high);
}
.about__body p:last-child { margin-block-end: 0; }
.about__body em { font-style: normal; font-weight: 700; letter-spacing: 0.04em; }

@media (max-width: 767px) {
  .about { padding-block: 0 calc(4vh + 20px); }
  .about__body p { font-size: 16px; line-height: 1.75; }
}

/* ---------- Marquee ------------------------------------------------------ */
.marquee {
  overflow: hidden;
  width: 100%;
}
.marquee__track {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  margin-left: -100%;
  animation: marquee 300s linear infinite;
}
.marquee__line {
  display: inline-block;
  font-size: 5vw;
  font-weight: 900;
  line-height: 1.5;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1px var(--fg);
}
.marquee__line span { -webkit-text-stroke: 2px var(--primary); }

@keyframes marquee {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-100%, 0, 0); }
}

@media (max-width: 767px) {
  .marquee { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; padding-left: 0; margin-left: 0; }
}

/* ---------- Contact ------------------------------------------------------ */
/* The contact block sits in a 1140px shell, 100px narrower than the gallery. */
.contact {
  max-width: 1140px;
  margin-inline: auto;
  padding: 90px 10px;
}
.contact__lead {
  max-width: 640px;
  margin: -20px auto 44px;
  text-align: center;
  font-size: 18px;
  color: var(--fg-muted);
}

.contact__links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 340px));
  justify-content: center;
  gap: 24px;
}

.contact__link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: border-color 0.25s var(--ease-out), color 0.25s var(--ease-out),
              background-color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.contact__link:hover,
.contact__link:focus-visible {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}
.contact__link svg {
  flex: none;
  width: 30px;
  height: 30px;
  fill: currentColor;
}
.contact__link-name {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.contact__link-handle {
  margin-inline-start: auto;
  font-size: 15px;
  color: var(--fg-muted);
}
.contact__link:hover .contact__link-handle,
.contact__link:focus-visible .contact__link-handle { color: inherit; }

@media (max-width: 767px) {
  .contact__lead { font-size: 16px; margin-block-end: 32px; }
  .contact__links { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .contact__link { padding: 18px 22px; }
  .contact__link-name { font-size: 18px; }
}

/* ---------- Footer ------------------------------------------------------- */
.site-footer {
  padding-block: calc(8vh + 35px) 15px;
}
.site-footer__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  min-height: 35px;
}
.site-footer__social {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}
.site-footer__social a {
  position: relative;
  display: inline-flex;
  color: var(--fg);
  transition: color 0.25s var(--ease-out);
}
/* Keeps the visual mark at 20px while giving thumbs something to hit. */
.site-footer__social a::after {
  content: '';
  position: absolute;
  inset: -11px -6px;
}
.site-footer__social a:hover { color: var(--primary); }
.site-footer__social svg { width: 20px; height: 20px; fill: currentColor; }

@media (max-width: 1024px) {
  /* The original hides the footer social row below the desktop breakpoint;
     both links stay reachable from the menu. */
  .site-footer__inner { justify-content: center; text-align: center; min-height: 24px; }
  .site-footer__social { display: none; }
}

/* ---------- Floating controls -------------------------------------------- */
.float-btn {
  position: fixed;
  right: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 50%;
  background-color: var(--float-bg);
  color: var(--float-icon);
  cursor: pointer;
  z-index: 15;
  transition: opacity 0.3s var(--ease-out), visibility 0.3s, background-color 0.35s var(--ease-out);
}
.float-btn svg { width: 24px; height: 24px; }

.theme-toggle { bottom: 90px; }
.back-to-top { bottom: 30px; }
.back-to-top svg { fill: currentColor; stroke: none; }

.theme-toggle .sun-and-moon > .sun { fill: currentColor; transform: scale(1.75); transform-origin: center; transition: transform 0.5s var(--ease-out); }
.theme-toggle .sun-and-moon > .sun-beams { stroke: currentColor; stroke-width: 2px; opacity: 0; transform-origin: center; transition: transform 0.5s var(--ease-out), opacity 0.4s var(--ease-out); }
.theme-toggle .sun-and-moon > .moon > circle { transform: translateX(-7px); transition: transform 0.4s var(--ease-out); }

[data-theme='light'] .theme-toggle .sun-and-moon > .sun { transform: scale(1); }
[data-theme='light'] .theme-toggle .sun-and-moon > .sun-beams { opacity: 1; }
[data-theme='light'] .theme-toggle .sun-and-moon > .moon > circle { transform: translateX(0); }

/* The original tucks these into the corner below the desktop breakpoint and
   drops them entirely on phones. Same here, except they are kept stacked —
   the original lets them overlap between 850 px and 1023 px. */
@media (max-width: 1023px) {
  .float-btn { right: 12px; }
  .back-to-top { bottom: 12px; }
  .theme-toggle { bottom: 72px; }
}
@media (max-width: 767px) {
  .float-btn { display: none; }
}

/* ---------- Lightbox ----------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 11, 11, 0.94);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease-out), visibility 0.25s;
}
.lightbox[data-open] { opacity: 1; visibility: visible; }
.lightbox__figure {
  margin: 0;
  max-width: min(92vw, 1200px);
  max-height: 88vh;
}
.lightbox__figure img {
  max-width: min(92vw, 1200px);
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
}
.lightbox__caption {
  margin-block-start: 12px;
  text-align: center;
  font-size: 14px;
  color: #cfcfd4;
}
.lightbox__btn {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.08);
  border: 0;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s var(--ease-out);
}
.lightbox__btn:hover { background: rgba(255, 255, 255, 0.18); }
.lightbox__btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lightbox__close { top: 20px; right: 20px; }
.lightbox__prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 20px; top: 50%; transform: translateY(-50%); }

@media (max-width: 767px) {
  .lightbox__prev { left: 8px; }
  .lightbox__next { right: 8px; }
}

body[data-scroll-locked] { overflow: hidden; }

/* ---------- 404 ---------------------------------------------------------- */
.oops {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-height: 100vh;
  padding: 40px 20px;
  text-align: center;
}
.oops h1 {
  font-size: clamp(4rem, 16vw, 9rem);
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}
.oops p { color: var(--fg-muted); font-size: 18px; }

/* ---------- Print -------------------------------------------------------- */
@media print {
  .site-header, .float-btn, .marquee, .contact, .band { display: none !important; }
  body { background: #fff; color: #000; }
}
