/*
Theme Name: Royal Refit
Theme URI: https://yachtpro.me/
Author: Royal Refit
Description: Custom one-page theme for a yacht refit yard in Montenegro. Classic theme, no block editor dependency.
Version: 1.0.7
Requires at least: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: royalrefit
*/

/* ─────────────────────────────  tokens  ───────────────────────────── */

:root {
  --rr-blue:       #2369b4;
  --rr-blue-dark:  #16456f;
  --rr-navy:       #0e2740;
  --rr-navy-deep:  #061626;
  --rr-navy-soft:  #16385a;
  --rr-sky:        #96c4eb;
  --rr-sky-pale:   #cfe2f6;
  --rr-gold:       #d8b26a;
  --rr-page:       #eef1f4;
  --rr-body:       #3d5470;
  --rr-muted:      #7b8ea5;
  --rr-font: Montserrat, 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* ─────────────────────────────  reset  ───────────────────────────── */

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

html, body { margin: 0; padding: 0; background: #dfe4e8; }

body {
  font-family: var(--rr-font);
  background: var(--rr-page);
  color: var(--rr-navy);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--rr-blue); text-decoration: none; }
a:hover { color: var(--rr-blue-dark); }

h1, h2, h3, p { margin: 0; }

.rr-skip {
  position: absolute; left: -9999px; top: 0;
  background: #fff; color: var(--rr-navy); padding: 12px 20px; z-index: 100;
}
.rr-skip:focus { left: 12px; top: 12px; }

/* ═════════════════════════════  HERO  ═════════════════════════════ */

.rr-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
  background-size: cover;
  background-position: 62% center;
  background-repeat: no-repeat;
}

.rr-hero__wash {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(12,32,54,0.28) 0%, rgba(12,32,54,0.10) 45%, rgba(12,32,54,0) 75%);
  pointer-events: none;
}

/* ── hero header ── */

.rr-hero__head {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 42px 56px 0 56px;
}

.rr-brand { display: flex; flex-direction: column; gap: 5px; }
.rr-brand__row { display: flex; align-items: baseline; gap: 7px; }

.rr-brand__a,
.rr-brand__b {
  font-size: 27px;
  letter-spacing: 3px;
  color: #ffffff;
  text-shadow: 0 1px 12px rgba(10,28,48,0.35);
}
.rr-brand__a { font-weight: 700; }
.rr-brand__b { font-weight: 300; }

.rr-brand__dot {
  width: 9px; height: 9px;
  background: var(--rr-gold);
  transform: rotate(45deg);
  display: inline-block;
}

.rr-brand__tag {
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 6.5px;
  color: rgba(255,255,255,0.82);
  padding-left: 2px;
}

.rr-burger {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  width: 34px;
  padding: 8px 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: opacity .3s ease;
}
.rr-burger:hover { opacity: 0.75; }
.rr-burger span { display: block; width: 26px; height: 2px; background: #ffffff; transition: transform .3s ease, opacity .3s ease; }
.rr-burger span:nth-child(2) { width: 18px; }

.rr-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.rr-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.rr-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ── hero side nav ── */

.rr-hero__nav {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-52%);
  z-index: 3;
  width: min(470px, 46vw);
}

.rr-hero__nav-bar1 {
  position: absolute; left: 0; top: 0;
  width: 100%; height: 152px;
  background: rgba(35,105,180,0.86);
}
.rr-hero__nav-bar2 {
  position: absolute; left: 0; top: 152px;
  width: 118%; height: 128px;
  background: rgba(150,196,235,0.60);
}

.rr-nav {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px 0 26px 74px;
}

.rr-nav a {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 47px;
  width: calc(100% + 74px);
  margin-left: -74px;
  padding-left: 74px;
  color: #ffffff;
  background-color: rgba(35,105,180,0);
  transition: width .42s cubic-bezier(.22,.61,.36,1), background-color .42s ease;
}
.rr-nav a:hover,
.rr-nav a:focus-visible {
  color: #ffffff;
  width: calc(100% + 158px);
  background-color: rgba(35,105,180,0.78);
}

