/* ==========================================================================
   Suðurnet Sp/f — heimasíðustílur
   ========================================================================== */

/* --- Tokens ------------------------------------------------------------- */
:root {
    --ink:        #0d1f2d;
    --ink-soft:   #16334a;
    --sea:        #1f5a86;
    --sea-bright: #2d7cb0;
    --brass:      #b0813f;
    --brass-soft: #c99a55;
    --brass-lite: #d9b57e;
    --paper:      #ffffff;
    --paper-warm: #faf8f4;
    --paper-deep: #f1ece3;
    --text:       #23303a;
    --muted:      #5c6b77;
    --line:       #e4ded4;
    --line-dark:  rgba(255, 255, 255, .14);

    --font-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, "Times New Roman", serif;
    --font-sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --wrap: 1180px;
    --gut: clamp(1.25rem, 4vw, 3rem);

    --shadow-sm: 0 1px 2px rgba(13, 31, 45, .06), 0 2px 8px rgba(13, 31, 45, .05);
    --shadow-md: 0 2px 6px rgba(13, 31, 45, .07), 0 12px 32px rgba(13, 31, 45, .09);
    --shadow-lg: 0 4px 12px rgba(13, 31, 45, .09), 0 24px 60px rgba(13, 31, 45, .14);
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--text);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--sea); text-decoration: none; }
a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: .18em; }

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

/* --- Typography --------------------------------------------------------- */
h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.18;
    color: var(--ink);
    margin: 0 0 .6em;
    letter-spacing: -.012em;
}

h1 { font-size: clamp(2.25rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

.lead {
    font-size: clamp(1.1rem, 1.9vw, 1.32rem);
    line-height: 1.62;
    color: var(--muted);
}

/* --- Layout ------------------------------------------------------------- */
.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: var(--gut);
}

.wrap--narrow { max-width: 800px; }
.wrap--wide { max-width: 1340px; }

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--warm { background: var(--paper-warm); }
.section--deep { background: var(--ink); color: rgba(255, 255, 255, .85); }
.section--deep h2, .section--deep h3 { color: #fff; }

.section-head {
    max-width: 46rem;
    margin-bottom: clamp(2rem, 4vw, 3.25rem);
}

.section-head--center {
    margin-inline: auto;
    text-align: center;
}

/* Small caps eyebrow above section headings */
.eyebrow {
    display: block;
    font-family: var(--font-sans);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--brass);
    margin-bottom: .9rem;
}

.section--deep .eyebrow { color: var(--brass-lite); }

/* Thin brass rule used as a formal divider */
.rule {
    width: 3.5rem;
    height: 2px;
    background: var(--brass);
    border: 0;
    margin: 0 0 1.6rem;
}

.section-head--center .rule { margin-inline: auto; }

/* --- Buttons ------------------------------------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-family: var(--font-sans);
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: .01em;
    padding: .85rem 1.65rem;
    border: 1.5px solid transparent;
    border-radius: 2px;
    cursor: pointer;
    transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
    text-decoration: none;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn--primary {
    background: var(--brass);
    border-color: var(--brass);
    color: #fff;
}
.btn--primary:hover { background: #9a6f33; border-color: #9a6f33; color: #fff; }

.btn--ghost {
    border-color: rgba(255, 255, 255, .55);
    color: #fff;
}
.btn--ghost:hover { background: rgba(255, 255, 255, .12); border-color: #fff; color: #fff; }

.btn--outline {
    border-color: var(--sea);
    color: var(--sea);
}
.btn--outline:hover { background: var(--sea); color: #fff; }

/* --- Top utility bar ---------------------------------------------------- */
.utility {
    background: var(--ink);
    color: rgba(255, 255, 255, .72);
    font-size: .845rem;
    letter-spacing: .01em;
}

.utility__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 1.5rem;
    min-height: 2.75rem;
}

.utility a {
    color: rgba(255, 255, 255, .82);
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}
.utility a:hover { color: #fff; text-decoration: none; }

.utility svg { width: 1em; height: 1em; opacity: .7; flex: none; }

/* --- Masthead ----------------------------------------------------------- */
.masthead {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--line);
}

.masthead__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 4.75rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .8rem;
    text-decoration: none;
    flex: none;
}
.brand:hover { text-decoration: none; }

.brand__mark { height: 2.15rem; width: auto; }

