/*
Theme Name: Roberta Perrone Studio
Theme URI: https://robertaperronestudio.com
Author: Roberta Perrone
Description: Minimal editorial portfolio theme for robertaperronestudio.com — destination weddings and elopements in Italy.
Version: 1.4.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: rps
*/

    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    :root { --white: #faf9f7; --black: #111110; --grey: #888884; --gap: 16px; --transition: 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
    html { scroll-behavior: smooth; }
    body { background: var(--white); color: var(--black); font-family: 'Cormorant Garamond', serif; font-weight: 300; overflow-x: hidden; }

    /* NAVIGATION */
    nav { position: fixed; top: 0; left: 0; right: 0; z-index: 200; display: flex; justify-content: space-between; align-items: center; padding: 24px 48px; background: linear-gradient(to bottom, rgba(250,249,247,0.92) 0%, rgba(250,249,247,0) 100%); }
    .nav-logo { font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--black); text-decoration: none; }
    .nav-links { display: flex; gap: 40px; list-style: none; }
    .nav-links a { font-size: 11px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--black); text-decoration: none; position: relative; transition: opacity 0.3s ease; }
    .nav-links a::after { content: ''; position: absolute; bottom: -3px; left: 0; right: 0; height: 1px; background: var(--black); transform: scaleX(0); transform-origin: left; transition: transform 0.35s ease; }
    .nav-links a:hover::after { transform: scaleX(1); }
    .nav-links a:hover { opacity: 0.6; }
    .nav-toggle { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 4px; }
    .nav-toggle span { display: block; width: 22px; height: 1px; background: var(--black); }

    /* INTRO */
    .intro { padding: 140px 48px 60px; max-width: 680px; }
    .intro .intro-kicker { font-weight: 300; font-size: 11px; letter-spacing: 0.35em; text-transform: uppercase; color: var(--grey); margin-bottom: 18px; line-height: 1.8; }
    .intro p { font-size: 22px; line-height: 1.7; font-style: italic; }

    /* VERTICAL GRID */
    .grid-vertical { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); padding: 0 var(--gap); align-items: start; }
    .photo-item { overflow: hidden; line-height: 0; opacity: 0; transform: translateY(20px); transition: opacity 0.75s ease, transform 0.75s ease; }
    .photo-item.visible { opacity: 1; transform: translateY(0); }
    .photo-item img { width: 100%; height: auto; display: block; transition: transform 0.9s var(--transition); }
    .grid-vertical .photo-item img { height: 100%; object-fit: cover; }
    .grid-vertical .photo-item:hover img { transform: scale(1.04); }
    .grid-vertical .photo-item:nth-child(6n+1) img, .grid-vertical .photo-item:nth-child(6n+5) img { aspect-ratio: 2/3; }
    .grid-vertical .photo-item:nth-child(6n+2) img, .grid-vertical .photo-item:nth-child(6n+6) img { aspect-ratio: 3/5; }
    .grid-vertical .photo-item:nth-child(6n+3) img, .grid-vertical .photo-item:nth-child(6n+4) img { aspect-ratio: 3/4; }

    /* SECTION BREAK */
    .section-break { padding: 100px 48px 60px; display: flex; align-items: center; gap: 32px; }
    .section-break::before, .section-break::after { content: ''; flex: 1; height: 1px; background: #ddd; }
    .section-break h2 { font-weight: 300; font-size: 10px; letter-spacing: 0.4em; text-transform: uppercase; color: var(--grey); white-space: nowrap; }

    /* HORIZONTAL GRID */
    .grid-horizontal { padding: 0 var(--gap); display: flex; flex-direction: column; gap: 32px; }
    .grid-horizontal .photo-item { transform: translateY(24px); }
    .grid-horizontal .photo-item.visible { transform: translateY(0); }
    .grid-horizontal .photo-item:hover img { transform: scale(1.02); }
    .photo-item.full { width: 100%; }
    .photo-item.center { width: 68%; margin: 0 auto; }
    .photo-item.right { width: 56%; margin-left: auto; }
    .photo-item.left { width: 56%; }

    /* ABOUT */
    #about { padding: 120px 48px; max-width: 720px; margin: 0 auto; text-align: center; }
    #about h2 { font-weight: 300; font-size: 36px; letter-spacing: 0.05em; font-style: italic; margin-bottom: 32px; }
    #about p { font-size: 18px; line-height: 1.9; margin-bottom: 24px; }
    #about .detail { font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--grey); line-height: 2.4; margin-top: 40px; }

    /* APPROACH / LETTERS */
    #approach, #letters { padding: 60px 48px 100px; max-width: 900px; margin: 0 auto; }
    #approach h2, #letters h2 { font-weight: 300; font-size: 11px; letter-spacing: 0.4em; text-transform: uppercase; color: var(--grey); margin-bottom: 60px; text-align: center; }
    .letters-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
    .letter-item { border-top: 1px solid #e0ddd8; padding-top: 28px; }
    .letter-quote { font-size: 16px; line-height: 1.85; margin-bottom: 20px; }
    .step-title { font-weight: 400; font-size: 22px; font-style: italic; margin-bottom: 14px; }
    .letter-author { font-size: 10px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--grey); }

    /* CONTACT */
    #contact { padding: 80px 48px 100px; text-align: center; background: var(--black); color: var(--white); }
    #contact h2 { font-weight: 300; font-size: 32px; font-style: italic; letter-spacing: 0.05em; margin-bottom: 20px; }
    #contact p { font-size: 15px; line-height: 1.8; color: rgba(250,249,247,0.6); margin-bottom: 48px; }
    .contact-links { display: flex; justify-content: center; gap: 56px; flex-wrap: wrap; }
    .contact-link { display: flex; flex-direction: column; align-items: center; gap: 10px; text-decoration: none; }
    .contact-link .label { font-size: 10px; letter-spacing: 0.35em; text-transform: uppercase; color: rgba(250,249,247,0.45); }
    .contact-link .value { font-size: 18px; color: var(--white); font-style: italic; transition: opacity 0.3s ease; }
    .contact-link:hover .value { opacity: 0.6; }

    /* FOOTER */
    footer { padding: 28px 48px; display: flex; justify-content: space-between; align-items: center; background: var(--black); border-top: 1px solid rgba(255,255,255,0.08); }
    .footer-copy { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(250,249,247,0.3); }
    .footer-links { display: flex; gap: 32px; }
    .footer-links a { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(250,249,247,0.4); text-decoration: none; transition: color 0.3s ease; }
    .footer-links a:hover { color: var(--white); }

    /* LIGHTBOX */
    .lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(17,17,16,0.96); display: none; align-items: center; justify-content: center; padding: 40px; cursor: zoom-out; }
    .lightbox.open { display: flex; }
    .lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
    .photo-item img { cursor: zoom-in; }

    @media (max-width: 900px) { .letters-grid { grid-template-columns: 1fr; gap: 32px; } }
    @media (max-width: 768px) {
      nav { padding: 20px 24px; }
      .nav-links { display: none; flex-direction: column; gap: 0; position: fixed; inset: 0; background: var(--white); justify-content: center; align-items: center; }
      .nav-links.open { display: flex; }
      .nav-links a { display: block; font-size: 18px; padding: 16px 0; letter-spacing: 0.2em; }
      .nav-toggle { display: flex; position: relative; z-index: 2; }
      .intro { padding: 100px 24px 40px; }
      .intro p { font-size: 18px; }
      .grid-vertical { grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 0 8px; }
      .grid-horizontal { padding: 0 8px; gap: 16px; }
      .photo-item.center, .photo-item.right, .photo-item.left { width: 100%; margin: 0; }
      .section-break { padding: 60px 24px 40px; }
      #about { padding: 80px 24px; }
      #contact { padding: 60px 24px 80px; }
      .contact-links { gap: 32px; }
      footer { padding: 24px; flex-direction: column; gap: 16px; text-align: center; }
      .lightbox { padding: 12px; }
    }
  
    /* WP extras */
    .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }
    .page-content { max-width: 720px; margin: 0 auto; padding: 140px 24px 100px; font-size: 18px; line-height: 1.9; }
    .page-content h1 { font-weight: 300; font-style: italic; font-size: 36px; margin-bottom: 32px; }
    .page-content p { margin-bottom: 24px; }
    .page-content img { max-width: 100%; height: auto; }
    body.admin-bar nav { top: 32px; }
    @media (max-width: 782px) { body.admin-bar nav { top: 46px; } }

    /* Multi-page additions */
    .nav-links a.current::after { transform: scaleX(1); }
    .more { text-align: center; padding: 80px 24px 20px; }
    .more-link { display: inline-block; font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--black); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 6px; transition: opacity .3s ease; }
    .more-link:hover { opacity: .6; }
    .more-link.light { color: var(--white); }
    .about-teaser { padding-bottom: 80px !important; }
    .about-teaser p { margin-bottom: 40px !important; }
    .contact-teaser p { margin-bottom: 36px !important; }
    main > #contact:only-child { min-height: 62vh; display: flex; flex-direction: column; justify-content: center; }

    /* Back to top */
    .to-top { position: fixed; right: 28px; bottom: 28px; z-index: 250; display: flex; flex-direction: column; align-items: center; gap: 2px;
      width: 52px; height: 52px; justify-content: center; border-radius: 50%; background: rgba(250,249,247,0.92); border: 1px solid #e0ddd8;
      color: var(--black); text-decoration: none; opacity: 0; pointer-events: none; transform: translateY(10px);
      transition: opacity .4s ease, transform .4s ease, background .3s ease; backdrop-filter: blur(6px); }
    .to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
    .to-top:hover { background: var(--black); color: var(--white); border-color: var(--black); }
    .to-top-arrow { font-size: 16px; line-height: 1; }
    .to-top-label { font-size: 8px; letter-spacing: .3em; text-transform: uppercase; line-height: 1; padding-left: .3em; }
    @media (max-width: 768px) { .to-top { right: 16px; bottom: 16px; width: 46px; height: 46px; } }

    /* Curating (visible only to logged-in editors) */
    .photo-item { position: relative; }
    .rps-curate { position: absolute; top: 10px; right: 10px; z-index: 5; width: 34px; height: 34px; border-radius: 50%; border: none;
      background: rgba(17,17,16,.78); color: #faf9f7; font-size: 18px; line-height: 34px; cursor: pointer; opacity: 0; transition: opacity .25s ease; font-family: inherit; }
    .photo-item:hover .rps-curate, .photo-item.is-hidden .rps-curate { opacity: 1; }
    @media (hover: none) { .rps-curate { opacity: 1; } }
    .photo-item.is-hidden img { opacity: .22; filter: grayscale(1); }
    .photo-item.is-hidden::after { content: 'Hidden'; position: absolute; left: 12px; top: 16px; font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--black); }
    .photo-item.is-busy { opacity: .5; }
    .rps-toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); z-index: 400; background: var(--black); color: var(--white);
      padding: 12px 18px; font-size: 14px; display: flex; gap: 18px; align-items: center; opacity: 0; pointer-events: none; transition: all .3s ease; }
    .rps-toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
    .rps-toast button { background: none; border: 0; color: var(--white); text-decoration: underline; cursor: pointer; font: inherit; }
    .rps-curate-note { position: fixed; left: 16px; bottom: 16px; z-index: 260; background: rgba(250,249,247,.95); border: 1px solid #e0ddd8; padding: 8px 12px; font-size: 12px; font-style: italic; }

    /* Reorder mode (editors only): compact thumbnails, drag to sort */
    .rps-curate-note { display: flex; gap: 14px; align-items: center; }
    .rps-reorder-btn { background: var(--black); color: var(--white); border: 0; padding: 7px 12px; font: inherit; font-style: normal; font-size: 11px; letter-spacing: .15em; text-transform: uppercase; cursor: pointer; }
    body.rps-reorder .grid-vertical { grid-template-columns: repeat(6, 1fr); gap: 8px; }
    body.rps-reorder .grid-horizontal { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
    body.rps-reorder .grid-horizontal .photo-item { width: auto !important; margin: 0 !important; }
    body.rps-reorder .grid-vertical .photo-item img { aspect-ratio: 2/3 !important; }
    body.rps-reorder .grid-horizontal .photo-item img { aspect-ratio: 3/2; object-fit: cover; }
    body.rps-reorder .photo-item { cursor: grab; opacity: 1 !important; transform: none !important; }
    body.rps-reorder .photo-item img { cursor: grab; transform: none !important; }
    body.rps-reorder .rps-curate { display: none; }
    .rps-ghost { opacity: .25 !important; }
    .rps-chosen { outline: 2px solid var(--black); }
    @media (max-width: 768px) { body.rps-reorder .grid-vertical { grid-template-columns: repeat(3, 1fr); } body.rps-reorder .grid-horizontal { grid-template-columns: repeat(2, 1fr); } }