.rr-nav a.is-light { color: var(--rr-navy); }
.rr-nav a.is-light:hover,
.rr-nav a.is-light:focus-visible {
  color: var(--rr-navy);
  background-color: rgba(150,196,235,0.85);
}

.rr-nav__num {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.9);
  writing-mode: vertical-rl;
  text-orientation: mixed;
}
.rr-nav a.is-light .rr-nav__num { color: var(--rr-navy); }

.rr-nav__label { font-size: 21px; font-weight: 700; letter-spacing: 1.5px; }

/* ── hero title ── */

.rr-hero__title {
  position: absolute;
  left: calc(min(470px, 46vw) + 56px);
  top: 50%;
  transform: translateY(-58%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  max-width: calc(100vw - min(470px, 46vw) - 56px);
  padding-right: 8px;
}

.rr-hero__title-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: clamp(10px, 1.5vw, 28px);
  min-width: 0;
}

.rr-hero__h1 {
  flex: 0 1 auto;
  min-width: 0;
  font-size: clamp(56px, 9vw, 156px);
  line-height: 0.86;
  font-weight: 500;
  letter-spacing: -2px;
  color: #ffffff;
  text-shadow: 0 4px 34px rgba(12,32,54,0.28);
}

.rr-hero__sub {
  flex: 0 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: clamp(8px, 1.2vw, 20px);
}
.rr-hero__sub span {
  font-size: clamp(11px, 1.15vw, 19px);
  letter-spacing: 2px;
  color: #ffffff;
}
.rr-hero__sub span:first-child {
  font-weight: 600;
  text-shadow: 0 2px 14px rgba(12,32,54,0.45);
}
.rr-hero__sub span:last-child {
  font-weight: 500;
  text-shadow: 0 2px 10px rgba(12,32,54,0.75), 0 1px 24px rgba(12,32,54,0.5);
}

.rr-hero__rule {
  width: clamp(160px, 22vw, 300px);
  height: 14px;
  background: rgba(35,105,180,0.92);
  margin-top: 22px;
  margin-left: 6px;
}

/* ── hero social bar ── */

.rr-hero__social {
  position: absolute;
  right: 0; bottom: 0;
  z-index: 3;
  /* content-box: the bar is 430px of blue plus its 56px inset, as designed. */
  box-sizing: content-box;
  width: min(430px, 40vw);
  height: 74px;
  background: rgba(35,105,180,0.80);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 30px;
  padding-right: 56px;
}
.rr-hero__social a {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.6px;
  color: #ffffff;
}
.rr-hero__social a:hover { color: var(--rr-sky-pale); }

/* ═══════════════════════  shared section bits  ═══════════════════════ */