.brand__text {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -.015em;
    line-height: 1;
}

.brand__tag {
    display: block;
    font-family: var(--font-sans);
    font-size: .68rem;
    font-weight: 500;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: .3rem;
}

/* --- Navigation --------------------------------------------------------- */
.nav__list {
    display: flex;
    align-items: center;
    gap: clamp(.4rem, 2vw, 1.1rem);
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav__link {
    display: block;
    font-size: .95rem;
    font-weight: 500;
    color: var(--text);
    padding: .55rem .3rem;
    position: relative;
    white-space: nowrap;
}

.nav__link::after {
    content: "";
    position: absolute;
    left: .3rem;
    right: .3rem;
    bottom: .18rem;
    height: 2px;
    background: var(--brass);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .2s ease;
}

.nav__link:hover { color: var(--ink); text-decoration: none; }
.nav__link:hover::after,
.nav__item--active .nav__link::after { transform: scaleX(1); }

.nav__item--active .nav__link { color: var(--ink); font-weight: 600; }

.nav__cta { margin-left: .6rem; }

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    background: none;
    border: 1px solid var(--line);
    border-radius: 2px;
    cursor: pointer;
    color: var(--ink);
}

.nav-toggle svg { width: 1.35rem; height: 1.35rem; }
.nav-toggle__close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: block; }

@media (max-width: 860px) {
    .nav-toggle { display: inline-flex; }

    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow-md);
        padding: .5rem var(--gut) 1.5rem;
        display: none;
    }

    .nav[data-open="true"] { display: block; }

    .nav__list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .nav__link {
        padding: .9rem .2rem;
        border-bottom: 1px solid var(--line);
        font-size: 1.05rem;
    }

    .nav__link::after { display: none; }
    .nav__cta { margin: 1rem 0 0; }
    .nav__cta .btn { width: 100%; justify-content: center; }
}

/* --- Hero --------------------------------------------------------------- */
.hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: clamp(26rem, 62vh, 40rem);
    background: var(--ink);
    overflow: hidden;
}

.hero--compact { min-height: clamp(16rem, 34vh, 24rem); }

.hero__media {
    position: absolute;
    inset: 0;
}

.hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 42%;
}

/* Legibility scrim: dark at the bottom where the text sits */
.hero__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(8, 20, 30, .82) 0%, rgba(8, 20, 30, .48) 38%, rgba(8, 20, 30, .12) 70%, rgba(8, 20, 30, .30) 100%);
}

.hero__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    padding-block: clamp(2.75rem, 6vw, 5rem);
    color: #fff;
}

.hero__title {
    color: #fff;
    margin-bottom: .35em;
    text-wrap: balance;
    text-shadow: 0 2px 24px rgba(0, 0, 0, .35);
}

.hero__sub {
    font-family: var(--font-serif);
    font-size: clamp(1.15rem, 2.4vw, 1.7rem);
    font-style: italic;
    color: rgba(255, 255, 255, .93);
    max-width: 36rem;
    margin: 0 0 1.9rem;
    text-shadow: 0 1px 16px rgba(0, 0, 0, .4);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .85rem;
}

.hero--compact .hero__inner { padding-block: clamp(2rem, 4vw, 3.25rem); }
.hero--compact .hero__title { font-size: clamp(1.9rem, 4vw, 2.9rem); margin-bottom: 0; }

/* --- Breadcrumb-ish page kicker ---------------------------------------- */
.hero__kicker {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--brass-lite);
    margin-bottom: .85rem;
}