.rr-eyebrow { display: flex; align-items: center; gap: 16px; }
.rr-eyebrow__rule { width: 46px; height: 6px; background: var(--rr-blue); }
.rr-eyebrow__text {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 4.5px;
  color: var(--rr-blue);
}
.rr-eyebrow--sky .rr-eyebrow__rule { background: var(--rr-sky); }
.rr-eyebrow--sky .rr-eyebrow__text { color: var(--rr-sky); }
.rr-eyebrow--navy .rr-eyebrow__rule { background: var(--rr-navy); }
.rr-eyebrow--navy .rr-eyebrow__text { color: var(--rr-navy); }
.rr-eyebrow--white .rr-eyebrow__rule { background: #ffffff; }
.rr-eyebrow--white .rr-eyebrow__text { color: rgba(255,255,255,0.9); }

.rr-h2 {
  font-size: clamp(30px, 3.4vw, 52px);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -0.6px;
}

.rr-lead {
  max-width: 46ch;
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
  color: var(--rr-body);
  text-wrap: pretty;
}

.rr-btn {
  display: inline-flex;
  align-items: center;
  height: 54px;
  padding: 0 34px;
  background: var(--rr-blue);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2.5px;
  transition: background .3s ease;
}
.rr-btn:hover { background: var(--rr-blue-dark); color: #ffffff; }

.rr-btn--ghost {
  /* content-box so the 1px outline sits outside the 54px button, matching the
     filled button's optical weight beside it. */
  box-sizing: content-box;
  padding: 0 28px;
  background: transparent;
  border: 1px solid rgba(35,105,180,0.4);
  color: var(--rr-blue);
  transition: border-color .3s ease;
}
.rr-btn--ghost:hover { background: transparent; border-color: var(--rr-blue); color: var(--rr-blue); }

/* image placeholder — swap for a real <img> once photography is in */
.rr-imgslot {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #e6e9ec;
  border: 1px dashed #bcc6d0;
  color: #62748a;
  overflow: hidden;
}
.rr-imgslot--filled { background: none; border: 0; }
.rr-imgslot img { width: 100%; height: 100%; object-fit: cover; }
.rr-imgslot svg { width: 26px; height: 26px; opacity: .75; }
.rr-imgslot span { font-size: 13px; font-weight: 500; letter-spacing: .2px; }

/* ═════════════════════════════  ABOUT  ═════════════════════════════ */

.rr-about { position: relative; padding: clamp(72px, 9vw, 140px) clamp(24px, 4vw, 56px); }
.rr-about__grid {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(40px, 5vw, 90px);
  align-items: start;
}
.rr-about__copy { display: flex; flex-direction: column; gap: 26px; }
.rr-about__cta { display: flex; align-items: center; gap: 14px; margin-top: 6px; flex-wrap: wrap; }
.rr-about__media { display: flex; flex-direction: column; gap: 0; }
.rr-about__photo { position: relative; width: 100%; height: clamp(260px, 30vw, 420px); }

.rr-stats { display: grid; grid-template-columns: repeat(3, 1fr); }
.rr-stat { padding: 30px 22px; }
.rr-stat__n { font-size: clamp(28px, 3vw, 42px); font-weight: 500; line-height: 1; }
.rr-stat__n sup { font-size: 0.45em; font-weight: 600; letter-spacing: 1px; vertical-align: baseline; }
.rr-stat__l { margin-top: 10px; font-size: 10px; font-weight: 600; letter-spacing: 2.4px; }

.rr-stat--blue { background: var(--rr-blue); color: #ffffff; }
.rr-stat--blue .rr-stat__l { color: rgba(255,255,255,0.85); }
.rr-stat--sky { background: var(--rr-sky); color: var(--rr-navy); }
.rr-stat--sky .rr-stat__l { color: rgba(14,39,64,0.75); }
.rr-stat--navy { background: var(--rr-navy); color: #ffffff; }
.rr-stat--navy .rr-stat__l { color: rgba(255,255,255,0.7); }

/* ═══════════════════════════  SERVICES  ═══════════════════════════ */

.rr-services {
  position: relative;
  padding: clamp(72px, 9vw, 130px) clamp(24px, 4vw, 56px);
  background: var(--rr-navy);
  color: #ffffff;
}
.rr-services__inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(44px, 5vw, 72px);
}
.rr-sechead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}
.rr-sechead__left { display: flex; flex-direction: column; gap: 22px; }
.rr-sechead__note {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.7;
  max-width: 34ch;
  color: rgba(255,255,255,0.68);
}

.rr-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0;
  background: var(--rr-navy);
  border-top: 1px solid rgba(255,255,255,0.14);
  border-left: 1px solid rgba(255,255,255,0.14);
}
.rr-card {
  padding: 40px 32px 44px;
  background: var(--rr-navy);
  border-right: 1px solid rgba(255,255,255,0.14);
  border-bottom: 1px solid rgba(255,255,255,0.14);
  transition: background .35s ease;
}
.rr-card:hover { background: var(--rr-navy-soft); }
.rr-card__n { font-size: 12px; font-weight: 600; letter-spacing: 2px; color: var(--rr-sky); }
.rr-card__t { margin: 20px 0 14px; font-size: 20px; font-weight: 600; letter-spacing: 0.4px; }
.rr-card__p { font-size: 14px; line-height: 1.75; color: rgba(255,255,255,0.72); text-wrap: pretty; }

/* ════════════════════════════  GALLERY  ════════════════════════════ */

.rr-gallery { position: relative; padding: clamp(72px, 9vw, 130px) clamp(24px, 4vw, 56px); }
.rr-gallery__inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(38px, 4vw, 60px);
}
.rr-gallery__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.rr-gallery__all { font-size: 12px; font-weight: 600; letter-spacing: 2.5px; color: var(--rr-blue); }
.rr-gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.rr-shot { display: flex; flex-direction: column; gap: 14px; }
.rr-shot__frame { position: relative; width: 100%; height: clamp(240px, 26vw, 340px); }
.rr-shot__meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.rr-shot__name { font-size: 14px; font-weight: 600; letter-spacing: 0.4px; }
.rr-shot__year { font-size: 11px; font-weight: 500; letter-spacing: 1.6px; color: var(--rr-muted); }

/* ═══════════════════════════  SHIPYARD  ═══════════════════════════ */

.rr-yard { position: relative; background: var(--rr-sky); color: var(--rr-navy); }
.rr-yard__grid {
  max-width: 1560px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}
.rr-yard__photo { position: relative; min-height: clamp(320px, 34vw, 520px); }
.rr-yard__body {
  padding: clamp(56px, 6vw, 96px) clamp(28px, 4vw, 72px);
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.rr-yard__h2 {
  font-size: clamp(28px, 3vw, 46px);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.5px;
}
.rr-specs { display: flex; flex-direction: column; }
.rr-spec {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 0;
  border-top: 1px solid rgba(14,39,64,0.2);
  font-size: 14px;
}
.rr-spec:last-child { border-bottom: 1px solid rgba(14,39,64,0.2); }
.rr-spec__k { font-weight: 400; color: rgba(14,39,64,0.72); }
.rr-spec__v { font-weight: 600; }
.rr-yard__note {
  max-width: 44ch;
  font-size: 15px;
  line-height: 1.75;
  color: rgba(14,39,64,0.8);
  text-wrap: pretty;
}

/* ═══════════════════════════  CONTACTS  ═══════════════════════════ */

.rr-contacts {
  position: relative;
  padding: clamp(72px, 9vw, 130px) clamp(24px, 4vw, 56px);
  background: var(--rr-blue);
  color: #ffffff;
}
.rr-contacts__grid {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(40px, 5vw, 80px);
  align-items: start;
}
.rr-contacts__copy { display: flex; flex-direction: column; gap: 26px; }
.rr-contacts__lead {
  max-width: 42ch;
  font-size: 16px;
  line-height: 1.75;
  color: rgba(255,255,255,0.82);
  text-wrap: pretty;
}
.rr-details { display: flex; flex-direction: column; gap: 18px; margin-top: 8px; }
.rr-detail { display: flex; flex-direction: column; gap: 5px; }
.rr-detail__k { font-size: 10px; font-weight: 600; letter-spacing: 3px; color: rgba(255,255,255,0.65); }
.rr-detail__v { font-size: 16px; font-weight: 500; color: #ffffff; }
a.rr-detail__v:hover { color: var(--rr-sky-pale); }

.rr-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(28px, 3vw, 44px);
  background: rgba(255,255,255,0.1);
}
.rr-field { display: flex; flex-direction: column; gap: 8px; }
.rr-field__k { font-size: 10px; font-weight: 600; letter-spacing: 3px; color: rgba(255,255,255,0.75); }
.rr-form input[type="text"],
.rr-form input[type="email"] {
  height: 48px;
  padding: 0 16px;
  background: rgba(255,255,255,0.94);
  border: 0;
  font-family: inherit;
  font-size: 15px;
  color: var(--rr-navy);
}
.rr-form textarea {
  padding: 14px 16px;
  background: rgba(255,255,255,0.94);
  border: 0;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.6;
  color: var(--rr-navy);
  resize: vertical;
}
.rr-form button {
  height: 54px;
  margin-top: 6px;
  background: var(--rr-navy);
  color: #ffffff;
  border: 0;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2.5px;
  cursor: pointer;
  transition: background .3s ease;
}
.rr-form button:hover { background: var(--rr-navy-deep); }
.rr-form__ok { font-size: 13px; font-weight: 500; color: #d8f0ff; }
.rr-hp { position: absolute; left: -9999px; }

/* ════════════════════════════  FOOTER  ════════════════════════════ */

.rr-footer {
  padding: 46px clamp(24px, 4vw, 56px);
  background: var(--rr-navy);
  color: rgba(255,255,255,0.62);
}
.rr-footer__inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}
.rr-footer__brand { display: flex; align-items: baseline; gap: 7px; }
.rr-footer__brand span:first-child { font-size: 18px; font-weight: 700; letter-spacing: 2.5px; color: #ffffff; }
.rr-footer__brand span:last-child { font-size: 18px; font-weight: 300; letter-spacing: 2.5px; color: #ffffff; }
.rr-footer__dot {
  width: 7px; height: 7px;
  background: var(--rr-gold);
  transform: rotate(45deg);
  display: inline-block;
}
.rr-footer__nav { display: flex; flex-wrap: wrap; gap: 26px; font-size: 12px; letter-spacing: 1px; }
.rr-footer__nav a { color: rgba(255,255,255,0.62); }
.rr-footer__nav a:hover { color: #ffffff; }
.rr-footer__copy { font-size: 12px; letter-spacing: 0.6px; }

/* ═════════════════════════  responsive  ═════════════════════════ */

/* Below the desktop layout the hero's overlapping blocks stop fitting side by
   side, so the nav drops behind the burger and the title recentres. */
@media (max-width: 980px) {
  .rr-hero { height: auto; min-height: 100svh; display: flex; flex-direction: column; }
  .rr-hero__head { padding: 28px 24px 0 24px; }

  .rr-hero__nav {
    position: fixed;
    inset: 0;
    width: 100%;
    transform: none;
    background: rgba(14,39,64,0.96);
    display: flex;
    align-items: center;
    z-index: 20;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
  }
  .rr-hero__nav.is-open { opacity: 1; visibility: visible; }
  .rr-hero__nav-bar1, .rr-hero__nav-bar2 { display: none; }
  .rr-nav { width: 100%; padding: 0 32px; }
  .rr-nav a { width: 100%; margin-left: 0; padding-left: 0; height: 62px; }
  .rr-nav a:hover, .rr-nav a:focus-visible { width: 100%; background-color: transparent; }
  .rr-nav a.is-light, .rr-nav a.is-light .rr-nav__num { color: #ffffff; }
  .rr-nav a.is-light:hover, .rr-nav a.is-light:focus-visible { background-color: transparent; }

  .rr-hero__nav .rr-nav-close {
    position: absolute; top: 26px; right: 24px;
    width: 40px; height: 40px;
    background: transparent; border: 0; cursor: pointer;
    color: #fff; font-size: 30px; line-height: 1;
  }

  .rr-hero__title {
    position: relative;
    left: auto; top: auto;
    transform: none;
    max-width: 100%;
    margin: auto 0;
    padding: 40px 24px 120px 24px;
  }
  .rr-hero__title-row { flex-wrap: wrap; align-items: flex-end; }
  .rr-hero__h1 { font-size: clamp(56px, 17vw, 120px); }
  .rr-hero__sub span { font-size: clamp(12px, 3.2vw, 18px); }
  .rr-hero__rule { margin-left: 0; }

  .rr-hero__social { width: 100%; padding-right: 24px; justify-content: center; gap: 40px; height: 62px; }
}

@media (max-width: 900px) {
  .rr-hero__nav .rr-nav-close { display: block; }
}

@media (min-width: 981px) {
  .rr-hero__nav .rr-nav-close { display: none; }
}

@media (max-width: 640px) {
  .rr-stats { grid-template-columns: 1fr; }
  .rr-about__cta .rr-btn { flex: 1 1 100%; justify-content: center; }
  .rr-footer__inner { flex-direction: column; align-items: flex-start; }
}

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