/* --- Split feature (text + image) -------------------------------------- */
.split {
    display: grid;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

@media (min-width: 900px) {
    .split { grid-template-columns: 1fr 1fr; }
    .split--reverse .split__media { order: -1; }
}

.split__media img {
    width: 100%;
    border-radius: 3px;
    box-shadow: var(--shadow-lg);
}

.split__body > :last-child { margin-bottom: 0; }

/* --- Plan cards --------------------------------------------------------- */
.plans {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
    align-items: stretch;
}

@media (min-width: 560px)  { .plans { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 920px)  { .plans { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1240px) { .plans { grid-template-columns: repeat(5, 1fr); } }

.plan {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    position: relative;
}

.plan:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: #d8cfc0;
}

/* Brass hairline along the top edge marks the card as a priced offer */
.plan::before {
    content: "";
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    height: 3px;
    background: var(--line);
    border-radius: 3px 3px 0 0;
}

.plan--featured { border-color: var(--brass); }
.plan--featured::before { background: var(--brass); }

.plan__badge {
    position: absolute;
    top: -.72rem;
    left: 1.5rem;
    background: var(--brass);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: .28rem .7rem;
    border-radius: 2px;
}

.plan__name {
    font-family: var(--font-serif);
    font-size: 1.32rem;
    font-weight: 600;
    color: var(--ink);
    margin: 0 0 .15rem;
}

.plan__speed {
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--muted);
    line-height: 1.35;
    margin-bottom: 1.15rem;
    /* Tvær reglur eru frátiknar, so prísirnir standa á sama støði á øllum kortum */
    min-height: 2.7em;
}

.plan__price {
    font-family: var(--font-serif);
    font-size: clamp(1.7rem, 2.1vw, 2.1rem);
    font-weight: 600;
    color: var(--ink);
    line-height: 1.1;
    margin-bottom: .1rem;
}

.plan__price small {
    font-family: var(--font-sans);
    font-size: .84rem;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: .02em;
}

.plan__divider {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 1.3rem 0;
}

.plan__desc {
    color: var(--muted);
    font-size: .97rem;
    margin: 0 0 1.6rem;
    flex: 1 1 auto;
}

.plan__desc p { margin-bottom: .6em; }
.plan__desc p:last-child { margin-bottom: 0; }

.plan__action { margin-top: auto; }
.plan__action .btn { width: 100%; justify-content: center; }

/* --- Coverage list ------------------------------------------------------ */
.places {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    list-style: none;
    margin: 1.75rem 0 0;
    padding: 0;
}

.places li {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 2rem;
    padding: .5rem 1.1rem;
    font-size: .95rem;
    font-weight: 500;
    color: var(--ink);
    box-shadow: var(--shadow-sm);
}

.places li::before {
    content: "";
    width: .45rem;
    height: .45rem;
    border-radius: 50%;
    background: var(--brass);
    flex: none;
}

/* --- Contact band ------------------------------------------------------- */
.contact-band {
    background: linear-gradient(135deg, var(--ink) 0%, var(--ink-soft) 100%);
    color: #fff;
    padding-block: clamp(3rem, 5vw, 4.25rem);
}

.contact-band__inner {
    display: grid;
    gap: 2rem;
    align-items: center;
}

@media (min-width: 820px) {
    .contact-band__inner { grid-template-columns: 1fr auto; }
}

.contact-band h2 { color: #fff; margin-bottom: .4em; }
.contact-band p { color: rgba(255, 255, 255, .82); margin: 0; max-width: 40rem; }

.contact-band__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .85rem;
}

/* --- Content (RTE output) ---------------------------------------------- */
.content > *:last-child { margin-bottom: 0; }

.content ul, .content ol { margin: 0 0 1.15em; padding-left: 1.3em; }
.content li { margin-bottom: .35em; }

.content h2 { margin-top: 1.8em; }
.content h3 { margin-top: 1.5em; }
.content > h2:first-child,
.content > h3:first-child { margin-top: 0; }

.content blockquote {
    margin: 1.6em 0;
    padding: .2em 0 .2em 1.4em;
    border-left: 3px solid var(--brass);
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-style: italic;
    color: var(--ink);
}

.content figure { margin: 1.8em 0; }
.content figure img { border-radius: 3px; box-shadow: var(--shadow-md); }

.content figcaption {
    font-size: .88rem;
    color: var(--muted);
    margin-top: .7rem;
}

/* --- Pull quote --------------------------------------------------------- */
.pullquote {
    font-family: var(--font-serif);
    font-size: clamp(1.3rem, 2.6vw, 1.85rem);
    font-style: italic;
    line-height: 1.45;
    color: var(--ink);
    text-align: center;
    max-width: 44rem;
    margin-inline: auto;
    text-wrap: balance;
}

.section--deep .pullquote { color: #fff; }

/* --- Footer ------------------------------------------------------------- */
.footer {
    background: var(--ink);
    color: rgba(255, 255, 255, .72);
    font-size: .95rem;
}

.footer__inner {
    display: grid;
    gap: 2.5rem;
    padding-block: clamp(3rem, 6vw, 4.5rem);
}

@media (min-width: 760px) {
    .footer__inner { grid-template-columns: 1.4fr 1fr 1fr; }
}

.footer h3 {
    color: #fff;
    font-size: 1rem;
    font-family: var(--font-sans);
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: 1.1rem;
}

.footer a { color: rgba(255, 255, 255, .78); }
.footer a:hover { color: #fff; }

.footer__brand {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    color: #fff;
    margin-bottom: .5rem;
}

.footer__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer__list li { margin-bottom: .55rem; }

.footer__bottom {
    border-top: 1px solid var(--line-dark);
    padding-block: 1.5rem;
    font-size: .87rem;
    color: rgba(255, 255, 255, .55);
    display: flex;
    flex-wrap: wrap;
    gap: .6rem 1.5rem;
    justify-content: space-between;
}

/* Halt yvirskriftina frí av fastu meniuni, tá ið stokkið verður til eitt akker */
[id] { scroll-margin-top: 6rem; }

/* --- Utilities ---------------------------------------------------------- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--brass);
    color: #fff;
    padding: .75rem 1.25rem;
    z-index: 200;
}

.skip-link:focus {
    left: 0;
    text-decoration: none;
}

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
    }
}

/* --- Fluid Styled Content ---------------------------------------------- */
.frame { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.frame:last-child { margin-bottom: 0; }

.frame > header,
.ce-bodytext > header { margin-bottom: 1.1rem; }
.frame > header > h2,
.frame > header > h3,
.ce-bodytext > header > h2,
.ce-bodytext > header > h3 { margin-bottom: .35em; }

.ce-gallery figure { margin: 0; }

.ce-gallery img {
    width: 100%;
    border-radius: 3px;
    box-shadow: var(--shadow-lg);
}

.ce-gallery figcaption {
    font-size: .88rem;
    color: var(--muted);
    margin-top: .7rem;
}

.ce-row { margin-bottom: 1.5rem; }
.ce-row:last-child { margin-bottom: 0; }

.ce-column { margin-bottom: 1.5rem; }
.ce-column:last-child { margin-bottom: 0; }

/* Mynd og tekstur síða um síðu */
.ce-intext.ce-right,
.ce-intext.ce-left {
    display: grid;
    gap: clamp(1.75rem, 4vw, 3.25rem);
    align-items: center;
}

@media (min-width: 900px) {
    .ce-intext.ce-right,
    .ce-intext.ce-left { grid-template-columns: 1fr 1fr; }
    .ce-intext.ce-left .ce-gallery { order: -1; }
    .ce-intext.ce-right .ce-gallery { order: 1; }
}

.ce-intext .ce-bodytext > :last-child { margin-bottom: 0; }

/* Mynd omanfyri / niðanfyri tekstin */
.ce-above .ce-gallery { margin-bottom: 1.75rem; }
.ce-below .ce-gallery { margin-top: 1.75rem; }

.ce-center .ce-outer { position: relative; float: right; right: 50%; }
.ce-center .ce-inner { position: relative; float: right; right: -50%; }

/* Fleiri myndir við síðuna av hvørjari aðrari */
.ce-gallery[data-ce-columns="2"] .ce-row,
.ce-gallery[data-ce-columns="3"] .ce-row,
.ce-gallery[data-ce-columns="4"] .ce-row {
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 640px) {
    .ce-gallery[data-ce-columns="2"] .ce-row { grid-template-columns: repeat(2, 1fr); }
    .ce-gallery[data-ce-columns="3"] .ce-row { grid-template-columns: repeat(3, 1fr); }
    .ce-gallery[data-ce-columns="4"] .ce-row { grid-template-columns: repeat(4, 1fr); }
}

/* Punktalistar við messingfarvaðum punkti */
.content ul { list-style: none; padding-left: 0; }

.content ul li {
    position: relative;
    padding-left: 1.5rem;
}

.content ul li::before {
    content: "";
    position: absolute;
    left: .25rem;
    top: .72em;
    width: .4rem;
    height: .4rem;
    border-radius: 50%;
    background: var(--brass);
}

/* Heldur høgum standandi myndum í skefti, uttan at skeraliggjandi myndir */
@media (min-width: 900px) {
    .ce-intext .ce-gallery img {
        max-height: 32rem;
        object-fit: cover;
    }
}
